Bug 1877792 - Part 16: Disable off-thread compilaton for JSON modules r=spidermonkey-reviewers,jonco
This is something we may want to investigate and implement, but it felt out of scope for the initial implementation. Differential Revision: https://phabricator.services.mozilla.com/D218563
This commit is contained in:
@@ -1758,6 +1758,13 @@ nsresult ScriptLoader::AttemptOffThreadScriptCompile(
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Don't off-thread compile JSON modules.
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1912112
|
||||
if (aRequest->IsModuleRequest() &&
|
||||
aRequest->AsModuleRequest()->mModuleType == JS::ModuleType::JSON) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIGlobalObject> globalObject = GetGlobalForRequest(aRequest);
|
||||
if (!globalObject) {
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user