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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp

Issue 1642283002: Deal with frame removal by content scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Schedule microtask for document_end scripts Created 4 years, 10 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: third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
index 3d1a4f5f267c891d67d04dd8747f2d978ad8519c..26bd6e752db6630fad2e76f52bce42cba9b11857 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
@@ -188,6 +188,11 @@ public:
skipLeading<isNotHTMLSpace<UChar>>();
}
+ void skipRemaining()
+ {
+ m_current = m_end;
+ }
+
String takeRemaining()
{
ASSERT(!isEmpty());
@@ -2288,6 +2293,10 @@ ReprocessBuffer:
if (buffer.isEmpty())
return;
defaultForBeforeHTML();
+ if (m_parser->isStopped()) {
kouhei (in TOK) 2016/02/10 01:38:02 I don't understand the intention of the change her
robwu 2016/02/10 10:19:52 When the HTML document consists of text only, e.g.
+ buffer.skipRemaining();
+ return;
+ }
// Fall through.
}
case BeforeHeadMode: {

Powered by Google App Engine
This is Rietveld 408576698