webengine/osswebengine/WebCore/loader/DocumentLoader.cpp
branchRCL_3
changeset 93 79859ed3eea9
parent 92 e1bea15f9a39
child 94 919f36ff910f
equal deleted inserted replaced
92:e1bea15f9a39 93:79859ed3eea9
   246 void DocumentLoader::mainReceivedError(const ResourceError& error, bool isComplete)
   246 void DocumentLoader::mainReceivedError(const ResourceError& error, bool isComplete)
   247 {
   247 {
   248     if (!frameLoader())
   248     if (!frameLoader())
   249         return;
   249         return;
   250     setMainDocumentError(error);
   250     setMainDocumentError(error);
   251     //During LWS for invalid webpage framloader was returning Null which is causing Dataabort panic 
   251     if (isComplete)
   252     if (isComplete && frameLoader())
       
   253         frameLoader()->mainReceivedCompleteError(this, error);
   252         frameLoader()->mainReceivedCompleteError(this, error);
   254 }
   253 }
   255 
   254 
   256 // Cancels the data source's pending loads.  Conceptually, a data source only loads
   255 // Cancels the data source's pending loads.  Conceptually, a data source only loads
   257 // one document at a time, but one document may have many related resources. 
   256 // one document at a time, but one document may have many related resources. 
   356 
   355 
   357     commitIfReady();
   356     commitIfReady();
   358     if (FrameLoader* frameLoader = DocumentLoader::frameLoader())
   357     if (FrameLoader* frameLoader = DocumentLoader::frameLoader())
   359 #if PLATFORM(SYMBIAN)
   358 #if PLATFORM(SYMBIAN)
   360     {
   359     {
   361     unsigned int needMemory = length * 4;
   360     unsigned int needMemory = length * 16;
   362     if(needMemory >= 1024*1024) {
   361     if(needMemory >= 1024*1024) {
   363         OOM_PRE_CHECK(needMemory, 0, "DocumentLoader::commitLoad");
   362         OOM_PRE_CHECK(needMemory, 0, "DocumentLoader::commitLoad");
   364 #endif    
   363 #endif    
   365         frameLoader->committedLoad(this, data, length);
   364         frameLoader->committedLoad(this, data, length);
   366 #if PLATFORM(SYMBIAN)
   365 #if PLATFORM(SYMBIAN)
   417 }
   416 }
   418 
   417 
   419 void DocumentLoader::updateLoading()
   418 void DocumentLoader::updateLoading()
   420 {
   419 {
   421     ASSERT(this == frameLoader()->activeDocumentLoader());
   420     ASSERT(this == frameLoader()->activeDocumentLoader());
   422     if(m_frame)
   421     setLoading(frameLoader()->isLoading());
   423         setLoading(frameLoader()->isLoading());
       
   424 }
   422 }
   425 
   423 
   426 void DocumentLoader::setFrame(Frame* frame)
   424 void DocumentLoader::setFrame(Frame* frame)
   427 {
   425 {
   428     if (m_frame == frame)
   426     if (m_frame == frame)
   711 }
   709 }
   712 
   710 
   713 bool DocumentLoader::startLoadingMainResource(unsigned long identifier)
   711 bool DocumentLoader::startLoadingMainResource(unsigned long identifier)
   714 {
   712 {
   715     ASSERT(!m_mainResourceLoader);
   713     ASSERT(!m_mainResourceLoader);
   716     MemoryManager::ResetOOMDialogDisplayed();
       
   717     m_mainResourceLoader = MainResourceLoader::create(m_frame);
   714     m_mainResourceLoader = MainResourceLoader::create(m_frame);
   718     m_mainResourceLoader->setIdentifier(identifier);
   715     m_mainResourceLoader->setIdentifier(identifier);
   719 
   716 
   720     // FIXME: Is there any way the extra fields could have not been added by now?
   717     // FIXME: Is there any way the extra fields could have not been added by now?
   721     // If not, it would be great to remove this line of code.
   718     // If not, it would be great to remove this line of code.