Changeset 20587 for S60/trunk/WebCore

Show
Ignore:
Timestamp:
03/29/07 13:36:11 (22 months ago)
Author:
yongjzha
Message:

yongjzha <yongjun.zhang@nokia.com>

Reviewed by Zalan <zbujtas@gmail.com>
DESC: refreshing crashes the browser on some sites (kauppalehti.fi, hs.fi)

fix: stop the tokenizer timer when switching to final document from preview document.

http://bugs.webkit.org/show_bug.cgi?id=13219

  • khtml/html/htmltokenizer.cpp: (khtml::):
  • khtml/html/htmltokenizer.h:
  • khtml/khtml_part.cpp: (KHTMLPart::switchToDocWithPendingSrc):
Location:
S60/trunk/WebCore
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • S60/trunk/WebCore/ChangeLog

    r20586 r20587  
     1yongjzha  <yongjun.zhang@nokia.com> 
     2 
     3        Reviewed by Zalan <zbujtas@gmail.com> 
     4        DESC: refreshing crashes the browser on some sites (kauppalehti.fi, hs.fi) 
     5              fix: stop the tokenizer timer when switching to final document from preview document. 
     6 
     7        http://bugs.webkit.org/show_bug.cgi?id=13219 
     8 
     9 
     10        * khtml/html/htmltokenizer.cpp: 
     11        (khtml::): 
     12        * khtml/html/htmltokenizer.h: 
     13        * khtml/khtml_part.cpp: 
     14        (KHTMLPart::switchToDocWithPendingSrc): 
     15 
    116bujtas  <zbujtas@gmail.com> 
    217 
  • S60/trunk/WebCore/khtml/html/htmltokenizer.cpp

    r19501 r20587  
    19781978} 
    19791979 
     1980 
     1981#if NOKIA_CHANGES 
     1982// fix mysterious crash after switching to final documents. 
     1983void HTMLTokenizer::stopFutureParsing() 
     1984{ 
     1985    if (timerId) { 
     1986        killTimer(timerId); 
     1987        timerId = 0; 
     1988        end(); 
     1989    } 
     1990} 
     1991#endif 
     1992 
    19801993void HTMLTokenizer::end() 
    19811994{ 
  • S60/trunk/WebCore/khtml/html/htmltokenizer.h

    r18939 r20587  
    140140    bool isExecutingDocumentWrite() { return executingDocumentWrite; } 
    141141    bool isExecutingExternalScript() { return executingExternalScript; } 
     142    void stopFutureParsing(); 
    142143#endif 
    143144 
  • S60/trunk/WebCore/khtml/khtml_part.cpp

    r19406 r20587  
    6363#include "xml/dom2_rangeimpl.h" 
    6464#include "xml/xml_tokenizer.h" 
     65#include "html/HTMLTokenizer.h" 
    6566 
    6667using namespace DOM; 
     
    61646165void KHTMLPart::switchToDocWithPendingSrc() 
    61656166{ 
    6166         d->m_doc->finishParsing(); 
    61676167        DocumentImpl* oldDoc = d->m_doc; 
     6168        if( oldDoc ) { 
     6169            oldDoc->finishParsing(); 
     6170            if (oldDoc->tokenizer()) { 
     6171                static_cast<khtml::HTMLTokenizer*>(oldDoc->tokenizer())->stopFutureParsing(); 
     6172            } 
     6173        } 
    61686174 
    61696175        // create the real display doc