Skip to content
  • beidson@apple.com's avatar
    Synchronous XMLHTTPRequests need to go to the NetworkProcess. · 0c140b4e
    beidson@apple.com authored
    <rdar://problem/12951765> and https://bugs.webkit.org/show_bug.cgi?id=106826
    
    Reviewed by Sam Weinig and Alexey Proskuryakov.
    
    Source/WebCore:
    
    No new tests (No changes to any config that is currently tested)
    
    * loader/FrameLoader.cpp:
    (WebCore::FrameLoader::loadResourceSynchronously): Consult the LoaderStrategy when strategies are
      being used.
    
    * loader/LoaderStrategy.cpp:
    (WebCore::LoaderStrategy::loadResourceSynchronously): Defaults to using ResourceHandle directly.
    * loader/LoaderStrategy.h:
    
    Break out the StoredCredentials enum to a new header:
    * platform/network/ResourceHandle.h:
    * platform/network/ResourceHandleTypes.h:
    * GNUmakefile.list.am:
    * Target.pri:
    * WebCore.exp.in:
    * WebCore.vcproj/WebCore.vcproj:
    * WebCore.xcodeproj/project.pbxproj:
    
    Source/WebKit2:
    
    * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
    (WebKit::WebPlatformStrategies::loadResourceSynchronously): Entry point for WebCore to get
      synchronous requests to the NetworkProcess.
    * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
    
    * NetworkProcess/NetworkConnectionToWebProcess.cpp:
    (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad): Create a SyncNetworkResourceLoader
      and schedule it.
    * NetworkProcess/NetworkConnectionToWebProcess.h:
    * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
    
    * NetworkProcess/NetworkResourceLoadScheduler.cpp:
    (WebKit::NetworkResourceLoadScheduler::scheduleSyncNetworkResourceLoader):
    (WebKit::NetworkResourceLoadScheduler::servePendingRequestsForHost): Serve synchronous loaders
      before async loaders.
    * NetworkProcess/NetworkResourceLoadScheduler.h:
    
    A class that encapsulates a synchronous load request and the CoreIPC reply to be made once it is complete:
    * NetworkProcess/SyncNetworkResourceLoader.cpp: Added.
    (WebKit::SyncNetworkResourceLoader::SyncNetworkResourceLoader):
    (WebKit::SyncNetworkResourceLoader::start):
    * NetworkProcess/SyncNetworkResourceLoader.h: Copied from Source/WebKit2/NetworkProcess/HostRecord.h.
    (WebKit::SyncNetworkResourceLoader::create):
    (WebKit::SyncNetworkResourceLoader::setIdentifier):
    (WebKit::SyncNetworkResourceLoader::identifier):
    (WebKit::SyncNetworkResourceLoader::loadParameters):
    
    Add a second queue of sync loaders:
    * NetworkProcess/HostRecord.h:
    (WebKit::HostRecord::syncLoadersPending):
    
    Add comments to explicitly spell out the current reliance on some messages that are currently synchronous:
    * NetworkProcess/NetworkResourceLoader.cpp:
    (WebKit::NetworkResourceLoader::willSendRequest):
    (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpace):
    
    * WebKit2.xcodeproj/project.pbxproj:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    0c140b4e