Changeset 38748 in webkit


Ignore:
Timestamp:
Nov 25, 2008 12:13:05 AM (15 years ago)
Author:
Antti Koivisto
Message:

WebCore:

2008-11-24 Antti Koivisto <Antti Koivisto>

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 Koivisto>

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.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r38747 r38748  
     12008-11-24  Antti Koivisto  <antti@apple.com>
     2
     3        Reviewed by Darin Adler.
     4       
     5        Test for https://bugs.webkit.org/show_bug.cgi?id=22073
     6        REGRESSION(r33544): Palace in the Sky crashes WebKit
     7
     8        * fast/tokenizer/nested-cached-scripts-and-stylesheet-expected.txt: Added.
     9        * fast/tokenizer/nested-cached-scripts-and-stylesheet.html: Added.
     10        * fast/tokenizer/resources/load-stylesheet-and-document-write-script.js: Added.
     11
    1122008-11-24  Cameron Zwarich  <zwarich@apple.com>
    213
  • trunk/WebCore/ChangeLog

    r38746 r38748  
     12008-11-24  Antti Koivisto  <antti@apple.com>
     2
     3        Reviewed by Darin Adler.
     4       
     5        Fix for https://bugs.webkit.org/show_bug.cgi?id=22073
     6        REGRESSION(r33544): Palace in the Sky crashes WebKit
     7       
     8        HTMLTokenizer::m_hasScriptsWaitingForStylesheets would still be set while
     9        there were no scripts left to execute.
     10       
     11        If m_hasScriptsWaitingForStylesheets becomes true during script execution
     12        bail out from executing more scripts synchronously.
     13
     14        Test: fast/tokenizer/nested-cached-scripts-and-stylesheet.html
     15
     16        * html/HTMLTokenizer.cpp:
     17        (WebCore::HTMLTokenizer::reset):
     18        (WebCore::HTMLTokenizer::notifyFinished):
     19
    1202008-11-24  Darin Fisher  <darin@chromium.org>
    221
     
    6180        been marked purgeable for (hopefully) better uses. This is ideal for caches.
    6281       
    63         Only resources larger than 16KB will be moved to the purgsable memory.
     82        Only resources larger than 16KB will be moved to the purgeable memory.
    6483
    6584        * WebCore.base.exp:
  • trunk/WebCore/html/HTMLTokenizer.cpp

    r38729 r38748  
    234234    m_doctypeSearchCount = 0;
    235235    m_doctypeSecondarySearchCount = 0;
     236    m_hasScriptsWaitingForStylesheets = false;
    236237}
    237238
     
    19911992        finished = m_pendingScripts.isEmpty();
    19921993        if (finished) {
     1994            ASSERT(!m_hasScriptsWaitingForStylesheets);
    19931995            m_state.setLoadingExtScript(false);
    19941996#ifdef INSTRUMENT_LAYOUT_SCHEDULING
     
    19961998                printf("external script finished execution at %d\n", m_doc->elapsedTime());
    19971999#endif
     2000        } else if (m_hasScriptsWaitingForStylesheets) {
     2001            // m_hasScriptsWaitingForStylesheets flag might have changed during the script execution.
     2002            // If it did we are now blocked waiting for stylesheets and should not execute more scripts until they arrive.
     2003            finished = true;
    19982004        }
    19992005
Note: See TracChangeset for help on using the changeset viewer.