Title: [118655] trunk/Source/WebCore
Revision
118655
Author
commit-qu...@webkit.org
Date
2012-05-28 01:53:45 -0700 (Mon, 28 May 2012)

Log Message

[BlackBerry] http authentication crash the browser when user commit or cancel the http authentication dialog
https://bugs.webkit.org/show_bug.cgi?id=87579

Patch by Jonathan Dong <jonathan.d...@torchmobile.com.cn> on 2012-05-28
Reviewed by George Staikos.

In function NetworkJob::startNewJobWithRequest, We should cancel the
NetworkJob first before we start a new NetworkJob which reuses the
resource handle of the old one. If we only set the m_handle = 0 of the
old NetworkJob without cancelling itself, it will still receives data
notification from network thread and handles the received data with
the released resource handler, which will cause the crash.

No new tests because no behavior has changed.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::startNewJobWithRequest):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (118654 => 118655)


--- trunk/Source/WebCore/ChangeLog	2012-05-28 08:40:02 UTC (rev 118654)
+++ trunk/Source/WebCore/ChangeLog	2012-05-28 08:53:45 UTC (rev 118655)
@@ -1,3 +1,22 @@
+2012-05-28  Jonathan Dong  <jonathan.d...@torchmobile.com.cn>
+
+        [BlackBerry] http authentication crash the browser when user commit or cancel the http authentication dialog
+        https://bugs.webkit.org/show_bug.cgi?id=87579
+
+        Reviewed by George Staikos.
+
+        In function NetworkJob::startNewJobWithRequest, We should cancel the
+        NetworkJob first before we start a new NetworkJob which reuses the
+        resource handle of the old one. If we only set the m_handle = 0 of the
+        old NetworkJob without cancelling itself, it will still receives data
+        notification from network thread and handles the received data with
+        the released resource handler, which will cause the crash.
+
+        No new tests because no behavior has changed.
+
+        * platform/network/blackberry/NetworkJob.cpp:
+        (WebCore::NetworkJob::startNewJobWithRequest):
+
 2012-05-27  MORITA Hajime  <morr...@google.com>
 
         [Refactoring][ShadowDOM] Some ElementShadow methods can be inlined.

Modified: trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp (118654 => 118655)


--- trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp	2012-05-28 08:40:02 UTC (rev 118654)
+++ trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp	2012-05-28 08:53:45 UTC (rev 118655)
@@ -528,8 +528,7 @@
 
     // Pass the ownership of the ResourceHandle to the new NetworkJob.
     RefPtr<ResourceHandle> handle = m_handle;
-    m_handle = 0;
-    m_multipartResponse = nullptr;
+    cancelJob();
 
     NetworkManager::instance()->startJob(m_playerId,
         m_pageGroupName,
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to