Skip to content

Commit a6a273c

Browse files
targosaduh95
authored andcommitted
src: fix crash with SyntheticModule#setExport
Use the new non-deprecated V8 API for that. PR-URL: nodejs#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 72493af commit a6a273c

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
@@ -1423,7 +1423,7 @@ void ModuleWrap::SetSyntheticExport(
14231423
Local<Value> export_value = args[1];
14241424

14251425
Local<Module> module = obj->module_.Get(isolate);
1426-
module->SetSyntheticModuleExport(export_name, export_value);
1426+
USE(module->SetSyntheticModuleExport(isolate, export_name, export_value));
14271427
}
14281428

14291429
void ModuleWrap::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
const s = new SyntheticModule([], () => {});
4341
await s.link(() => {});
@@ -47,7 +45,6 @@ const assert = require('assert');
4745
name: 'ReferenceError',
4846
});
4947
}
50-
*/
5148

5249
{
5350
const s = new SyntheticModule([], () => {});

0 commit comments

Comments
 (0)