Title: [154490] trunk/Source/WebKit2
- Revision
- 154490
- Author
- [email protected]
- Date
- 2013-08-23 09:51:13 -0700 (Fri, 23 Aug 2013)
Log 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.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (154489 => 154490)
--- trunk/Source/WebKit2/ChangeLog 2013-08-23 16:50:38 UTC (rev 154489)
+++ trunk/Source/WebKit2/ChangeLog 2013-08-23 16:51:13 UTC (rev 154490)
@@ -1,3 +1,23 @@
+2013-08-23 Alexey Proskuryakov <[email protected]>
+
+ [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 <[email protected]>
[GTK] Wrong interface version used in WebKitWebPage for loader client
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp (154489 => 154490)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp 2013-08-23 16:50:38 UTC (rev 154489)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp 2013-08-23 16:51:13 UTC (rev 154490)
@@ -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 @@
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;
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h (154489 => 154490)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h 2013-08-23 16:50:38 UTC (rev 154489)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h 2013-08-23 16:51:13 UTC (rev 154490)
@@ -44,6 +44,8 @@
static void destroyPrivateBrowsingSession();
static void setCookieAcceptPolicyForAllContexts(HTTPCookieAcceptPolicy);
+ WebFrameLoaderClient* webFrameLoaderClient() const;
+
private:
WebFrameNetworkingContext(WebFrame* frame)
: WebCore::FrameNetworkingContext(frame->coreFrame())
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm (154489 => 154490)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm 2013-08-23 16:50:38 UTC (rev 154489)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm 2013-08-23 16:51:13 UTC (rev 154490)
@@ -123,4 +123,12 @@
return NetworkStorageSession::defaultStorageSession();
}
+WebFrameLoaderClient* WebFrameNetworkingContext::webFrameLoaderClient() const
+{
+ if (!frame())
+ return 0;
+
+ return toWebFrameLoaderClient(frame()->loader().client());
}
+
+}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes