-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate setTimeout and setInterval with HTML5 event loop
https://bugs.webkit.org/show_bug.cgi?id=203137 Reviewed by Chris Dumez. This PR integrates DOM timers with HTML5 event loop. Specifically, DOMTimer now uses EventLoopTaskGroup::scheduleTask and EventLoopTaskGroup::scheduleRepeatingTask instead of inheriting from SuspendableTimer. This PR also deletes SuspendableTimer class now that we've migrated all uses of it to EventLoop's equivalents. * Source/WebCore/Headers.cmake: * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/dom/EventLoop.cpp: (WebCore::EventLoop::scheduleTask): Fixed a bug that the newly created timer won't be suspended when the task group had been suspended. (WebCore::EventLoop::scheduleRepeatingTask): Ditto. (WebCore::EventLoopTaskGroup::setTimerAlignment): (WebCore::EventLoopTaskGroup::setTimerHasReachedMaxNestingLevel): (WebCore::EventLoopTaskGroup::adjustTimerNextTimeout): (WebCore::EventLoopTaskGroup::adjustTimerRepeatInterval): (WebCore::EventLoopTaskGroup::didChangeTimerAlignmentInterval): * Source/WebCore/dom/EventLoop.h: * Source/WebCore/dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::didChangeTimerAlignmentInterval): * Source/WebCore/dom/ScriptExecutionContext.h: * Source/WebCore/dom/TaskSource.h: * Source/WebCore/page/DOMTimer.cpp: (WebCore::DOMTimer::DOMTimer): (WebCore::DOMTimer::removeById): (WebCore::DOMTimer::fired): (WebCore::DOMTimer::stop): (WebCore::DOMTimer::updateTimerIntervalIfNecessary): (WebCore::DOMTimer::didStop): Deleted. * Source/WebCore/page/DOMTimer.h: * Source/WebCore/page/SuspendableTimer.cpp: Removed. * Source/WebCore/page/SuspendableTimer.h: Removed. * Source/WebCore/testing/Internals.cpp: (WebCore::Internals::isTimerThrottled): Canonical link: https://commits.webkit.org/266828@main
- Loading branch information
Showing
13 changed files
with
136 additions
and
280 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.