Title: [122692] trunk/Source/WebCore
- Revision
- 122692
- Author
- [email protected]
- Date
- 2012-07-15 19:53:19 -0700 (Sun, 15 Jul 2012)
Log Message
[BlackBerry] We shouldn't call didFinishLoading for the old request when a new request has been sent by notifyAuthReceived.
https://bugs.webkit.org/show_bug.cgi?id=90962
Reviewed by Rob Buis.
We start a new NetworkJob with credentials after receiving 401/407 status.
We should not release resources in webcore when the old job is closed because
they are needed by the new one.
We should do as 3XX.
No new tests. No change in behaviour.
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::NetworkJob):
(WebCore::NetworkJob::notifyAuthReceived):
(WebCore::NetworkJob::shouldReleaseClientResource):
(WebCore::NetworkJob::handleRedirect):
* platform/network/blackberry/NetworkJob.h:
(NetworkJob):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (122691 => 122692)
--- trunk/Source/WebCore/ChangeLog 2012-07-16 02:29:28 UTC (rev 122691)
+++ trunk/Source/WebCore/ChangeLog 2012-07-16 02:53:19 UTC (rev 122692)
@@ -1,3 +1,25 @@
+2012-07-15 Jason Liu <[email protected]>
+
+ [BlackBerry] We shouldn't call didFinishLoading for the old request when a new request has been sent by notifyAuthReceived.
+ https://bugs.webkit.org/show_bug.cgi?id=90962
+
+ Reviewed by Rob Buis.
+
+ We start a new NetworkJob with credentials after receiving 401/407 status.
+ We should not release resources in webcore when the old job is closed because
+ they are needed by the new one.
+ We should do as 3XX.
+
+ No new tests. No change in behaviour.
+
+ * platform/network/blackberry/NetworkJob.cpp:
+ (WebCore::NetworkJob::NetworkJob):
+ (WebCore::NetworkJob::notifyAuthReceived):
+ (WebCore::NetworkJob::shouldReleaseClientResource):
+ (WebCore::NetworkJob::handleRedirect):
+ * platform/network/blackberry/NetworkJob.h:
+ (NetworkJob):
+
2012-07-15 Ryosuke Niwa <[email protected]>
REGRESSION(r122660): Cannot iterate over HTMLCollection that contains non-child descendent nodes in some conditions
Modified: trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp (122691 => 122692)
--- trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp 2012-07-16 02:29:28 UTC (rev 122691)
+++ trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp 2012-07-16 02:53:19 UTC (rev 122692)
@@ -83,6 +83,7 @@
, m_callingClient(false)
, m_needsRetryAsFTPDirectory(false)
, m_isOverrideContentType(false)
+ , m_newJobWithCredentialsStarted(false)
, m_extendedStatusCode(0)
, m_redirectCount(0)
, m_deferredData(*this)
@@ -282,7 +283,7 @@
return;
}
- sendRequestWithCredentials(serverType, scheme, realm);
+ m_newJobWithCredentialsStarted = sendRequestWithCredentials(serverType, scheme, realm);
}
void NetworkJob::notifyStringHeaderReceived(const String& key, const String& value)
@@ -505,15 +506,8 @@
bool NetworkJob::shouldReleaseClientResource()
{
- if (m_redirectCount >= s_redirectMaximum)
- return true;
-
- if (m_needsRetryAsFTPDirectory && retryAsFTPDirectory())
+ if ((m_needsRetryAsFTPDirectory && retryAsFTPDirectory()) || (isRedirect(m_extendedStatusCode) && handleRedirect()) || m_newJobWithCredentialsStarted)
return false;
-
- if (isRedirect(m_extendedStatusCode) && handleRedirect())
- return false;
-
return true;
}
@@ -576,7 +570,7 @@
bool NetworkJob::handleRedirect()
{
ASSERT(m_handle);
- if (!m_handle)
+ if (!m_handle || m_redirectCount >= s_redirectMaximum)
return false;
String location = m_response.httpHeaderField("Location");
Modified: trunk/Source/WebCore/platform/network/blackberry/NetworkJob.h (122691 => 122692)
--- trunk/Source/WebCore/platform/network/blackberry/NetworkJob.h 2012-07-16 02:29:28 UTC (rev 122691)
+++ trunk/Source/WebCore/platform/network/blackberry/NetworkJob.h 2012-07-16 02:53:19 UTC (rev 122692)
@@ -165,6 +165,7 @@
bool m_callingClient;
bool m_needsRetryAsFTPDirectory;
bool m_isOverrideContentType;
+ bool m_newJobWithCredentialsStarted;
// If an HTTP status code is received, m_extendedStatusCode and m_response.httpStatusCode will both be set to it.
// If a platform error code is received, m_extendedStatusCode will be set to it and m_response.httpStatusCode will be set to 404.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes