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

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

Issue 2151783002: Fix crash when encountered unmatched script end-tag token in TextMode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better tagname on tests Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/parser/non-script-endtag-in-textmode-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 eeb78031414d74fbce2f4d07947f5caf15b8edbf..fafd7bff256290841d64387cccb39b7808df593c 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
@@ -2090,9 +2090,8 @@ void HTMLTreeBuilder::processEndTag(AtomicHTMLToken* token)
processToken(token);
break;
case TextMode:
- if (token->name() == scriptTag) {
+ if (token->name() == scriptTag && m_tree.currentStackItem()->hasTagName(scriptTag)) {
// Pause ourselves so that parsing stops until the script can be processed by the caller.
- ASSERT(m_tree.currentStackItem()->hasTagName(scriptTag));
if (scriptingContentIsAllowed(m_tree.getParserContentPolicy()))
m_scriptToProcess = m_tree.currentElement();
m_tree.openElements()->pop();
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/parser/non-script-endtag-in-textmode-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698