⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 201593 in webkit


Ignore:
Timestamp:
Jun 1, 2016, 10:39:52 PM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Notify client immediately if network session doesn't exist for a synchronous XHR load.
https://bugs.webkit.org/show_bug.cgi?id=158239
<rdar://problem/26344251>

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2016-06-01
Reviewed by Brady Eidson.

For a synchronous XHR load, if the network session doesn't exist, we should notify NetworkLoadClient.
Otherwise the Web process could hang when waiting for the synchronous load to finish.

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::NetworkLoad):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r201592 r201593  
     12016-06-01  Yongjun Zhang  <yongjun_zhang@apple.com>
     2
     3        Notify client immediately if network session doesn't exist for a synchronous XHR load.
     4        https://bugs.webkit.org/show_bug.cgi?id=158239
     5        <rdar://problem/26344251>
     6
     7        Reviewed by Brady Eidson.
     8
     9        For a synchronous XHR load, if the network session doesn't exist, we should notify NetworkLoadClient.
     10        Otherwise the Web process could hang when waiting for the synchronous load to finish.
     11
     12        * NetworkProcess/NetworkLoad.cpp:
     13        (WebKit::NetworkLoad::NetworkLoad):
     14
    1152016-05-31  Brian Burg  <bburg@apple.com>
    216 
  • trunk/Source/WebKit2/NetworkProcess/NetworkLoad.cpp

    r199501 r201593  
    5858        if (!parameters.defersLoading)
    5959            m_task->resume();
    60     } else
     60    } else {
    6161        WTFLogAlways("Attempted to create a NetworkLoad with a session (id=%" PRIu64 ") that does not exist.", parameters.sessionID.sessionID());
     62        RunLoop::current().dispatch([this, url = parameters.request.url()] {
     63            didCompleteWithError(internalError(url));
     64        });
     65    }
    6266#else
    6367    m_handle = ResourceHandle::create(m_networkingContext.get(), parameters.request, this, parameters.defersLoading, parameters.contentSniffingPolicy == SniffContent);
Note: See TracChangeset for help on using the changeset viewer.