Title: [175428] trunk/Source/WebKit2
Revision
175428
Author
[email protected]
Date
2014-10-31 14:49:44 -0700 (Fri, 31 Oct 2014)

Log Message

REGRESSION (r175376): Occasional null deref when doing a dictionary lookup
https://bugs.webkit.org/show_bug.cgi?id=138261
<rdar://problem/18841709>

Reviewed by Anders Carlsson.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation):
rangeForDictionaryLookupAtHitTestResult can easily return null.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (175427 => 175428)


--- trunk/Source/WebKit2/ChangeLog	2014-10-31 21:43:30 UTC (rev 175427)
+++ trunk/Source/WebKit2/ChangeLog	2014-10-31 21:49:44 UTC (rev 175428)
@@ -1,3 +1,15 @@
+2014-10-31  Tim Horton  <[email protected]>
+
+        REGRESSION (r175376): Occasional null deref when doing a dictionary lookup
+        https://bugs.webkit.org/show_bug.cgi?id=138261
+        <rdar://problem/18841709>
+
+        Reviewed by Anders Carlsson.
+
+        * WebProcess/WebPage/mac/WebPageMac.mm:
+        (WebKit::WebPage::performDictionaryLookupAtLocation):
+        rangeForDictionaryLookupAtHitTestResult can easily return null.
+
 2014-10-31  Beth Dakin  <[email protected]>
 
         Use system art for action menus when possible

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (175427 => 175428)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm	2014-10-31 21:43:30 UTC (rev 175427)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm	2014-10-31 21:49:44 UTC (rev 175428)
@@ -576,6 +576,9 @@
     Frame* frame = result.innerNonSharedNode() ? result.innerNonSharedNode()->document().frame() : &m_page->focusController().focusedOrMainFrame();
     NSDictionary *options = nil;
     RefPtr<Range> range = rangeForDictionaryLookupAtHitTestResult(result, &options);
+    if (!range)
+        return;
+
     performDictionaryLookupForRange(frame, *range, options);
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to