WebCore:

2008-11-24  Antti Koivisto  <antti@apple.com>

        Reviewed by Darin Adler.
        
        Fix for https://bugs.webkit.org/show_bug.cgi?id=22073
        REGRESSION(r33544): Palace in the Sky crashes WebKit
        
        HTMLTokenizer::m_hasScriptsWaitingForStylesheets would still be set while
        there were no scripts left to execute. 
        
        If m_hasScriptsWaitingForStylesheets becomes true during script execution
        bail out from executing more scripts synchronously.

        Test: fast/tokenizer/nested-cached-scripts-and-stylesheet.html

        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::reset):
        (WebCore::HTMLTokenizer::notifyFinished):

LayoutTests:

2008-11-24  Antti Koivisto  <antti@apple.com>

        Reviewed by Darin Adler.
        
        Test for https://bugs.webkit.org/show_bug.cgi?id=22073
        REGRESSION(r33544): Palace in the Sky crashes WebKit

        * fast/tokenizer/nested-cached-scripts-and-stylesheet-expected.txt: Added.
        * fast/tokenizer/nested-cached-scripts-and-stylesheet.html: Added.
        * fast/tokenizer/resources/load-stylesheet-and-document-write-script.js: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
6 files changed