Title: [151879] trunk/Source/WebCore
Revision
151879
Author
[email protected]
Date
2013-06-22 13:29:30 -0700 (Sat, 22 Jun 2013)

Log Message

Followup from r151877 .
Fix crash in fast/frames/iframe-access-screen-of-deleted.html by null-checking the widget.

* platform/mac/PlatformScreenMac.mm:
(WebCore::screenForWidget):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (151878 => 151879)


--- trunk/Source/WebCore/ChangeLog	2013-06-22 19:56:37 UTC (rev 151878)
+++ trunk/Source/WebCore/ChangeLog	2013-06-22 20:29:30 UTC (rev 151879)
@@ -1,3 +1,11 @@
+2013-06-22  Simon Fraser  <[email protected]>
+
+        Followup from r151877 .
+        Fix crash in fast/frames/iframe-access-screen-of-deleted.html by null-checking the widget.
+
+        * platform/mac/PlatformScreenMac.mm:
+        (WebCore::screenForWidget):
+
 2013-06-22  Hans Muller  <[email protected]>
 
         [CSS Shapes] limit shape image values to same origin

Modified: trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm (151878 => 151879)


--- trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm	2013-06-22 19:56:37 UTC (rev 151878)
+++ trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm	2013-06-22 20:29:30 UTC (rev 151879)
@@ -75,7 +75,7 @@
         return screenForWindow(window);
     
     // Didn't get an NSWindow; probably WebKit2. Try using the Widget's display ID.
-    if (NSScreen *screen = [NSScreen screenForDislayID:widget->windowDisplayID()])
+    if (NSScreen *screen = widget ? [NSScreen screenForDislayID:widget->windowDisplayID()] : nil)
         return screen;
     
     // Widget's window is offscreen, or no screens. Fall back to the first screen if available.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to