Bug 1717642 - Add a pref to force full parse for OMT compiled JS scripts from the ScriptLoader. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D118494
This commit is contained in:
Denis Palmeiro 2021-06-24 15:13:42 +00:00
Родитель c3e88222c1
Коммит f8473d146f
2 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -2622,6 +2622,10 @@ nsresult ScriptLoader::AttemptAsyncScriptCompile(ScriptLoadRequest* aRequest,
nsresult rv = GetScriptSource(cx, aRequest, &maybeSource);
NS_ENSURE_SUCCESS(rv, rv);
if (StaticPrefs::dom_script_loader_full_parse()) {
options.setForceFullParse();
}
aRequest->mOffThreadToken =
maybeSource.constructed<SourceText<char16_t>>()
? JS::CompileOffThread(

Просмотреть файл

@ -2864,6 +2864,12 @@
value: 0
mirror: always
# Force full parse on any external JS scripts that is being compiled off thread.
- name: dom.script_loader.full_parse
type: bool
value: false
mirror: always
# Is support for decoding external (non-inline) classic or module DOM scripts
# (i.e. anything but workers) as UTF-8, then directly compiling without
# inflating to UTF-16, enabled?