Changeset 198745 in webkit
- Timestamp:
- Mar 28, 2016 10:17:51 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r198741 r198745 1 2016-03-25 Simon Fraser <simon.fraser@apple.com> 2 3 Inspector Memory Timeline sometimes encounters unstoppable rAF drawing 4 https://bugs.webkit.org/show_bug.cgi?id=155906 5 6 Reviewed by Anders Carlsson. 7 8 It was possible to get Web Inspector into a state where repeated, expensive 9 requestAnimationFrame calls prevented user events from being handled, making it 10 unresponsive. 11 12 requestAnimationFrame uses callOnMainThread() to get a notification from the 13 CVDispayLink thread to the main thread, which is a -performSelectorOnMainThread... 14 Under the hood, this ends up as a CFRunLoopPerformBlock(). 15 16 User events come in via Connection::enqueueIncomingMessage(), which uses RunLoop::main()::dispatch(), 17 which uses a CFRunLoopSource. Evidently, repeated calls to CFRunLoopPerformBlock() can prevent the 18 CFRunLoopSource from being handled. 19 20 Fix by moving requestAnimationFrame from callOnMainThread() to RunLoop::main()::dispatch(). 21 22 * platform/graphics/mac/DisplayRefreshMonitorMac.cpp: 23 (WebCore::DisplayRefreshMonitorMac::displayLinkFired): 24 1 25 2016-03-28 Chris Dumez <cdumez@apple.com> 2 26 -
trunk/Source/WebCore/platform/graphics/mac/DisplayRefreshMonitorMac.cpp
r188700 r198745 31 31 #include <QuartzCore/QuartzCore.h> 32 32 #include <wtf/CurrentTime.h> 33 #include <wtf/ MainThread.h>33 #include <wtf/RunLoop.h> 34 34 35 35 namespace WebCore { … … 104 104 auto weakPtr = m_weakFactory.createWeakPtr(); 105 105 106 callOnMainThread([weakPtr] {106 RunLoop::main().dispatch([weakPtr] { 107 107 if (auto* monitor = weakPtr.get()) 108 108 handleDisplayRefreshedNotificationOnMainThread(monitor);
Note: See TracChangeset
for help on using the changeset viewer.