Refactor AbstractEventLoop out of WindowEventLoop
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Oct 2019 23:34:36 +0000 (23:34 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Oct 2019 23:34:36 +0000 (23:34 +0000)
commit550ac5d72d360cdf22bdb7861bf0f670a6e61cd8
tree347afe267aabb1164ed5cb14962c03040f2a75cb
parent51272dde10ea3ebb20d611ee364a13e7f1d079e9
Refactor AbstractEventLoop out of WindowEventLoop
https://bugs.webkit.org/show_bug.cgi?id=203136
<rdar://problem/56396749>

Reviewed by Antti Koivisto.

Extract AbstractEventLoop out of WindowEventLoop as a preparation for adding WorkerEventLoop.

Also replaced m_activeTaskCount with a boolean m_isScheduledToRun since it doesn't need to count.

* WebCore.xcodeproj/project.pbxproj:
* dom/AbstractEventLoop.cpp: Added.
* dom/AbstractEventLoop.h: Added.
(WebCore::AbstractEventLoop): Added.
* dom/WindowEventLoop.cpp:
(WebCore::WindowEventLoop::WindowEventLoop): Deleted. Use the default constructor in the header instead.
(WebCore::WindowEventLoop::queueTask):
(WebCore::WindowEventLoop::suspend):
(WebCore::WindowEventLoop::resume):
(WebCore::WindowEventLoop::scheduleToRunIfNeeded): Extracted out of queueTask.
(WebCore::WindowEventLoop::run):
* dom/WindowEventLoop.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251308 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/dom/AbstractEventLoop.h [new file with mode: 0644]
Source/WebCore/dom/WindowEventLoop.cpp
Source/WebCore/dom/WindowEventLoop.h