Bug 1773324 - Pass ErrorContext parameter to CompileModuleToStencil functions r=arai
Fixes jit-test. Probably needs coordination with ESMification efforts. It looks like JS::CompileModule() would be called from the main thread, so it should use GeneralErrorContext. Differential Revision: https://phabricator.services.mozilla.com/D151178
This commit is contained in:
@@ -5315,7 +5315,8 @@ static bool ParseModule(JSContext* cx, unsigned argc, Value* vp) {
|
||||
return false;
|
||||
}
|
||||
|
||||
RootedObject module(cx, frontend::CompileModule(cx, options, srcBuf));
|
||||
GeneralErrorContext ec(cx);
|
||||
RootedObject module(cx, frontend::CompileModule(cx, &ec, options, srcBuf));
|
||||
if (!module) {
|
||||
return false;
|
||||
}
|
||||
@@ -5810,13 +5811,14 @@ template <typename Unit>
|
||||
return false;
|
||||
}
|
||||
|
||||
GeneralErrorContext ec(cx);
|
||||
UniquePtr<frontend::ExtensibleCompilationStencil> stencil;
|
||||
if (goal == frontend::ParseGoal::Script) {
|
||||
GeneralErrorContext ec(cx);
|
||||
stencil = frontend::CompileGlobalScriptToExtensibleStencil(
|
||||
cx, &ec, input.get(), srcBuf, ScopeKind::Global);
|
||||
} else {
|
||||
stencil = frontend::ParseModuleToExtensibleStencil(cx, input.get(), srcBuf);
|
||||
stencil =
|
||||
frontend::ParseModuleToExtensibleStencil(cx, &ec, input.get(), srcBuf);
|
||||
}
|
||||
|
||||
if (!stencil) {
|
||||
|
||||
Reference in New Issue
Block a user