Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(841)

Unified Diff: Source/core/html/parser/HTMLParserOptions.cpp

Issue 521363002: Make XHR use the background HTML parser (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix compile Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/parser/HTMLParserOptions.cpp
diff --git a/Source/core/html/parser/HTMLParserOptions.cpp b/Source/core/html/parser/HTMLParserOptions.cpp
index 64a3f4d8aa74308f684b9dbac02f3b3bffae584e..d4c925578daadd1383230f89d6667eea6c8aa6b0 100644
--- a/Source/core/html/parser/HTMLParserOptions.cpp
+++ b/Source/core/html/parser/HTMLParserOptions.cpp
@@ -40,16 +40,15 @@ HTMLParserOptions::HTMLParserOptions(Document* document)
scriptEnabled = frame && frame->script().canExecuteScripts(NotAboutToExecuteScript);
pluginsEnabled = frame && frame->loader().allowPlugins(NotAboutToInstantiatePlugin);
- // We force the main-thread parser for two cases:
+ // We force the main-thread parser for three cases:
// - about:blank and javascript (which uses about:blank) for compatibility
// with historical synchronous loading/parsing behavior.
- // - instances where the Document has no Frame (this happens sometimes for
- // HTML imports, and possibly other cases).
- // FIXME: We want to use the threaded parser for XHRs (where there is no
- // frame) so the second case should go away eventually.
+ // - HTML imports (FIXME: enable off-thread parser for this case)
+ // - inspector/DOMPatchSupport replacing the whole document.
+ // (DOMPatchSupport calls in |DocumentParser::pinToMainThread()| for this case)
// FIXME: Gecko does not load javascript: urls synchronously, why do we?
// See LayoutTests/loader/iframe-sync-loads.html
- useThreading = document && document->frame() && !document->url().isAboutBlankURL();
+ useThreading = document && !document->importsController() && !document->url().isAboutBlankURL();
}
}

Powered by Google App Engine
This is Rietveld 408576698