Skip to content

Commit d78e317

Browse files
committed
src: fix crash with SyntheticModule#setExport
Use the new non-deprecated V8 API for that. PR-URL: #30062 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent f3d00c5 commit d78e317

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

‎src/module_wrap.cc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1500,7 +1500,7 @@ void ModuleWrap::SetSyntheticExport(
15001500
Local<Value> export_value = args[1];
15011501

15021502
Local<Module> module = obj->module_.Get(isolate);
1503-
module->SetSyntheticModuleExport(export_name, export_value);
1503+
USE(module->SetSyntheticModuleExport(isolate, export_name, export_value));
15041504
}
15051505

15061506
voidModuleWrap::Initialize(Local<Object> target,

‎test/parallel/test-vm-module-synthetic.js‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ const assert = require('assert');
3636
});
3737
}
3838

39-
// https://bugs.chromium.org/p/v8/issues/detail?id=9828
40-
/*
4139
{
4240
consts=newSyntheticModule([],()=>{});
4341
awaits.link(()=>{});
@@ -47,7 +45,6 @@ const assert = require('assert');
4745
name: 'ReferenceError',
4846
});
4947
}
50-
*/
5148

5249
{
5350
consts=newSyntheticModule([],()=>{});

0 commit comments

Comments
(0)