Title: [128112] trunk/Source/WebKit/mac
Revision
128112
Author
[email protected]
Date
2012-09-10 14:52:24 -0700 (Mon, 10 Sep 2012)

Log Message

NSInvalidArgumentException in WebFrameLoaderClient::shouldSendDoNotTrackHTTPHeader()
https://bugs.webkit.org/show_bug.cgi?id=96320

Reviewed by Geoffrey Garen.

Client was being cached as the FrameLoaderClient, but requests were sent to the ResourceLoadClient.

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::shouldSendDoNotTrackHTTPHeader): Send the request to the FrameLoadDelegate.
* WebView/WebDelegateImplementationCaching.h:
* WebView/WebDelegateImplementationCaching.mm:
(CallFrameLoadDelegateReturningBoolean): Added.

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (128111 => 128112)


--- trunk/Source/WebKit/mac/ChangeLog	2012-09-10 21:49:25 UTC (rev 128111)
+++ trunk/Source/WebKit/mac/ChangeLog	2012-09-10 21:52:24 UTC (rev 128112)
@@ -1,3 +1,18 @@
+2012-09-10  Jer Noble  <[email protected]>
+
+        NSInvalidArgumentException in WebFrameLoaderClient::shouldSendDoNotTrackHTTPHeader()
+        https://bugs.webkit.org/show_bug.cgi?id=96320
+
+        Reviewed by Geoffrey Garen.
+
+        Client was being cached as the FrameLoaderClient, but requests were sent to the ResourceLoadClient.
+
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (WebFrameLoaderClient::shouldSendDoNotTrackHTTPHeader): Send the request to the FrameLoadDelegate.
+        * WebView/WebDelegateImplementationCaching.h:
+        * WebView/WebDelegateImplementationCaching.mm:
+        (CallFrameLoadDelegateReturningBoolean): Added.
+
 2012-09-07  Jer Noble  <[email protected]>
 
         <audio> and <video> should send Do Not Track when appropriate

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (128111 => 128112)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm	2012-09-10 21:49:25 UTC (rev 128111)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm	2012-09-10 21:52:24 UTC (rev 128112)
@@ -1986,7 +1986,7 @@
     WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(webView);
 
     if (implementations->shouldSendDoNotTrackHTTPHeaderFunc)
-        return CallResourceLoadDelegateReturningBoolean(YES, implementations->shouldSendDoNotTrackHTTPHeaderFunc, webView, @selector(webViewShouldSendDoNotTrackHTTPHeader:));
+        return CallFrameLoadDelegateReturningBoolean(YES, implementations->shouldSendDoNotTrackHTTPHeaderFunc, webView, @selector(webViewShouldSendDoNotTrackHTTPHeader:));
     return false;
 }
 

Modified: trunk/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.h (128111 => 128112)


--- trunk/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.h	2012-09-10 21:49:25 UTC (rev 128111)
+++ trunk/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.h	2012-09-10 21:52:24 UTC (rev 128112)
@@ -130,6 +130,8 @@
 id CallFrameLoadDelegate(IMP, WebView *, SEL, id, id, id, id);
 id CallFrameLoadDelegate(IMP, WebView *, SEL, id, NSTimeInterval, id, id);
 
+BOOL CallFrameLoadDelegateReturningBoolean(BOOL, IMP, WebView *, SEL);
+
 id CallResourceLoadDelegate(IMP, WebView *, SEL, id, id);
 id CallResourceLoadDelegate(IMP, WebView *, SEL, id, id, id);
 id CallResourceLoadDelegate(IMP, WebView *, SEL, id, id, id, id);

Modified: trunk/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm (128111 => 128112)


--- trunk/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm	2012-09-10 21:49:25 UTC (rev 128111)
+++ trunk/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm	2012-09-10 21:52:24 UTC (rev 128112)
@@ -475,6 +475,16 @@
     return CallDelegate(implementation, self, self->_private->frameLoadDelegate, selector, object1, interval, object2, object3);
 }
 
+BOOL CallFrameLoadDelegateReturningBoolean(BOOL result, IMP implementation, WebView *self, SEL selector)
+{
+    @try {
+        return reinterpret_cast<BOOL (*)(id, SEL, WebView *)>(objc_msgSend)(self->_private->frameLoadDelegate, selector, self);
+    } @catch(id exception) {
+        ReportDiscardedDelegateException(selector, exception);
+    }
+    return result;
+}
+
 id CallResourceLoadDelegate(IMP implementation, WebView *self, SEL selector, id object1, id object2)
 {
     return CallDelegate(implementation, self, self->_private->resourceProgressDelegate, selector, object1, object2);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to