+2
−0
+69
−0
Loading
When `document.blockParsing()` is called, the nsIParser is suspended until the document is unblocked. For about:blank documents, this is a nsParser. When a document is unblocked, nsParser::ContinueInterruptedParsingAsync is invoked, which delegates its implementation to nsIContentSink, which is a nsHTMLContentSink for about:blank documents. Due to a missing implementation of nsHTMLContentSink::ContinueInterruptedParsingAsync, the parser was never resumed, causing bug 1465388 and bug 1407501. This patch fixes the problem, by implementing the required method (and using a load blocker to ensure that the (about:blank) document does not finish before the parser finishes). This patch is tested through extension tests: Currently document_start stylesheets always activate the parser blocker, and document_start scripts trigger the parser blocker when the script has not been preloaded yet (e.g. at the first run). Before this patch, the test failed due to the assertion failure as reported in the linked bugs. After this patch, the tests pass. Differential Revision: https://phabricator.services.mozilla.com/D4352 --HG-- extra : moz-landing-system : lando