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

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: Last nits Created 4 years, 9 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 2ce0a69d690179cb0116ec49bc6a81b25a0b2f15..372389c8681d17bbec1fe8c8bae9fba64bbb5943 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()) {
+ buffer.skipRemaining();
+ return;
+ }
// Fall through.
}
case BeforeHeadMode: {

Powered by Google App Engine
This is Rietveld 408576698