Bug 1379148 - Part 2: Don't block script-created parsers when executing content scripts. r=mixedpuppy, a=sledru
authorKris Maglione <maglione.k@gmail.com>
Wed, 20 Sep 2017 16:13:03 -0700
changeset 431814 b06cc382f74d48eaabbf9aad9c2fc22a4c07612d
parent 431813 df77a4c1b59103eef619fda4ca1e75404e17a95d
child 431815 e9235f4e44ee49812d2d07e14619d4927b88f75c
push id7819
push userryanvm@gmail.com
push dateMon, 25 Sep 2017 13:25:08 +0000
treeherdermozilla-beta@078e47662790 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmixedpuppy, sledru
bugs1379148
milestone57.0
Bug 1379148 - Part 2: Don't block script-created parsers when executing content scripts. r=mixedpuppy, a=sledru MozReview-Commit-ID: GsqsaOVob4B
toolkit/components/extensions/ExtensionContent.jsm
--- a/toolkit/components/extensions/ExtensionContent.jsm
+++ b/toolkit/components/extensions/ExtensionContent.jsm
@@ -319,17 +319,17 @@ class Script {
 
     let scriptsPromise = Promise.all(this.compileScripts());
 
     // If we're supposed to inject at the start of the document load,
     // and we haven't already missed that point, block further parsing
     // until the scripts have been loaded.
     let {document} = context.contentWindow;
     if (this.runAt === "document_start" && document.readyState !== "complete") {
-      document.blockParsing(scriptsPromise);
+      document.blockParsing(scriptsPromise, {blockScriptCreated: false});
     }
 
     let scripts = await scriptsPromise;
     let result;
 
     // The evaluations below may throw, in which case the promise will be
     // automatically rejected.
     TelemetryStopwatch.start(CONTENT_SCRIPT_INJECTION_HISTOGRAM, context);