Changeset 20686 for S60/trunk/WebKit

Show
Ignore:
Timestamp:
04/03/07 13:50:30 (22 months ago)
Author:
spadma
Message:

2007-03-30 ligman <joseph.ligman@nokia.com>

Reviewed by Sachin.
DESC: When the request dispatcher does not define a loader

no pending transaction will exist, so set this undefined status
to KErrCancel so the callers don't wait indefinitely. Also, create, use,
and close the download property string when it's needed to avoid closing
the rstring after the string pool which it's using has somehow gone away.

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

  • BrowserView/src/WebKitLoader.cpp: (CWebKitLoader::LoadPageL):
  • ResourceLoader/inc/BaseTransaction.h:
  • ResourceLoader/src/HttpTransaction.cpp: (CHttpTransaction::~CHttpTransaction): (CHttpTransaction::MHFRunL): (CHttpTransaction::MHFRunError): (CHttpTransaction::HandleGotResponseHeadersL):
Location:
S60/trunk/WebKit
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • S60/trunk/WebKit/BrowserView/src/WebKitLoader.cpp

    r20408 r20686  
    284284            } 
    285285         } 
     286    else if ( status == KErrNone && !urlLoader )  //There is no pending transaction when the urlloader  
     287        {                                         //does not exist. For lack of a better solution, setting  
     288        status = KErrCancel;                      //the status to KErrCancel so the callers don't wait indefinitely. 
     289        }          
     290 
    286291    return status; 
    287292    } 
  • S60/trunk/WebKit/ChangeLog

    r20682 r20686  
     12007-03-30  ligman  <joseph.ligman@nokia.com> 
     2 
     3        Reviewed by Sachin. 
     4        DESC: When the request dispatcher does not define a loader  
     5              no pending transaction will exist, so set this undefined status  
     6              to KErrCancel so the callers don't wait indefinitely. Also, create, use, 
     7              and close the download property string when it's needed to avoid closing 
     8              the rstring after the string pool which it's using has somehow gone away.         
     9        http://bugs.webkit.org/show_bug.cgi?id=13232 
     10 
     11        * BrowserView/src/WebKitLoader.cpp: 
     12        (CWebKitLoader::LoadPageL): 
     13        * ResourceLoader/inc/BaseTransaction.h: 
     14        * ResourceLoader/src/HttpTransaction.cpp: 
     15        (CHttpTransaction::~CHttpTransaction): 
     16        (CHttpTransaction::MHFRunL): 
     17        (CHttpTransaction::MHFRunError): 
     18        (CHttpTransaction::HandleGotResponseHeadersL): 
     19         
    120rathnasa, reviewed by Yongjun. 
    221 DESC: Reset the iDownloadContent flag properly. 
  • S60/trunk/WebKit/ResourceLoader/inc/BaseTransaction.h

    r19915 r20686  
    484484      // != -1 if donwloadmanager has this transaction 
    485485      TInt32            iDownloadId; 
    486       // downloadmanager's property 
    487       RStringF          iDownloadPropStr; 
    488486      // 
    489487      CPeriodic*        iSubmitTimer;   // owned 
  • S60/trunk/WebKit/ResourceLoader/src/HttpTransaction.cpp

    r20659 r20686  
    213213    delete iPBuf; 
    214214    dead = ETrue; 
    215    
    216   if (iCacheSupply)    
    217     { 
    218     iCacheSupply->CloseRequest();  
    219     } 
    220      
     215 
     216    if (iCacheSupply)    
     217        { 
     218        iCacheSupply->CloseRequest();  
     219        } 
     220 
    221221    if( iDownloadId == -1 && iTrans ) 
    222222        { 
    223     iDownloadPropStr.Close();            
    224223        // close transaction 
    225224        iTrans->Close(); 
    226225        delete iTrans;  
    227226        } 
    228          
     227 
    229228    delete iCacheSupply; 
    230   delete iPostDataSupplier; 
     229    delete iPostDataSupplier; 
    231230    } 
    232231 
     
    298297        { 
    299298        THTTPHdrVal callback; 
    300         RStringPool strPool = aTransaction.Session().StringPool(); 
     299        RStringF downloadPropStr = aTransaction.Session().StringPool().OpenFStringL( _L8( "TransactionCallback" ) ); 
    301300        RHTTPTransactionPropertySet propSet = aTransaction.PropertySet(); 
    302  
    303301        // this is a transaction, already forwarded to download manager 
    304         if( propSet.Property( iDownloadPropStr, callback ) ) 
     302        if( propSet.Property( downloadPropStr, callback ) ) 
    305303            { 
    306304            MHTTPTransactionCallback* callbackPtr = REINTERPRET_CAST(  
     
    317315            __ASSERT_DEBUG( EFalse, TLoaderUtils::PanicLoader( KErrGeneral ) ); 
    318316            } 
     317        downloadPropStr.Close();             
    319318        } 
    320319    else 
     
    449448    if( iDownloadId != -1 ) 
    450449        { 
    451         THTTPHdrVal callback; 
     450         
     451        // save downloadmanager callback property id 
     452        RStringF downloadPropStr = aTransaction.Session().StringPool().OpenFStringL( _L8( "TransactionCallback" ) ); 
     453         
     454        THTTPHdrVal callback;         
    452455        RHTTPTransactionPropertySet propSet = aTransaction.PropertySet(); 
    453  
    454         if( propSet.Property( iDownloadPropStr, callback ) ) 
     456        if( propSet.Property( downloadPropStr, callback ) ) 
    455457            { 
    456458            MHTTPTransactionCallback* callbackPtr = REINTERPRET_CAST(  
     
    467469            __ASSERT_DEBUG( EFalse, TLoaderUtils::PanicLoader( KErrGeneral ) ); 
    468470            } 
     471             
     472        downloadPropStr.Close(); 
     473         
    469474        } 
    470475    else 
     
    686691            // close cache item as it is handled by the download mgr 
    687692            iCacheSupply->CloseRequest(); 
    688       } 
    689             // save downloadmanager callback property id 
    690             iDownloadPropStr = iTrans->Session().StringPool().OpenFStringL( _L8( "TransactionCallback" ) ); 
     693      }             
    691694            // turn off pipelining 
    692695            CLoaderContainer* loaderContainer = static_cast<CLoaderContainer*>