2006-03-20 Eric Seidel <eseidel@apple.com>
Reviewed by mjs.
Fix tokenizer crash when document.open() is called from an external script:
<rdar://problem/4483882> REGRESSION (417.8-TOT): crash at yourmovies.com.au in WebCore::HTMLTokenizer::reset() + 92 (7818)
* dom/Document.cpp:
(WebCore::Document::open): Check to make sure the current tokenizer isn't executing a script
* dom/xml_tokenizer.h:
(WebCore::Tokenizer::executingScript): Add a way for others to know if scripts are executing.
* html/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::scriptExecution): Wire into existing m_executingScript member var.
* html/HTMLTokenizer.h:
(WebCore::HTMLTokenizer::executingScript):
* kcanvas/device/quartz/KCanvasFilterQuartz.mm:
(WebCore::KCanvasFilterQuartz::prepareFilter): Unrelated code cleanup.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/html/HTMLTokenizer.h b/WebCore/html/HTMLTokenizer.h
index b5a1186..25b7b95 100644
--- a/WebCore/html/HTMLTokenizer.h
+++ b/WebCore/html/HTMLTokenizer.h
@@ -95,6 +95,7 @@
virtual bool isWaitingForScripts() const;
virtual void stopParsing();
virtual bool processingData() const;
+ virtual int executingScript() const { return m_executingScript; }
private:
class State;