Changeset 60814 in webkit
- Timestamp:
- Jun 7, 2010 7:25:44 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r60813 r60814 1 2010-06-07 Eric Seidel <eric@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 HTML5 Parser fails script-tests which use document.write 6 https://bugs.webkit.org/show_bug.cgi?id=40276 7 8 We were leaving the TreeBuilder paused when executing the scripts 9 resulting in document.write() calls being ignored. 10 11 I don't see a good way to ASSERT this correct behavior, since 12 the HTML5ScriptRunner and the HTML5TreeBuilder do not know about 13 each other. We should never have document.write() called while 14 the HTML5TreeBuilder is paused, however both document.write and 15 the network call the same HTML5Tokenizer::write method. It's OK 16 to be paused when the network writes, but during document.write 17 (or any other script execution). 18 19 Tested by all of fast/url and numerous other tests. 20 21 * html/HTML5Tokenizer.cpp: 22 (WebCore::HTML5Tokenizer::notifyFinished): 23 - Unpause the treebuilder before executing scripts. 24 (WebCore::HTML5Tokenizer::executeScriptsWaitingForStylesheets): 25 - Unpause the treebuilder before executing scripts. 26 1 27 2010-06-07 Eric Seidel <eric@webkit.org> 2 28 -
trunk/WebCore/html/HTML5Tokenizer.cpp
r60813 r60814 226 226 ASSERT(!m_scriptRunner->inScriptExecution()); 227 227 ASSERT(m_treeBuilder->isPaused()); 228 // Note: We only ever wait on one script at a time, so we always know this 229 // is the one we were waiting on and can un-pause the tree builder. 230 m_treeBuilder->setPaused(false); 228 231 bool shouldContinueParsing = m_scriptRunner->executeScriptsWaitingForLoad(cachedResource); 229 232 m_treeBuilder->setPaused(!shouldContinueParsing); … … 241 244 ASSERT(!m_scriptRunner->inScriptExecution()); 242 245 ASSERT(m_treeBuilder->isPaused()); 246 // Note: We only ever wait on one script at a time, so we always know this 247 // is the one we were waiting on and can un-pause the tree builder. 248 m_treeBuilder->setPaused(false); 243 249 bool shouldContinueParsing = m_scriptRunner->executeScriptsWaitingForStylesheets(); 244 250 m_treeBuilder->setPaused(!shouldContinueParsing);
Note: See TracChangeset
for help on using the changeset viewer.