Changeset 154490 in webkit


Ignore:
Timestamp:
Aug 23, 2013 9:51:13 AM (11 years ago)
Author:
ap@apple.com
Message:

[WK2] Assertion failures when loading XSL stylesheets with NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=120186
<rdar://problem/14080273>

Reviewed by Brady Eidson.

Covered by many existing tests.

  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::loadResourceSynchronously): Pass frame ID and page ID.
They are mostly needed for authentication, which is not supported with sync requests,
but it will be supported some day.

  • WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
  • WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:

(WebKit::WebFrameNetworkingContext::webFrameLoaderClient):
Added a way to get frame loader client from WebKit NetworkingContext subclass.

Location:
trunk/Source/WebKit2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r154474 r154490  
     12013-08-23  Alexey Proskuryakov  <ap@apple.com>
     2
     3        [WK2] Assertion failures when loading XSL stylesheets with NetworkProcess
     4        https://bugs.webkit.org/show_bug.cgi?id=120186
     5        <rdar://problem/14080273>
     6
     7        Reviewed by Brady Eidson.
     8
     9        Covered by many existing tests.
     10
     11        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
     12        (WebKit::WebPlatformStrategies::loadResourceSynchronously): Pass frame ID and page ID.
     13        They are mostly needed for authentication, which is not supported with sync requests,
     14        but it will be supported some day.
     15
     16        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
     17        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
     18        (WebKit::WebFrameNetworkingContext::webFrameLoaderClient):
     19        Added a way to get frame loader client from WebKit NetworkingContext subclass.
     20
    1212013-08-22  Carlos Garcia Campos  <cgarcia@igalia.com>
    222
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp

    r154142 r154490  
    3636#include "WebCoreArgumentCoders.h"
    3737#include "WebErrors.h"
     38#include "WebFrameNetworkingContext.h"
    3839#include "WebPage.h"
    3940#include "WebProcess.h"
     
    234235    }
    235236
     237    WebFrameNetworkingContext* webContext = static_cast<WebFrameNetworkingContext*>(context);
     238    // FIXME: Some entities in WebCore use WebCore's "EmptyFrameLoaderClient" instead of having a proper WebFrameLoaderClient.
     239    // EmptyFrameLoaderClient shouldn't exist and everything should be using a WebFrameLoaderClient,
     240    // but in the meantime we have to make sure not to mis-cast.
     241    WebFrameLoaderClient* webFrameLoaderClient = webContext->webFrameLoaderClient();
     242    WebFrame* webFrame = webFrameLoaderClient ? webFrameLoaderClient->webFrame() : 0;
     243    WebPage* webPage = webFrame ? webFrame->page() : 0;
     244
    236245    CoreIPC::DataReference dataReference;
    237246
    238247    NetworkResourceLoadParameters loadParameters;
    239248    loadParameters.identifier = resourceLoadIdentifier;
     249    loadParameters.webPageID = webPage ? webPage->pageID() : 0;
     250    loadParameters.webFrameID = webFrame ? webFrame->frameID() : 0;
    240251    loadParameters.request = request;
    241252    loadParameters.priority = ResourceLoadPriorityHighest;
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h

    r151691 r154490  
    4545    static void setCookieAcceptPolicyForAllContexts(HTTPCookieAcceptPolicy);
    4646
     47    WebFrameLoaderClient* webFrameLoaderClient() const;
     48
    4749private:
    4850    WebFrameNetworkingContext(WebFrame* frame)
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm

    r154449 r154490  
    124124}
    125125   
     126WebFrameLoaderClient* WebFrameNetworkingContext::webFrameLoaderClient() const
     127{
     128    if (!frame())
     129        return 0;
     130
     131    return toWebFrameLoaderClient(frame()->loader().client());
    126132}
     133
     134}
Note: See TracChangeset for help on using the changeset viewer.