Commit 22aa52a0 authored by ap@apple.com's avatar ap@apple.com
Browse files

[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.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154490 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3ab117a8
2013-08-23 Alexey Proskuryakov <ap@apple.com>
[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.
2013-08-22 Carlos Garcia Campos <cgarcia@igalia.com>
 
[GTK] Wrong interface version used in WebKitWebPage for loader client
......
......@@ -35,6 +35,7 @@
#include "WebCookieManager.h"
#include "WebCoreArgumentCoders.h"
#include "WebErrors.h"
#include "WebFrameNetworkingContext.h"
#include "WebPage.h"
#include "WebProcess.h"
#include "WebProcessProxyMessages.h"
......@@ -233,10 +234,20 @@ void WebPlatformStrategies::loadResourceSynchronously(NetworkingContext* context
return;
}
WebFrameNetworkingContext* webContext = static_cast<WebFrameNetworkingContext*>(context);
// FIXME: Some entities in WebCore use WebCore's "EmptyFrameLoaderClient" instead of having a proper WebFrameLoaderClient.
// EmptyFrameLoaderClient shouldn't exist and everything should be using a WebFrameLoaderClient,
// but in the meantime we have to make sure not to mis-cast.
WebFrameLoaderClient* webFrameLoaderClient = webContext->webFrameLoaderClient();
WebFrame* webFrame = webFrameLoaderClient ? webFrameLoaderClient->webFrame() : 0;
WebPage* webPage = webFrame ? webFrame->page() : 0;
CoreIPC::DataReference dataReference;
NetworkResourceLoadParameters loadParameters;
loadParameters.identifier = resourceLoadIdentifier;
loadParameters.webPageID = webPage ? webPage->pageID() : 0;
loadParameters.webFrameID = webFrame ? webFrame->frameID() : 0;
loadParameters.request = request;
loadParameters.priority = ResourceLoadPriorityHighest;
loadParameters.contentSniffingPolicy = SniffContent;
......
......@@ -44,6 +44,8 @@ public:
static void destroyPrivateBrowsingSession();
static void setCookieAcceptPolicyForAllContexts(HTTPCookieAcceptPolicy);
WebFrameLoaderClient* webFrameLoaderClient() const;
private:
WebFrameNetworkingContext(WebFrame* frame)
: WebCore::FrameNetworkingContext(frame->coreFrame())
......
......@@ -123,4 +123,12 @@ NetworkStorageSession& WebFrameNetworkingContext::storageSession() const
return NetworkStorageSession::defaultStorageSession();
}
WebFrameLoaderClient* WebFrameNetworkingContext::webFrameLoaderClient() const
{
if (!frame())
return 0;
return toWebFrameLoaderClient(frame()->loader().client());
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment