Bug 1379148: Part 2 - Don't block script-created parsers when executing content scripts. r?mixedpuppy draft
authorKris Maglione <maglione.k@gmail.com>
Wed, 20 Sep 2017 16:13:03 -0700
changeset 667976 63245f7d9a5dc93028d782a77640103eeb050bd2
parent 667975 2a50130368191a8e772301ab89130de05a4f7132
child 667977 502a142bccef8f9237b2639d6566a5d8458a5d3f
push id80907
push usermaglione.k@gmail.com
push dateThu, 21 Sep 2017 00:03:55 +0000
reviewersmixedpuppy
bugs1379148
milestone57.0a1
Bug 1379148: Part 2 - Don't block script-created parsers when executing content scripts. r?mixedpuppy 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);