REGRESSION(168053): Repro crash navigating to another page after selecting phone
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 May 2014 22:53:53 +0000 (22:53 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 May 2014 22:53:53 +0000 (22:53 +0000)
numbers on a page
https://bugs.webkit.org/show_bug.cgi?id=132444
-and corresponding-
<rdar://problem/16787285>

Reviewed by Darin Adler.

Missing null-check.
* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
(WebKit::TelephoneNumberOverlayController::drawRect):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168124 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm

index 86676e7..7e92967 100644 (file)
@@ -1,3 +1,17 @@
+2014-05-01  Beth Dakin  <bdakin@apple.com>
+
+        REGRESSION(168053): Repro crash navigating to another page after selecting phone 
+        numbers on a page
+        https://bugs.webkit.org/show_bug.cgi?id=132444
+        -and corresponding-
+        <rdar://problem/16787285>
+
+        Reviewed by Darin Adler.
+
+        Missing null-check.
+        * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
+        (WebKit::TelephoneNumberOverlayController::drawRect):
+
 2014-05-01  Anders Carlsson  <andersca@apple.com>
 
         Remove WKBundleSetShouldTrackVisitedLinks and associate code
index 4c3e705..f31b727 100644 (file)
@@ -71,6 +71,8 @@ void TelephoneNumberOverlayController::drawRect(PageOverlay* overlay, WebCore::G
 
         // Convert to the main document's coordinate space.
         FrameView* viewForRange = range->ownerDocument().view();
+        if (!viewForRange)
+            return;
         FrameView& mainFrameView = *m_webPage->corePage()->mainFrame().view();
         rect.setLocation(mainFrameView.convertChildToSelf(viewForRange, rect.location()));