Title: [179937] trunk/Source/WebCore
Revision
179937
Author
[email protected]
Date
2015-02-11 10:36:38 -0800 (Wed, 11 Feb 2015)

Log Message

performance.now can crash if accessed from a window that has navigated
<rdar://problem/16892506>
https://bugs.webkit.org/show_bug.cgi?id=141478

Reviewed by Alexey Proskuryakov.

Test: fast/performance/performance-now-crash-on-navigated-window.html

* page/Performance.cpp:
(WebCore::Performance::now):
Check for a null frame, which can happen when the window has been navigated.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (179936 => 179937)


--- trunk/Source/WebCore/ChangeLog	2015-02-11 18:33:14 UTC (rev 179936)
+++ trunk/Source/WebCore/ChangeLog	2015-02-11 18:36:38 UTC (rev 179937)
@@ -1,3 +1,17 @@
+2015-02-11  Sam Weinig  <[email protected]>
+
+        performance.now can crash if accessed from a window that has navigated
+        <rdar://problem/16892506>
+        https://bugs.webkit.org/show_bug.cgi?id=141478
+
+        Reviewed by Alexey Proskuryakov.
+
+        Test: fast/performance/performance-now-crash-on-navigated-window.html
+
+        * page/Performance.cpp:
+        (WebCore::Performance::now):
+        Check for a null frame, which can happen when the window has been navigated.
+
 2015-02-10  Alexey Proskuryakov  <[email protected]>
 
         URL::setUser and URL::setPass don't percent encode

Modified: trunk/Source/WebCore/page/Performance.cpp (179936 => 179937)


--- trunk/Source/WebCore/page/Performance.cpp	2015-02-11 18:33:14 UTC (rev 179936)
+++ trunk/Source/WebCore/page/Performance.cpp	2015-02-11 18:36:38 UTC (rev 179937)
@@ -228,6 +228,9 @@
 
 double Performance::now() const
 {
+    if (!frame())
+        return 0;
+
     return 1000.0 * m_frame->document()->loader()->timing().monotonicTimeToZeroBasedDocumentTime(monotonicallyIncreasingTime());
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to