[webkit-dev] Fix for Qt build

Holger Freyther zecke at selfish.org
Sat May 12 07:59:05 PDT 2007

Am 12.05.2007 um 13:28 schrieb Holger Freyther:

> Am 12.05.2007 um 12:32 schrieb Maciej Stachowiak:
>> I can't check this in right now because the SVN server is  
>> temporarily out of disk, but this appears to mostly fix the Qt  
>> build, at least in QtLauncher. Rob Buis helped me test and is  
>> running layout tests now.

the difference between Mac and Gdk is in  
FrameLoaderClient::canCachePage. If canCachePage returns false, clear 
() will be called which sets m_frame->d->m_doc->m_ptr to 0. And on  
load setEncoding comes after calling saveDocumentState. So there is  
no way to restore/has a valid document.

I don't know how to fix it, but at least this explains why it crashes  
on Gdk and not on Mac. I think we should review codepath's ending in  
a clear().

void FrameLoader::provisionalLoadStarted()
     m_firstLayoutDone = false;

     if (canCachePage()) {
         if (m_client->canCachePage()) {
             if (!m_currentHistoryItem->cachedPage()) {
         } else {
             // Put the document into a null state, so it can be  
restored correctly.·

PS: Now I can finally return to my text book

More information about the webkit-dev mailing list