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

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

Issue 302063002: Always preload all tokens before parsing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix CORS issue with preloader Created 6 years, 7 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/HTMLDocumentParser.cpp
diff --git a/Source/core/html/parser/HTMLDocumentParser.cpp b/Source/core/html/parser/HTMLDocumentParser.cpp
index 20f5c4f44d18ec3e9105989a5f2161a94f952af2..02750630ae6a12df8d506b0d4dde1d2aea4f8bdc 100644
--- a/Source/core/html/parser/HTMLDocumentParser.cpp
+++ b/Source/core/html/parser/HTMLDocumentParser.cpp
@@ -353,7 +353,13 @@ void HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser(PassOwnPtr<Pa
RefPtrWillBeRawPtr<HTMLDocumentParser> protect(this);
ASSERT(m_speculations.isEmpty());
- chunk->preloads.clear(); // We don't need to preload because we're going to parse immediately.
+ // This preload call is redundant, but we plan to change treebuilding to
+ // always operate asynchronously after a message-loop round trip after delivery
+ // to the main thread, thus we'll always use the preloader. Before making
+ // that change, we're sending all chunks through the preloader right
+ // before treebuilding (changes 15 layout tests).
+ // https://codereview.chromium.org/258013009/
+ m_preloader->takeAndPreload(chunk->preloads);
m_speculations.append(chunk);
tonyg 2014/05/29 23:27:25 These two lines are now identical to the other cod
pumpPendingSpeculations();
}

Powered by Google App Engine
This is Rietveld 408576698