Changeset 122692 in webkit


Ignore:
Timestamp:
Jul 15, 2012 7:53:19 PM (12 years ago)
Author:
jason.liu@torchmobile.com.cn
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):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r122689 r122692  
     12012-07-15  Jason Liu  <jason.liu@torchmobile.com.cn>
     2
     3        [BlackBerry] We shouldn't call didFinishLoading for the old request when a new request has been sent by notifyAuthReceived.
     4        https://bugs.webkit.org/show_bug.cgi?id=90962
     5
     6        Reviewed by Rob Buis.
     7
     8        We start a new NetworkJob with credentials after receiving 401/407 status.
     9        We should not release resources in webcore when the old job is closed because
     10        they are needed by the new one.
     11        We should do as 3XX.
     12
     13        No new tests. No change in behaviour.
     14
     15        * platform/network/blackberry/NetworkJob.cpp:
     16        (WebCore::NetworkJob::NetworkJob):
     17        (WebCore::NetworkJob::notifyAuthReceived):
     18        (WebCore::NetworkJob::shouldReleaseClientResource):
     19        (WebCore::NetworkJob::handleRedirect):
     20        * platform/network/blackberry/NetworkJob.h:
     21        (NetworkJob):
     22
    1232012-07-15  Ryosuke Niwa  <rniwa@webkit.org>
    224
  • trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp

    r122604 r122692  
    8484    , m_needsRetryAsFTPDirectory(false)
    8585    , m_isOverrideContentType(false)
     86    , m_newJobWithCredentialsStarted(false)
    8687    , m_extendedStatusCode(0)
    8788    , m_redirectCount(0)
     
    283284    }
    284285
    285     sendRequestWithCredentials(serverType, scheme, realm);
     286    m_newJobWithCredentialsStarted = sendRequestWithCredentials(serverType, scheme, realm);
    286287}
    287288
     
    506507bool NetworkJob::shouldReleaseClientResource()
    507508{
    508     if (m_redirectCount >= s_redirectMaximum)
    509         return true;
    510 
    511     if (m_needsRetryAsFTPDirectory && retryAsFTPDirectory())
     509    if ((m_needsRetryAsFTPDirectory && retryAsFTPDirectory()) || (isRedirect(m_extendedStatusCode) && handleRedirect()) || m_newJobWithCredentialsStarted)
    512510        return false;
    513 
    514     if (isRedirect(m_extendedStatusCode) && handleRedirect())
    515         return false;
    516 
    517511    return true;
    518512}
     
    577571{
    578572    ASSERT(m_handle);
    579     if (!m_handle)
     573    if (!m_handle || m_redirectCount >= s_redirectMaximum)
    580574        return false;
    581575
  • trunk/Source/WebCore/platform/network/blackberry/NetworkJob.h

    r122604 r122692  
    166166    bool m_needsRetryAsFTPDirectory;
    167167    bool m_isOverrideContentType;
     168    bool m_newJobWithCredentialsStarted;
    168169
    169170    // If an HTTP status code is received, m_extendedStatusCode and m_response.httpStatusCode will both be set to it.
Note: See TracChangeset for help on using the changeset viewer.