WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
HMNN-6YLEHJ -- Browser crashes when selecting No to confirmation dialog
yinxcai.patch (text/plain), 13.12 KB, created by
Yinxiu Cai
on 2007-02-27 09:32:12 PST
(
hide
)
Description:
HMNN-6YLEHJ -- Browser crashes when selecting No to confirmation dialog
Filename:
MIME Type:
Creator:
Yinxiu Cai
Created:
2007-02-27 09:32:12 PST
Size:
13.12 KB
patch
obsolete
>Index: WebKit/ChangeLog >=================================================================== >--- WebKit/ChangeLog (revision 19885) >+++ WebKit/ChangeLog (working copy) >@@ -1,3 +1,28 @@ >+yinxcai, reviewed by <Sachin> >+ DESC: HMNN-6YLEHJ -- Browser crashes when selecting No for "Opening a secure >+connection.Content cannot be seen by anyone else." >+ http://bugs.webkit.org/show_bug.cgi?id=12858 >+ >+ * ResourceLoader/inc/AboutLoader.h: >+ * ResourceLoader/inc/BaseTransaction.h: >+ * ResourceLoader/inc/BufferLoader.h: >+ * ResourceLoader/inc/DataLoader.h: >+ * ResourceLoader/inc/FileLoader.h: >+ * ResourceLoader/inc/HttpLoader.h: >+ * ResourceLoader/src/AboutLoader.cpp: >+ (CAboutLoader::HandleSpecialEventL): >+ * ResourceLoader/src/BufferLoader.cpp: >+ (CBufferLoader::HandleSpecialEventL): >+ * ResourceLoader/src/DataLoader.cpp: >+ (CDataLoader::HandleSpecialEventL): >+ * ResourceLoader/src/FileLoader.cpp: >+ (CFileLoader::HandleSpecialEventL): >+ * ResourceLoader/src/HttpLoader.cpp: >+ (CHttpLoader::HandleSpecialEventL): >+ (CHttpLoader::CheckForNonHttpRedirect): >+ * ResourceLoader/src/HttpTransaction.cpp: >+ (CHttpTransaction::MHFRunL): >+ > spadma, reviewed by <Yongjun> > DESC: Urls are doubly encoded. TSW ID: HIIN-6YMGYV > >Index: WebKit/ResourceLoader/inc/AboutLoader.h >=================================================================== >--- WebKit/ResourceLoader/inc/AboutLoader.h (revision 19805) >+++ WebKit/ResourceLoader/inc/AboutLoader.h (working copy) >@@ -98,9 +98,9 @@ class CAboutLoader : public CUrlLoader > * @since 3.1 > * @param aTransaction Observed transaction. > * @param aEvent Event to be processed >- * @return >+ * @return TInt > */ >- void HandleSpecialEventL( CBaseTransaction& aTransaction, TInt aEvent ); >+ TInt HandleSpecialEventL( CBaseTransaction& aTransaction, TInt aEvent ); > > protected: // from CUrlLoader > >Index: WebKit/ResourceLoader/inc/BaseTransaction.h >=================================================================== >--- WebKit/ResourceLoader/inc/BaseTransaction.h (revision 19805) >+++ WebKit/ResourceLoader/inc/BaseTransaction.h (working copy) >@@ -115,9 +115,9 @@ class MTransactionObserver > * @since 3.1 > * @param aTransaction Observed transaction. > * @param aEvent Event to be processed >- * @return >+ * @return TInt > */ >- virtual void HandleSpecialEventL( CBaseTransaction& aTransaction, TInt aEvent ) = 0; >+ virtual TInt HandleSpecialEventL( CBaseTransaction& aTransaction, TInt aEvent ) = 0; > > /** > * This function is called when an error happens to the transaction. >Index: WebKit/ResourceLoader/inc/BufferLoader.h >=================================================================== >--- WebKit/ResourceLoader/inc/BufferLoader.h (revision 19805) >+++ WebKit/ResourceLoader/inc/BufferLoader.h (working copy) >@@ -112,9 +112,9 @@ class CBufferLoader : public CUrlLoader > * @since 3.1 > * @param aTransaction Observed transaction. > * @param aEvent Event to be processed >- * @return >+ * @return TInt > */ >- void HandleSpecialEventL( CBaseTransaction& aTransaction, TInt aEvent ); >+ TInt HandleSpecialEventL( CBaseTransaction& aTransaction, TInt aEvent ); > > protected: // from CUrlLoader > >Index: WebKit/ResourceLoader/inc/DataLoader.h >=================================================================== >--- WebKit/ResourceLoader/inc/DataLoader.h (revision 19805) >+++ WebKit/ResourceLoader/inc/DataLoader.h (working copy) >@@ -98,9 +98,9 @@ class CDataLoader : public CUrlLoader > * @since 3.1 > * @param aTransaction Observed transaction. > * @param aEvent Event to be processed >- * @return >+ * @return TInt > */ >- void HandleSpecialEventL( CBaseTransaction& aTransaction, TInt aEvent ); >+ TInt HandleSpecialEventL( CBaseTransaction& aTransaction, TInt aEvent ); > > protected: // from CUrlLoader > >Index: WebKit/ResourceLoader/inc/FileLoader.h >=================================================================== >--- WebKit/ResourceLoader/inc/FileLoader.h (revision 19805) >+++ WebKit/ResourceLoader/inc/FileLoader.h (working copy) >@@ -109,9 +109,9 @@ class CFileLoader : public CUrlLoader > * @since 3.1 > * @param aTransaction Observed transaction. > * @param aEvent Event to be processed >- * @return >+ * @return TInt > */ >- void HandleSpecialEventL( CBaseTransaction& aTransaction, TInt aEvent ); >+ TInt HandleSpecialEventL( CBaseTransaction& aTransaction, TInt aEvent ); > > protected: // from CUrlLoader > >Index: WebKit/ResourceLoader/inc/HttpLoader.h >=================================================================== >--- WebKit/ResourceLoader/inc/HttpLoader.h (revision 19805) >+++ WebKit/ResourceLoader/inc/HttpLoader.h (working copy) >@@ -156,9 +156,9 @@ class CHttpLoader : public CUrlLoader > * @since 3.1 > * @param aTransaction Observed transaction. > * @param aEvent Event to be processed >- * @return >+ * @return TInt > */ >- void HandleSpecialEventL( CBaseTransaction& aTransaction, TInt aEvent ); >+ TInt HandleSpecialEventL( CBaseTransaction& aTransaction, TInt aEvent ); > > /** > * This function is called when an error happens to the transaction. >@@ -267,7 +267,7 @@ class CHttpLoader : public CUrlLoader > > TInt CheckSecurityStatus(TBool aSecureScheme, TBool aTopLevel, CUrlRequestInfo* aRequestInfo); > >- void CheckForNonHttpRedirect(CBaseTransaction& aTransaction); >+ TInt CheckForNonHttpRedirect(CBaseTransaction& aTransaction); > > private: // Data > >Index: WebKit/ResourceLoader/src/AboutLoader.cpp >=================================================================== >--- WebKit/ResourceLoader/src/AboutLoader.cpp (revision 19805) >+++ WebKit/ResourceLoader/src/AboutLoader.cpp (working copy) >@@ -127,10 +127,11 @@ void CAboutLoader::CloseL() > // > // ----------------------------------------------------------------------------- > // >-void CAboutLoader::HandleSpecialEventL( >+TInt CAboutLoader::HandleSpecialEventL( > CBaseTransaction& /*aTransaction*/, > TInt /*aEvent*/ ) > { >+ return KErrNone; > } > > // ----------------------------------------------------------------------------- >Index: WebKit/ResourceLoader/src/BufferLoader.cpp >=================================================================== >--- WebKit/ResourceLoader/src/BufferLoader.cpp (revision 19805) >+++ WebKit/ResourceLoader/src/BufferLoader.cpp (working copy) >@@ -146,10 +146,11 @@ void CBufferLoader::CloseL() > // > // ----------------------------------------------------------------------------- > // >-void CBufferLoader::HandleSpecialEventL( >+TInt CBufferLoader::HandleSpecialEventL( > CBaseTransaction& /*aTransaction*/, > TInt /*aEvent*/ ) > { >+ return KErrNone; > } > > // ----------------------------------------------------------------------------- >Index: WebKit/ResourceLoader/src/DataLoader.cpp >=================================================================== >--- WebKit/ResourceLoader/src/DataLoader.cpp (revision 19805) >+++ WebKit/ResourceLoader/src/DataLoader.cpp (working copy) >@@ -127,10 +127,11 @@ void CDataLoader::CloseL() > // > // ----------------------------------------------------------------------------- > // >-void CDataLoader::HandleSpecialEventL( >+TInt CDataLoader::HandleSpecialEventL( > CBaseTransaction& /*aTransaction*/, > TInt /*aEvent*/ ) > { >+ return KErrNone; > } > > // ----------------------------------------------------------------------------- >Index: WebKit/ResourceLoader/src/FileLoader.cpp >=================================================================== >--- WebKit/ResourceLoader/src/FileLoader.cpp (revision 19805) >+++ WebKit/ResourceLoader/src/FileLoader.cpp (working copy) >@@ -150,10 +150,11 @@ void CFileLoader::CloseL() > // > // ----------------------------------------------------------------------------- > // >-void CFileLoader::HandleSpecialEventL( >+TInt CFileLoader::HandleSpecialEventL( > CBaseTransaction& /*aTransaction*/, > TInt /*aEvent*/ ) > { >+ return KErrNone; > } > > // ----------------------------------------------------------------------------- >Index: WebKit/ResourceLoader/src/HttpLoader.cpp >=================================================================== >--- WebKit/ResourceLoader/src/HttpLoader.cpp (revision 19805) >+++ WebKit/ResourceLoader/src/HttpLoader.cpp (working copy) >@@ -406,17 +406,17 @@ void CHttpLoader::CloseL() > // > // ----------------------------------------------------------------------------- > // >-void CHttpLoader::HandleSpecialEventL( >+TInt CHttpLoader::HandleSpecialEventL( > CBaseTransaction& aTransaction, > TInt aEvent ) > { >+ TInt ret( KErrNone ); >+ > switch( aEvent ) > { > case THTTPEvent::ERedirectRequiresConfirmation: > { > // Display a Redirect Confirmation dialog, before proceeding >- TInt ret( KErrNone ); >- > ret = iHttpLoaderToUiEventListener->AboutToLoadPage( ERedirectConfirmation ); > > if( ret == KErrNone ) >@@ -426,22 +426,25 @@ void CHttpLoader::HandleSpecialEventL( > RHTTPTransaction* httpTrans = trans.HttpTransaction(); > > TRAP( ret, httpTrans->SubmitL() ); >+ return ret; > } > else > { >- aTransaction.CancelTransaction( KErrCancel ); >+ return KErrCancel; > } > break; > } >- case THTTPEvent::ERedirectedPermanently: >+ case THTTPEvent::ERedirectedPermanently: > case THTTPEvent::ERedirectedTemporarily: >- if(CheckForSecurityStatusChange(aTransaction) != KErrNone) >- { >- aTransaction.CancelTransaction( KErrCancel ); >- } >- else >- CheckForNonHttpRedirect(aTransaction); >- break; >+ if(CheckForSecurityStatusChange(aTransaction) != KErrNone) >+ { >+ return KErrCancel; >+ } >+ else >+ { >+ return CheckForNonHttpRedirect(aTransaction); >+ } >+ break; > case KErrNotSupported: > { > // get download manager >@@ -469,6 +472,7 @@ void CHttpLoader::HandleSpecialEventL( > break; > } > } >+ return ret; > } > > // ----------------------------------------------------------------------------- >@@ -786,7 +790,7 @@ TInt CHttpLoader::CancelAllAuthenticatio > return status; > } > >-void CHttpLoader::CheckForNonHttpRedirect(CBaseTransaction& aTransaction) >+TInt CHttpLoader::CheckForNonHttpRedirect(CBaseTransaction& aTransaction) > { > > RHTTPTransaction* httpTrans = ((CHttpTransaction&)aTransaction).HttpTransaction(); >@@ -842,10 +846,11 @@ void CHttpLoader::CheckForNonHttpRedirec > delete desArray; > } > >- aTransaction.CancelTransaction( KErrCancel ); >+ return KErrCancel; > } > } > } >+ return KErrNone; > } > > // End of File >Index: WebKit/ResourceLoader/src/HttpTransaction.cpp >=================================================================== >--- WebKit/ResourceLoader/src/HttpTransaction.cpp (revision 19805) >+++ WebKit/ResourceLoader/src/HttpTransaction.cpp (working copy) >@@ -373,8 +373,13 @@ void CHttpTransaction::MHFRunL( > } > case THTTPEvent::ERedirectRequiresConfirmation: > { >- iTransactionObserver->HandleSpecialEventL( *this, >+ TInt ret = iTransactionObserver->HandleSpecialEventL( *this, > THTTPEvent::ERedirectRequiresConfirmation ); >+ //check return value >+ if (ret == KErrCancel) >+ { >+ CancelTransaction( KErrCancel ); >+ } > break; > } > case THTTPEvent::ERedirectedPermanently: >@@ -401,10 +406,17 @@ void CHttpTransaction::MHFRunL( > iFragment = HBufC::NewL( fragment.Length() ); > iFragment->Des().Copy( fragment ); > } >- iTransactionObserver->HandleSpecialEventL( *this, aEvent.iStatus ); >+ >+ TInt ret = iTransactionObserver->HandleSpecialEventL( *this, aEvent.iStatus ); > //set the redirection flag > SetIsRedirected(ETrue); > iUrlRequestInfo->SetRedirectedUrlL( aTransaction.Request().URI().UriDes() ); >+ >+ //check return value >+ if (ret == KErrCancel) >+ { >+ CancelTransaction( KErrCancel ); >+ } > break; > } > case THTTPEvent::EGotResponseTrailerHeaders:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
Sachin.Padma
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 12858
:
13331
|
13348
|
13380
|
13384
|
13401
| 13402