Title: [172050] branches/safari-600.1.4-branch/Source

Diff

Modified: branches/safari-600.1.4-branch/Source/WebKit/mac/ChangeLog (172049 => 172050)


--- branches/safari-600.1.4-branch/Source/WebKit/mac/ChangeLog	2014-08-05 19:55:02 UTC (rev 172049)
+++ branches/safari-600.1.4-branch/Source/WebKit/mac/ChangeLog	2014-08-05 20:01:43 UTC (rev 172050)
@@ -1,3 +1,18 @@
+2014-08-05  Matthew Hanson  <matthew_han...@apple.com>
+
+        Merge r172016. <rdar://problem/17896295>
+
+    2014-08-04  Benjamin Poulain  <bpoul...@apple.com>
+    
+            Check for null frame when processing geolocation authorization request
+            https://bugs.webkit.org/show_bug.cgi?id=135577
+            <rdar://problem/17896295>
+    
+            Reviewed by Geoffrey Garen.
+    
+            * WebCoreSupport/WebGeolocationClient.mm:
+            (WebGeolocationClient::requestPermission):
+    
 2014-08-03  Babak Shafiei  <bshaf...@apple.com>
 
         Merge r171973.

Modified: branches/safari-600.1.4-branch/Source/WebKit/mac/WebCoreSupport/WebGeolocationClient.mm (172049 => 172050)


--- branches/safari-600.1.4-branch/Source/WebKit/mac/WebCoreSupport/WebGeolocationClient.mm	2014-08-05 19:55:02 UTC (rev 172049)
+++ branches/safari-600.1.4-branch/Source/WebKit/mac/WebCoreSupport/WebGeolocationClient.mm	2014-08-05 20:01:43 UTC (rev 172050)
@@ -112,6 +112,12 @@
 
 #if !PLATFORM(IOS)
     Frame *frame = geolocation->frame();
+
+    if (!frame) {
+        geolocation->setIsAllowed(false);
+        return;
+    }
+
     WebSecurityOrigin *webOrigin = [[WebSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:frame->document()->securityOrigin()];
     WebGeolocationPolicyListener* listener = [[WebGeolocationPolicyListener alloc] initWithGeolocation:geolocation];
 

Modified: branches/safari-600.1.4-branch/Source/WebKit2/ChangeLog (172049 => 172050)


--- branches/safari-600.1.4-branch/Source/WebKit2/ChangeLog	2014-08-05 19:55:02 UTC (rev 172049)
+++ branches/safari-600.1.4-branch/Source/WebKit2/ChangeLog	2014-08-05 20:01:43 UTC (rev 172050)
@@ -1,5 +1,24 @@
 2014-08-05  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r172016. <rdar://problem/17896295>
+
+    2014-08-04  Benjamin Poulain  <bpoul...@apple.com>
+    
+            Check for null frame when processing geolocation authorization request
+            https://bugs.webkit.org/show_bug.cgi?id=135577
+            <rdar://problem/17896295>
+    
+            Reviewed by Geoffrey Garen.
+    
+            I could have put the null check in GeolocationController instead of the WebKit layer,
+            but that would be a little weird as GeolocationController knows nothing about how
+            the WebKit layer decides what to do with requests.
+    
+            * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
+            (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
+    
+2014-08-05  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r172035. <rdar://problem/17869353>
 
     2014-08-04  Andy Estes  <aes...@apple.com>

Modified: branches/safari-600.1.4-branch/Source/WebKit2/WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp (172049 => 172050)


--- branches/safari-600.1.4-branch/Source/WebKit2/WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp	2014-08-05 19:55:02 UTC (rev 172049)
+++ branches/safari-600.1.4-branch/Source/WebKit2/WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp	2014-08-05 20:01:43 UTC (rev 172050)
@@ -55,13 +55,19 @@
 
 void GeolocationPermissionRequestManager::startRequestForGeolocation(Geolocation* geolocation)
 {
+    Frame* frame = geolocation->frame();
+
+    ASSERT_WITH_MESSAGE(frame, "It is not well understood in which cases the Geolocation is alive after its frame goes away. If you hit this assertion, please add a test covering this case.");
+    if (!frame) {
+        geolocation->setIsAllowed(false);
+        return;
+    }
+
     uint64_t geolocationID = generateGeolocationID();
 
     m_geolocationToIDMap.set(geolocation, geolocationID);
     m_idToGeolocationMap.set(geolocationID, geolocation);
 
-    Frame* frame = geolocation->frame();
-
     WebFrame* webFrame = WebFrame::fromCoreFrame(*frame);
     ASSERT(webFrame);
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to