⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 179937 in webkit


Ignore:
Timestamp:
Feb 11, 2015, 10:36:38 AM (12 years ago)
Author:
weinig@apple.com
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.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r179933 r179937  
     12015-02-11  Sam Weinig  <sam@webkit.org>
     2
     3        performance.now can crash if accessed from a window that has navigated
     4        <rdar://problem/16892506>
     5        https://bugs.webkit.org/show_bug.cgi?id=141478
     6
     7        Reviewed by Alexey Proskuryakov.
     8
     9        Test: fast/performance/performance-now-crash-on-navigated-window.html
     10
     11        * page/Performance.cpp:
     12        (WebCore::Performance::now):
     13        Check for a null frame, which can happen when the window has been navigated.
     14
    1152015-02-10  Alexey Proskuryakov  <ap@apple.com>
    216
  • trunk/Source/WebCore/page/Performance.cpp

    r178859 r179937  
    229229double Performance::now() const
    230230{
     231    if (!frame())
     232        return 0;
     233
    231234    return 1000.0 * m_frame->document()->loader()->timing().monotonicTimeToZeroBasedDocumentTime(monotonicallyIncreasingTime());
    232235}
Note: See TracChangeset for help on using the changeset viewer.