Skip to content

Commit

Permalink
src: fix crash with SyntheticModule#setExport
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
targos authored and aduh95 committed Jan 8, 2020
1 parent abcc819 commit 69afd66
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion src/module_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,7 @@ void ModuleWrap::SetSyntheticExport(
Local<Value> export_value = args[1];

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

void ModuleWrap::Initialize(Local<Object> target,
Expand Down
3 changes: 0 additions & 3 deletions test/parallel/test-vm-module-synthetic.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ const assert = require('assert');
});
}

// https://bugs.chromium.org/p/v8/issues/detail?id=9828
/*
{
const s = new SyntheticModule([], () => {});
await s.link(() => {});
Expand All @@ -47,7 +45,6 @@ const assert = require('assert');
name: 'ReferenceError',
});
}
*/

{
const s = new SyntheticModule([], () => {});
Expand Down

0 comments on commit 69afd66

Please sign in to comment.