Cleanup: Make QueueTaskToEventLoopFunctionPtr take JSGlobalObject&
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 May 2017 17:53:18 +0000 (17:53 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 May 2017 17:53:18 +0000 (17:53 +0000)
commit7d4f8d3288b0ebd348134ac1df8ee12773e1cf14
treee9d4f02fc023c84e48ee56b1d2c3decb42a976d0
parent782becafd948eaabfa45671ba38403898a77a036
Cleanup: Make QueueTaskToEventLoopFunctionPtr take JSGlobalObject&
https://bugs.webkit.org/show_bug.cgi?id=172021

Reviewed by Mark Lam.

Source/JavaScriptCore:

Change the function alias for QueueTaskToEventLoopFunctionPtr to take JSGlobalObject&
instead of a const JSGlobalObject* as all implementations expect to be passed a non-
const, non-null JSGlobalObject object.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::queueMicrotask):
* runtime/JSGlobalObject.h:
* runtime/VM.cpp:
(JSC::VM::queueMicrotask):
* runtime/VM.h: Remove JS_EXPORT_PRIVATE annotation from queueMicrotask() as
it is only called from JavaScriptCore code.

Source/WebCore:

* bindings/js/JSDOMGlobalObjectTask.cpp: Include header JSDOMGlobalObject.h.
(WebCore::JSGlobalObjectTask::JSGlobalObjectTask): Change type of first argument from JSDOMGlobalObject*
to JSDOMGlobalObject& and update code as necessary. Also, use C++11 brace initialization syntax
for member initializer list.
* bindings/js/JSDOMGlobalObjectTask.h: Remove header JSDOMGlobalObject.h and forward declare
JSDOMGlobalObject and JSC::Microtask.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowMicrotaskCallback::create):
(WebCore::JSDOMWindowMicrotaskCallback::JSDOMWindowMicrotaskCallback): Change type of first argument
from JSDOMWindowBase* to JSDOMWindowBase& and update code as necessary. Also, use C++11 brace
initialization syntax for member initializer list.
(WebCore::JSDOMWindowBase::queueTaskToEventLoop):
* bindings/js/JSDOMWindowBase.h:
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
* bindings/js/JSWorkerGlobalScopeBase.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216768 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/JSGlobalObject.cpp
Source/JavaScriptCore/runtime/JSGlobalObject.h
Source/JavaScriptCore/runtime/VM.cpp
Source/JavaScriptCore/runtime/VM.h
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSDOMGlobalObjectTask.cpp
Source/WebCore/bindings/js/JSDOMGlobalObjectTask.h
Source/WebCore/bindings/js/JSDOMWindowBase.cpp
Source/WebCore/bindings/js/JSDOMWindowBase.h
Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp
Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.h