Changeset 198157 in webkit


Ignore:
Timestamp:
Mar 14, 2016, 2:32:38 PM (10 years ago)
Author:
Simon Fraser
Message:

Fix crash when reloading a page using requestAnimationFrame on iOS
https://bugs.webkit.org/show_bug.cgi?id=155465
rdar://problem/25100202

Reviewed by Tim Horton.

On iOS, it's possible for all clients for a DisplayRefreshMonitor
to be unregistered, but still get a subsequent displayDidRefresh() for that monitor.
In this case, we would remove(notFound) which release-asserts.

Fix by just checking for notFound.

Unable to test because requestAnimationFrame doesn't work in the simulator.

  • platform/graphics/DisplayRefreshMonitorManager.cpp:

(WebCore::DisplayRefreshMonitorManager::displayDidRefresh):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r198155 r198157  
     12016-03-14  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Fix crash when reloading a page using requestAnimationFrame on iOS
     4        https://bugs.webkit.org/show_bug.cgi?id=155465
     5        rdar://problem/25100202
     6
     7        Reviewed by Tim Horton.
     8
     9        On iOS, it's possible for all clients for a DisplayRefreshMonitor
     10        to be unregistered, but still get a subsequent displayDidRefresh() for that monitor.
     11        In this case, we would remove(notFound) which release-asserts.
     12       
     13        Fix by just checking for notFound.
     14       
     15        Unable to test because requestAnimationFrame doesn't work in the simulator.
     16
     17        * platform/graphics/DisplayRefreshMonitorManager.cpp:
     18        (WebCore::DisplayRefreshMonitorManager::displayDidRefresh):
     19
    1202016-03-14  Per Arne Vollan  <peavo@outlook.com>
    221
  • trunk/Source/WebCore/platform/graphics/DisplayRefreshMonitorManager.cpp

    r182985 r198157  
    110110
    111111    size_t monitorIndex = m_monitors.find(&monitor);
    112     ASSERT(monitorIndex != notFound);
    113     m_monitors.remove(monitorIndex);
     112    if (monitorIndex != notFound)
     113        m_monitors.remove(monitorIndex);
    114114}
    115115
Note: See TracChangeset for help on using the changeset viewer.