Bug 900784 part 1.5 - Encode JS bytecode when no more scripts are executed. r=mrbkap

This commit is contained in:
Nicolas B. Pierron
2017-04-21 16:57:58 +00:00
parent 44be152060
commit 754ef645c3
3 changed files with 317 additions and 16 deletions

View File

@@ -1082,6 +1082,12 @@ nsDocumentViewer::LoadComplete(nsresult aStatus)
}
}
// Release the JS bytecode cache from its wait on the load event, and
// potentially dispatch the encoding of the bytecode.
if (mDocument && mDocument->ScriptLoader()) {
mDocument->ScriptLoader()->LoadEventFired();
}
nsJSContext::LoadEnd();
// It's probably a good idea to GC soon since we have finished loading.