[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/khtml/html
From: Germain Garand <germain () ebooksfrance ! org>
Date: 2010-01-23 5:30:29
Message-ID: 1264224629.747266.29772.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1078893 by ggarand:
Erm, I swear I could trigger this assert at some point, though
I can't anymore, and can't imagine how..
Could be due to the tokenizing regressions I just repaired?
anyway, comparing pointers is less costly than annoying users with
potential crashes.
M +3 -2 htmltokenizer.cpp
--- trunk/KDE/kdelibs/khtml/html/htmltokenizer.cpp #1078892:1078893
@@ -1474,11 +1474,12 @@
currToken.flat = false;
bool beginTag = !currToken.flat && (tagID < ID_CLOSE_TAG);
+ HTMLScriptElementImpl* prevScriptElem = 0;
if(tagID >= ID_CLOSE_TAG)
tagID -= ID_CLOSE_TAG;
else if ( tagID == ID_SCRIPT ) {
- assert( !parser->currentScriptElement() );
+ prevScriptElem = parser->currentScriptElement();
DOMStringImpl* a = 0;
scriptSrc.clear(); scriptSrcCharset.clear();
if ( currToken.attrs && /* potentially have a ATTR_SRC ? */
@@ -1499,7 +1500,7 @@
if (javascript) {
HTMLScriptElementImpl* sc = parser->currentScriptElement();
- javascript = sc ? sc->isValidScript() : false;
+ javascript = (sc && sc != prevScriptElem) ? sc->isValidScript() : false;
}
if ( parser->selectMode() && beginTag)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic