mirror of https://github.com/nodejs/node.git
src: fix crash with SyntheticModule#setExport
Use the new non-deprecated V8 API for that. PR-URL: https://github.com/nodejs/node/pull/30062 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>pull/30108/head
parent
d29f0eda15
commit
ab78d4df34
|
@ -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,
|
||||
|
|
|
@ -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(() => {});
|
||||
|
@ -47,7 +45,6 @@ const assert = require('assert');
|
|||
name: 'ReferenceError',
|
||||
});
|
||||
}
|
||||
*/
|
||||
|
||||
{
|
||||
const s = new SyntheticModule([], () => {});
|
||||
|
|
Loading…
Reference in New Issue