Add support for microtasks in workers
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Aug 2018 04:37:10 +0000 (04:37 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Aug 2018 04:37:10 +0000 (04:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=188246

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

This test is wrong[1,2]. It starts failing since our worker starts using correct microtask queues.

[1]: https://github.com/web-platform-tests/wpt/pull/8936
[2]: https://github.com/w3c/ServiceWorker/issues/1213#issuecomment-342640579

* web-platform-tests/service-workers/service-worker/extendable-event-async-waituntil.https-expected.txt:

Source/WebCore:

This patch adds the microtask mechanism to workers. To adopt the existing microtask mechanism from the main thread,
we extend JSMainThreadExecState for non-main-threads. We rename it to JSExecState, and store stacked
ExecState* data in thread local storage in ThreadGlobalData instead of a static variable s_mainThreadState.

We add MicrotaskQueue to WorkerGlobalScope since each worker has its own thread and it should have its
own microtask queue.

* Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSCallbackData.cpp:
(WebCore::JSCallbackData::invokeCallback):
* bindings/js/JSCustomElementInterface.cpp:
(WebCore::constructCustomElementSynchronously):
(WebCore::JSCustomElementInterface::upgradeElement):
(WebCore::JSCustomElementInterface::invokeCallback):
* bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
* bindings/js/JSDOMGlobalObjectTask.cpp:
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::queueTaskToEventLoop):
Queue a microtask to MicrotaskQueue instead of posting a macrotask.

(WebCore::JSDOMWindowMicrotaskCallback::create): Deleted.
(WebCore::JSDOMWindowMicrotaskCallback::call): Deleted.
(WebCore::JSDOMWindowMicrotaskCallback::JSDOMWindowMicrotaskCallback): Deleted.
(): Deleted.
Extract JSDOMWindowMicrotaskCallback as JSMicrotaskCallback and create a new file for it.

* bindings/js/JSErrorHandler.cpp:
(WebCore::JSErrorHandler::handleEvent):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSExecState.cpp: Renamed from Source/WebCore/bindings/js/JSMainThreadExecState.cpp.
(WebCore::JSExecState::didLeaveScriptContext):
If we are in a main thread, we consume main thread microtask queue. If we are in worker thread,
we consume a microtask queue per worker.

(WebCore::functionCallHandlerFromAnyThread):
(WebCore::evaluateHandlerFromAnyThread):
* bindings/js/JSExecState.h: Renamed from Source/WebCore/bindings/js/JSMainThreadExecState.h.
(WebCore::JSExecState::currentState):
(WebCore::JSExecState::call):
(WebCore::JSExecState::evaluate):
(WebCore::JSExecState::profiledCall):
(WebCore::JSExecState::profiledEvaluate):
(WebCore::JSExecState::runTask):
(WebCore::JSExecState::loadModule):
(WebCore::JSExecState::linkAndEvaluateModule):
(WebCore::JSExecState::JSExecState):
(WebCore::JSExecState::~JSExecState):
(WebCore::JSExecState::setCurrentState):
Store and load ExecState in thread local storage, ThreadGlobalData. This allows us to use it for workers.

(WebCore::JSMainThreadNullState::JSMainThreadNullState):
(WebCore::JSMainThreadNullState::~JSMainThreadNullState):
We keep this name "JSMainThreadNullState" since CustomElementReactionStack should be stick to the main thread.
And this class is only used in the main thread.

* bindings/js/JSExecStateInstrumentation.h: Renamed from Source/WebCore/bindings/js/JSMainThreadExecStateInstrumentation.h.
(WebCore::JSExecState::instrumentFunctionInternal):
(WebCore::JSExecState::instrumentFunctionCall):
(WebCore::JSExecState::instrumentFunctionConstruct):
* bindings/js/JSMicrotaskCallback.h: Copied from Source/WebKitLegacy/mac/DOM/DOMHTMLBaseElement.mm.
(WebCore::JSMicrotaskCallback::create):
(WebCore::JSMicrotaskCallback::call):
(WebCore::JSMicrotaskCallback::JSMicrotaskCallback):
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::executeFunctionInContext):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::loadModuleScriptInWorld):
(WebCore::ScriptController::linkAndEvaluateModuleScriptInWorld):
(WebCore::ScriptController::canAccessFromCurrentOrigin):
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate):
* bridge/objc/WebScriptObject.mm:
(-[WebScriptObject callWebScriptMethod:withArguments:]):
(-[WebScriptObject evaluateWebScript:]):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::compileShader):
(WebCore::WebGLRenderingContextBase::printToConsole):
* inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::buildObjectForCanvas):
(WebCore::InspectorCanvas::buildAction):
* inspector/InspectorController.cpp:
* inspector/InspectorFrontendHost.cpp:
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createGenericRecord):
* inspector/WorkerInspectorController.cpp:
* inspector/agents/InspectorCanvasAgent.cpp:
* inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::buildInitiatorObject):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::postMessage):
* page/PageConsoleClient.cpp:
(WebCore::PageConsoleClient::addMessage):
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportViolation const):
* platform/ThreadGlobalData.h:
(WebCore::ThreadGlobalData::ThreadGlobalData::currentState const):
(WebCore::ThreadGlobalData::ThreadGlobalData::setCurrentState):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::WorkerGlobalScope):
(WebCore::WorkerGlobalScope::removeMicrotaskQueue):
* workers/WorkerGlobalScope.h:
(WebCore::WorkerGlobalScope::microtaskQueue const):
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::stop):
* workers/service/ExtendableEvent.cpp:
(WebCore::ExtendableEvent::addExtendLifetimePromise):
When dispatching an "install" event from service worker, we first create an event,
dispatch it, and set a handler which is called when a pending promise count becomes zero.
However, the old code checked pending promise count in a queued microtask. It worked
previously because microtask is actually a macrotask in the service worker. So this check
is done after a handler is set. But this patch introduces real microtask, and this check
happens before a handler is set because dispatching an event can exhaust microtask queue.
According to the spec, this check should not be done in microtask[1]. We make this checking
part as a macrotask. We note that algorithm noted as FIXMEs should be done in this
microtask while the checking part should not be done.

[1]: https://w3c.github.io/ServiceWorker/#installation-algorithm

Source/WebKit:

Rename JSMainThreadExecState.h to JSExecState.h.

* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementGtk.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeGtk.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathNSResolver.cpp:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.cpp:

Source/WebKitLegacy/mac:

Rename JSMainThreadExecState.h to JSExecState.h.

* DOM/DOMAttr.mm:
* DOM/DOMBlob.mm:
* DOM/DOMCDATASection.mm:
* DOM/DOMCSSCharsetRule.mm:
* DOM/DOMCSSFontFaceRule.mm:
* DOM/DOMCSSImportRule.mm:
* DOM/DOMCSSMediaRule.mm:
* DOM/DOMCSSPageRule.mm:
* DOM/DOMCSSPrimitiveValue.mm:
* DOM/DOMCSSRule.mm:
* DOM/DOMCSSRuleList.mm:
* DOM/DOMCSSStyleDeclaration.mm:
* DOM/DOMCSSStyleRule.mm:
* DOM/DOMCSSStyleSheet.mm:
* DOM/DOMCSSUnknownRule.mm:
* DOM/DOMCSSValue.mm:
* DOM/DOMCSSValueList.mm:
* DOM/DOMCharacterData.mm:
* DOM/DOMComment.mm:
* DOM/DOMCounter.mm:
* DOM/DOMDocument.mm:
* DOM/DOMDocumentFragment.mm:
* DOM/DOMDocumentType.mm:
* DOM/DOMElement.mm:
* DOM/DOMEvent.mm:
* DOM/DOMFile.mm:
* DOM/DOMFileList.mm:
* DOM/DOMHTML.mm:
* DOM/DOMHTMLAnchorElement.mm:
* DOM/DOMHTMLAppletElement.mm:
* DOM/DOMHTMLAreaElement.mm:
* DOM/DOMHTMLBRElement.mm:
* DOM/DOMHTMLBaseElement.mm:
* DOM/DOMHTMLBaseFontElement.mm:
* DOM/DOMHTMLBodyElement.mm:
* DOM/DOMHTMLButtonElement.mm:
* DOM/DOMHTMLCanvasElement.mm:
* DOM/DOMHTMLCollection.mm:
* DOM/DOMHTMLDListElement.mm:
* DOM/DOMHTMLDirectoryElement.mm:
* DOM/DOMHTMLDivElement.mm:
* DOM/DOMHTMLDocument.mm:
* DOM/DOMHTMLElement.mm:
* DOM/DOMHTMLEmbedElement.mm:
* DOM/DOMHTMLFieldSetElement.mm:
* DOM/DOMHTMLFontElement.mm:
* DOM/DOMHTMLFormElement.mm:
* DOM/DOMHTMLFrameElement.mm:
* DOM/DOMHTMLFrameSetElement.mm:
* DOM/DOMHTMLHRElement.mm:
* DOM/DOMHTMLHeadElement.mm:
* DOM/DOMHTMLHeadingElement.mm:
* DOM/DOMHTMLHtmlElement.mm:
* DOM/DOMHTMLIFrameElement.mm:
* DOM/DOMHTMLImageElement.mm:
* DOM/DOMHTMLInputElement.mm:
* DOM/DOMHTMLLIElement.mm:
* DOM/DOMHTMLLabelElement.mm:
* DOM/DOMHTMLLegendElement.mm:
* DOM/DOMHTMLLinkElement.mm:
* DOM/DOMHTMLMapElement.mm:
* DOM/DOMHTMLMarqueeElement.mm:
* DOM/DOMHTMLMediaElement.mm:
* DOM/DOMHTMLMenuElement.mm:
* DOM/DOMHTMLMetaElement.mm:
* DOM/DOMHTMLModElement.mm:
* DOM/DOMHTMLOListElement.mm:
* DOM/DOMHTMLObjectElement.mm:
* DOM/DOMHTMLOptGroupElement.mm:
* DOM/DOMHTMLOptionElement.mm:
* DOM/DOMHTMLOptionsCollection.mm:
* DOM/DOMHTMLParagraphElement.mm:
* DOM/DOMHTMLParamElement.mm:
* DOM/DOMHTMLPreElement.mm:
* DOM/DOMHTMLQuoteElement.mm:
* DOM/DOMHTMLScriptElement.mm:
* DOM/DOMHTMLSelectElement.mm:
* DOM/DOMHTMLStyleElement.mm:
* DOM/DOMHTMLTableCaptionElement.mm:
* DOM/DOMHTMLTableCellElement.mm:
* DOM/DOMHTMLTableColElement.mm:
* DOM/DOMHTMLTableElement.mm:
* DOM/DOMHTMLTableRowElement.mm:
* DOM/DOMHTMLTableSectionElement.mm:
* DOM/DOMHTMLTextAreaElement.mm:
* DOM/DOMHTMLTitleElement.mm:
* DOM/DOMHTMLUListElement.mm:
* DOM/DOMHTMLVideoElement.mm:
* DOM/DOMImplementation.mm:
* DOM/DOMKeyboardEvent.mm:
* DOM/DOMMediaError.mm:
* DOM/DOMMediaList.mm:
* DOM/DOMMouseEvent.mm:
* DOM/DOMMutationEvent.mm:
* DOM/DOMNamedNodeMap.mm:
* DOM/DOMNode.mm:
* DOM/DOMNodeIterator.mm:
* DOM/DOMNodeList.mm:
* DOM/DOMOverflowEvent.mm:
* DOM/DOMProcessingInstruction.mm:
* DOM/DOMProgressEvent.mm:
* DOM/DOMRGBColor.mm:
* DOM/DOMRange.mm:
* DOM/DOMRect.mm:
* DOM/DOMStyleSheet.mm:
* DOM/DOMStyleSheetList.mm:
* DOM/DOMText.mm:
* DOM/DOMTextEvent.mm:
* DOM/DOMTimeRanges.mm:
* DOM/DOMTokenList.mm:
* DOM/DOMTreeWalker.mm:
* DOM/DOMUIEvent.mm:
* DOM/DOMWheelEvent.mm:
* DOM/DOMXPathExpression.mm:
* DOM/DOMXPathResult.mm:
* DOM/ObjCEventListener.mm:

LayoutTests:

* http/wpt/workers/microtasks.any-expected.txt: Added.
* http/wpt/workers/microtasks.any.html: Added.
* http/wpt/workers/microtasks.any.js: Added.
(promise_test):
* http/wpt/workers/microtasks.any.worker-expected.txt: Added.
* http/wpt/workers/microtasks.any.worker.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234586 268f45cc-cd09-0410-ab3c-d52691b4dbfc

262 files changed:
LayoutTests/ChangeLog
LayoutTests/http/wpt/workers/microtasks.any-expected.txt [new file with mode: 0644]
LayoutTests/http/wpt/workers/microtasks.any.html [new file with mode: 0644]
LayoutTests/http/wpt/workers/microtasks.any.js [new file with mode: 0644]
LayoutTests/http/wpt/workers/microtasks.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/http/wpt/workers/microtasks.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/extendable-event-async-waituntil.https-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSBindingsAllInOne.cpp
Source/WebCore/bindings/js/JSCallbackData.cpp
Source/WebCore/bindings/js/JSCustomElementInterface.cpp
Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp
Source/WebCore/bindings/js/JSDOMGlobalObjectTask.cpp
Source/WebCore/bindings/js/JSDOMWindowBase.cpp
Source/WebCore/bindings/js/JSErrorHandler.cpp
Source/WebCore/bindings/js/JSEventListener.cpp
Source/WebCore/bindings/js/JSExecState.cpp [moved from Source/WebCore/bindings/js/JSMainThreadExecState.cpp with 62% similarity]
Source/WebCore/bindings/js/JSExecState.h [moved from Source/WebCore/bindings/js/JSMainThreadExecState.h with 83% similarity]
Source/WebCore/bindings/js/JSExecStateInstrumentation.h [moved from Source/WebCore/bindings/js/JSMainThreadExecStateInstrumentation.h with 81% similarity]
Source/WebCore/bindings/js/JSMicrotaskCallback.h [new file with mode: 0644]
Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp
Source/WebCore/bindings/js/ScheduledAction.cpp
Source/WebCore/bindings/js/ScriptController.cpp
Source/WebCore/bindings/js/WorkerScriptController.cpp
Source/WebCore/bridge/objc/WebScriptObject.mm
Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
Source/WebCore/inspector/InspectorCanvas.cpp
Source/WebCore/inspector/InspectorController.cpp
Source/WebCore/inspector/InspectorFrontendHost.cpp
Source/WebCore/inspector/TimelineRecordFactory.cpp
Source/WebCore/inspector/WorkerInspectorController.cpp
Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp
Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/PageConsoleClient.cpp
Source/WebCore/page/csp/ContentSecurityPolicy.cpp
Source/WebCore/platform/ThreadGlobalData.h
Source/WebCore/workers/WorkerGlobalScope.cpp
Source/WebCore/workers/WorkerGlobalScope.h
Source/WebCore/workers/WorkerThread.cpp
Source/WebCore/workers/service/ExtendableEvent.cpp
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementGtk.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeGtk.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathNSResolver.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.cpp
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/DOM/DOMAttr.mm
Source/WebKitLegacy/mac/DOM/DOMBlob.mm
Source/WebKitLegacy/mac/DOM/DOMCDATASection.mm
Source/WebKitLegacy/mac/DOM/DOMCSSCharsetRule.mm
Source/WebKitLegacy/mac/DOM/DOMCSSFontFaceRule.mm
Source/WebKitLegacy/mac/DOM/DOMCSSImportRule.mm
Source/WebKitLegacy/mac/DOM/DOMCSSMediaRule.mm
Source/WebKitLegacy/mac/DOM/DOMCSSPageRule.mm
Source/WebKitLegacy/mac/DOM/DOMCSSPrimitiveValue.mm
Source/WebKitLegacy/mac/DOM/DOMCSSRule.mm
Source/WebKitLegacy/mac/DOM/DOMCSSRuleList.mm
Source/WebKitLegacy/mac/DOM/DOMCSSStyleDeclaration.mm
Source/WebKitLegacy/mac/DOM/DOMCSSStyleRule.mm
Source/WebKitLegacy/mac/DOM/DOMCSSStyleSheet.mm
Source/WebKitLegacy/mac/DOM/DOMCSSUnknownRule.mm
Source/WebKitLegacy/mac/DOM/DOMCSSValue.mm
Source/WebKitLegacy/mac/DOM/DOMCSSValueList.mm
Source/WebKitLegacy/mac/DOM/DOMCharacterData.mm
Source/WebKitLegacy/mac/DOM/DOMComment.mm
Source/WebKitLegacy/mac/DOM/DOMCounter.mm
Source/WebKitLegacy/mac/DOM/DOMDocument.mm
Source/WebKitLegacy/mac/DOM/DOMDocumentFragment.mm
Source/WebKitLegacy/mac/DOM/DOMDocumentType.mm
Source/WebKitLegacy/mac/DOM/DOMElement.mm
Source/WebKitLegacy/mac/DOM/DOMEvent.mm
Source/WebKitLegacy/mac/DOM/DOMFile.mm
Source/WebKitLegacy/mac/DOM/DOMFileList.mm
Source/WebKitLegacy/mac/DOM/DOMHTML.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLAnchorElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLAppletElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLAreaElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLBRElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLBaseElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLBaseFontElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLBodyElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLButtonElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLCanvasElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLCollection.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLDListElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLDirectoryElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLDivElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLDocument.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLEmbedElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLFieldSetElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLFontElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLFormElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLFrameElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLFrameSetElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLHRElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLHeadElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLHeadingElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLHtmlElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLIFrameElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLImageElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLInputElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLLIElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLLabelElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLLegendElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLLinkElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLMapElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLMarqueeElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLMediaElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLMenuElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLMetaElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLModElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLOListElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLObjectElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLOptGroupElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLOptionElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLOptionsCollection.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLParagraphElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLParamElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLPreElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLQuoteElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLScriptElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLSelectElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLStyleElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLTableCaptionElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLTableCellElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLTableColElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLTableElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLTableRowElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLTableSectionElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLTextAreaElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLTitleElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLUListElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLVideoElement.mm
Source/WebKitLegacy/mac/DOM/DOMImplementation.mm
Source/WebKitLegacy/mac/DOM/DOMKeyboardEvent.mm
Source/WebKitLegacy/mac/DOM/DOMMediaError.mm
Source/WebKitLegacy/mac/DOM/DOMMediaList.mm
Source/WebKitLegacy/mac/DOM/DOMMouseEvent.mm
Source/WebKitLegacy/mac/DOM/DOMMutationEvent.mm
Source/WebKitLegacy/mac/DOM/DOMNamedNodeMap.mm
Source/WebKitLegacy/mac/DOM/DOMNode.mm
Source/WebKitLegacy/mac/DOM/DOMNodeIterator.mm
Source/WebKitLegacy/mac/DOM/DOMNodeList.mm
Source/WebKitLegacy/mac/DOM/DOMOverflowEvent.mm
Source/WebKitLegacy/mac/DOM/DOMProcessingInstruction.mm
Source/WebKitLegacy/mac/DOM/DOMProgressEvent.mm
Source/WebKitLegacy/mac/DOM/DOMRGBColor.mm
Source/WebKitLegacy/mac/DOM/DOMRange.mm
Source/WebKitLegacy/mac/DOM/DOMRect.mm
Source/WebKitLegacy/mac/DOM/DOMStyleSheet.mm
Source/WebKitLegacy/mac/DOM/DOMStyleSheetList.mm
Source/WebKitLegacy/mac/DOM/DOMText.mm
Source/WebKitLegacy/mac/DOM/DOMTextEvent.mm
Source/WebKitLegacy/mac/DOM/DOMTimeRanges.mm
Source/WebKitLegacy/mac/DOM/DOMTokenList.mm
Source/WebKitLegacy/mac/DOM/DOMTreeWalker.mm
Source/WebKitLegacy/mac/DOM/DOMUIEvent.mm
Source/WebKitLegacy/mac/DOM/DOMWheelEvent.mm
Source/WebKitLegacy/mac/DOM/DOMXPathExpression.mm
Source/WebKitLegacy/mac/DOM/DOMXPathResult.mm
Source/WebKitLegacy/mac/DOM/ObjCEventListener.mm

index 981ca45..09f09c2 100644 (file)
@@ -1,3 +1,17 @@
+2018-08-05  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        Add support for microtasks in workers
+        https://bugs.webkit.org/show_bug.cgi?id=188246
+
+        Reviewed by Darin Adler.
+
+        * http/wpt/workers/microtasks.any-expected.txt: Added.
+        * http/wpt/workers/microtasks.any.html: Added.
+        * http/wpt/workers/microtasks.any.js: Added.
+        (promise_test):
+        * http/wpt/workers/microtasks.any.worker-expected.txt: Added.
+        * http/wpt/workers/microtasks.any.worker.html: Added.
+
 2018-08-05  Philippe Normand  <pnormand@igalia.com>
 
         [MediaCapabilities] Platform integration
diff --git a/LayoutTests/http/wpt/workers/microtasks.any-expected.txt b/LayoutTests/http/wpt/workers/microtasks.any-expected.txt
new file mode 100644 (file)
index 0000000..e889b21
--- /dev/null
@@ -0,0 +1,5 @@
+
+PASS Microtasks should be executed earlier than macrotasks. 
+PASS Nested microtasks should be executed earlier than macrotasks. 
+PASS Microtasks should be executed in queued order. 
+
diff --git a/LayoutTests/http/wpt/workers/microtasks.any.html b/LayoutTests/http/wpt/workers/microtasks.any.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/http/wpt/workers/microtasks.any.js b/LayoutTests/http/wpt/workers/microtasks.any.js
new file mode 100644 (file)
index 0000000..3e1e036
--- /dev/null
@@ -0,0 +1,51 @@
+promise_test(() => {
+    var counter = 0;
+    var promise = new Promise(function (resolve) {
+        setTimeout(function () {
+            assert_equals(counter++, 3);
+            resolve();
+        }, 0);
+        Promise.resolve().then(function () {
+            assert_equals(counter++, 2);
+        });
+        assert_equals(counter++, 0);
+    });
+    assert_equals(counter++, 1);
+    return promise;
+}, "Microtasks should be executed earlier than macrotasks.");
+
+promise_test(() => {
+    var counter = 0;
+    var promise = new Promise(function (resolve) {
+        setTimeout(function () {
+            assert_equals(counter++, 4);
+            resolve();
+        }, 0);
+        Promise.resolve().then(function () {
+            Promise.resolve().then(function () {
+                assert_equals(counter++, 3);
+            });
+            assert_equals(counter++, 2);
+        });
+        assert_equals(counter++, 0);
+    });
+    assert_equals(counter++, 1);
+    return promise;
+}, "Nested microtasks should be executed earlier than macrotasks.");
+
+promise_test(() => {
+    var counter = 0;
+    return new Promise(function (resolve) {
+        Promise.resolve().then(function () {
+            assert_equals(counter++, 1);
+        });
+        Promise.resolve().then(function () {
+            assert_equals(counter++, 2);
+        });
+        Promise.resolve().then(function () {
+            assert_equals(counter++, 3);
+            resolve();
+        });
+        assert_equals(counter++, 0);
+    });
+}, "Microtasks should be executed in queued order.");
diff --git a/LayoutTests/http/wpt/workers/microtasks.any.worker-expected.txt b/LayoutTests/http/wpt/workers/microtasks.any.worker-expected.txt
new file mode 100644 (file)
index 0000000..e889b21
--- /dev/null
@@ -0,0 +1,5 @@
+
+PASS Microtasks should be executed earlier than macrotasks. 
+PASS Nested microtasks should be executed earlier than macrotasks. 
+PASS Microtasks should be executed in queued order. 
+
diff --git a/LayoutTests/http/wpt/workers/microtasks.any.worker.html b/LayoutTests/http/wpt/workers/microtasks.any.worker.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
index 1bc0aa3..548cac5 100644 (file)
@@ -1,3 +1,17 @@
+2018-08-05  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        Add support for microtasks in workers
+        https://bugs.webkit.org/show_bug.cgi?id=188246
+
+        Reviewed by Darin Adler.
+
+        This test is wrong[1,2]. It starts failing since our worker starts using correct microtask queues.
+
+        [1]: https://github.com/web-platform-tests/wpt/pull/8936
+        [2]: https://github.com/w3c/ServiceWorker/issues/1213#issuecomment-342640579
+
+        * web-platform-tests/service-workers/service-worker/extendable-event-async-waituntil.https-expected.txt:
+
 2018-08-03  Ryosuke Niwa  <rniwa@webkit.org>
 
         innerHTML should not synchronously create a custom element
index b65fc0e..902a978 100644 (file)
@@ -1,13 +1,13 @@
 
 
 PASS Test calling waitUntil in a different task without an existing extension throws 
-PASS Test calling waitUntil in a different microtask without an existing extension throws 
+FAIL Test calling waitUntil in a different microtask without an existing extension throws assert_unreached: unexpected rejection: assert_equals: expected "InvalidStateError" but got "OK" Reached unreachable code
 PASS Test calling waitUntil in a different task with an existing extension succeeds 
 PASS Test calling waitUntil with an existing extension promise handler succeeds 
-PASS Test calling waitUntil at the end of the microtask turn throws 
+FAIL Test calling waitUntil at the end of the microtask turn throws assert_unreached: unexpected rejection: assert_equals: expected "InvalidStateError" but got "OK" Reached unreachable code
 PASS Test calling waitUntil after the current extension expired in a different task fails 
 PASS Test calling waitUntil on a script constructed ExtendableEvent throws exception 
 PASS Test calling waitUntil asynchronously with pending respondWith promise. 
 PASS Test calling waitUntil synchronously inside microtask of respondWith promise. 
-PASS Test calling waitUntil asynchronously inside microtask of respondWith promise. 
+FAIL Test calling waitUntil asynchronously inside microtask of respondWith promise. assert_unreached: unexpected rejection: assert_equals: expected "InvalidStateError" but got "OK" Reached unreachable code
 
index c394147..35b4a0b 100644 (file)
@@ -1,3 +1,136 @@
+2018-08-05  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        Add support for microtasks in workers
+        https://bugs.webkit.org/show_bug.cgi?id=188246
+
+        Reviewed by Darin Adler.
+
+        This patch adds the microtask mechanism to workers. To adopt the existing microtask mechanism from the main thread,
+        we extend JSMainThreadExecState for non-main-threads. We rename it to JSExecState, and store stacked
+        ExecState* data in thread local storage in ThreadGlobalData instead of a static variable s_mainThreadState.
+
+        We add MicrotaskQueue to WorkerGlobalScope since each worker has its own thread and it should have its
+        own microtask queue.
+
+        * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSBindingsAllInOne.cpp:
+        * bindings/js/JSCallbackData.cpp:
+        (WebCore::JSCallbackData::invokeCallback):
+        * bindings/js/JSCustomElementInterface.cpp:
+        (WebCore::constructCustomElementSynchronously):
+        (WebCore::JSCustomElementInterface::upgradeElement):
+        (WebCore::JSCustomElementInterface::invokeCallback):
+        * bindings/js/JSCustomXPathNSResolver.cpp:
+        (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
+        * bindings/js/JSDOMGlobalObjectTask.cpp:
+        * bindings/js/JSDOMWindowBase.cpp:
+        (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
+        Queue a microtask to MicrotaskQueue instead of posting a macrotask.
+
+        (WebCore::JSDOMWindowMicrotaskCallback::create): Deleted.
+        (WebCore::JSDOMWindowMicrotaskCallback::call): Deleted.
+        (WebCore::JSDOMWindowMicrotaskCallback::JSDOMWindowMicrotaskCallback): Deleted.
+        (): Deleted.
+        Extract JSDOMWindowMicrotaskCallback as JSMicrotaskCallback and create a new file for it.
+
+        * bindings/js/JSErrorHandler.cpp:
+        (WebCore::JSErrorHandler::handleEvent):
+        * bindings/js/JSEventListener.cpp:
+        (WebCore::JSEventListener::handleEvent):
+        * bindings/js/JSExecState.cpp: Renamed from Source/WebCore/bindings/js/JSMainThreadExecState.cpp.
+        (WebCore::JSExecState::didLeaveScriptContext):
+        If we are in a main thread, we consume main thread microtask queue. If we are in worker thread,
+        we consume a microtask queue per worker.
+
+        (WebCore::functionCallHandlerFromAnyThread):
+        (WebCore::evaluateHandlerFromAnyThread):
+        * bindings/js/JSExecState.h: Renamed from Source/WebCore/bindings/js/JSMainThreadExecState.h.
+        (WebCore::JSExecState::currentState):
+        (WebCore::JSExecState::call):
+        (WebCore::JSExecState::evaluate):
+        (WebCore::JSExecState::profiledCall):
+        (WebCore::JSExecState::profiledEvaluate):
+        (WebCore::JSExecState::runTask):
+        (WebCore::JSExecState::loadModule):
+        (WebCore::JSExecState::linkAndEvaluateModule):
+        (WebCore::JSExecState::JSExecState):
+        (WebCore::JSExecState::~JSExecState):
+        (WebCore::JSExecState::setCurrentState):
+        Store and load ExecState in thread local storage, ThreadGlobalData. This allows us to use it for workers.
+
+        (WebCore::JSMainThreadNullState::JSMainThreadNullState):
+        (WebCore::JSMainThreadNullState::~JSMainThreadNullState):
+        We keep this name "JSMainThreadNullState" since CustomElementReactionStack should be stick to the main thread.
+        And this class is only used in the main thread.
+
+        * bindings/js/JSExecStateInstrumentation.h: Renamed from Source/WebCore/bindings/js/JSMainThreadExecStateInstrumentation.h.
+        (WebCore::JSExecState::instrumentFunctionInternal):
+        (WebCore::JSExecState::instrumentFunctionCall):
+        (WebCore::JSExecState::instrumentFunctionConstruct):
+        * bindings/js/JSMicrotaskCallback.h: Copied from Source/WebKitLegacy/mac/DOM/DOMHTMLBaseElement.mm.
+        (WebCore::JSMicrotaskCallback::create):
+        (WebCore::JSMicrotaskCallback::call):
+        (WebCore::JSMicrotaskCallback::JSMicrotaskCallback):
+        * bindings/js/JSWorkerGlobalScopeBase.cpp:
+        (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
+        * bindings/js/ScheduledAction.cpp:
+        (WebCore::ScheduledAction::executeFunctionInContext):
+        * bindings/js/ScriptController.cpp:
+        (WebCore::ScriptController::evaluateInWorld):
+        (WebCore::ScriptController::loadModuleScriptInWorld):
+        (WebCore::ScriptController::linkAndEvaluateModuleScriptInWorld):
+        (WebCore::ScriptController::canAccessFromCurrentOrigin):
+        * bindings/js/WorkerScriptController.cpp:
+        (WebCore::WorkerScriptController::evaluate):
+        * bridge/objc/WebScriptObject.mm:
+        (-[WebScriptObject callWebScriptMethod:withArguments:]):
+        (-[WebScriptObject evaluateWebScript:]):
+        * html/canvas/WebGLRenderingContextBase.cpp:
+        (WebCore::WebGLRenderingContextBase::compileShader):
+        (WebCore::WebGLRenderingContextBase::printToConsole):
+        * inspector/InspectorCanvas.cpp:
+        (WebCore::InspectorCanvas::buildObjectForCanvas):
+        (WebCore::InspectorCanvas::buildAction):
+        * inspector/InspectorController.cpp:
+        * inspector/InspectorFrontendHost.cpp:
+        * inspector/TimelineRecordFactory.cpp:
+        (WebCore::TimelineRecordFactory::createGenericRecord):
+        * inspector/WorkerInspectorController.cpp:
+        * inspector/agents/InspectorCanvasAgent.cpp:
+        * inspector/agents/InspectorNetworkAgent.cpp:
+        (WebCore::InspectorNetworkAgent::buildInitiatorObject):
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::postMessage):
+        * page/PageConsoleClient.cpp:
+        (WebCore::PageConsoleClient::addMessage):
+        * page/csp/ContentSecurityPolicy.cpp:
+        (WebCore::ContentSecurityPolicy::reportViolation const):
+        * platform/ThreadGlobalData.h:
+        (WebCore::ThreadGlobalData::ThreadGlobalData::currentState const):
+        (WebCore::ThreadGlobalData::ThreadGlobalData::setCurrentState):
+        * workers/WorkerGlobalScope.cpp:
+        (WebCore::WorkerGlobalScope::WorkerGlobalScope):
+        (WebCore::WorkerGlobalScope::removeMicrotaskQueue):
+        * workers/WorkerGlobalScope.h:
+        (WebCore::WorkerGlobalScope::microtaskQueue const):
+        * workers/WorkerThread.cpp:
+        (WebCore::WorkerThread::stop):
+        * workers/service/ExtendableEvent.cpp:
+        (WebCore::ExtendableEvent::addExtendLifetimePromise):
+        When dispatching an "install" event from service worker, we first create an event,
+        dispatch it, and set a handler which is called when a pending promise count becomes zero.
+        However, the old code checked pending promise count in a queued microtask. It worked
+        previously because microtask is actually a macrotask in the service worker. So this check
+        is done after a handler is set. But this patch introduces real microtask, and this check
+        happens before a handler is set because dispatching an event can exhaust microtask queue.
+        According to the spec, this check should not be done in microtask[1]. We make this checking
+        part as a macrotask. We note that algorithm noted as FIXMEs should be done in this
+        microtask while the checking part should not be done.
+
+        [1]: https://w3c.github.io/ServiceWorker/#installation-algorithm
+
 2018-08-05  Ryosuke Niwa  <rniwa@webkit.org>
 
         Properties set on window.customElements can disappear due to GC
index 18f0d7c..476d2e5 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "LegacyCDMSessionClearKey.h"
 
-#include "JSMainThreadExecState.h"
+#include "JSExecState.h"
 #include "Logging.h"
 #include "TextEncoding.h"
 #include "WebKitMediaKeyError.h"
index bae20c5..4fd9b68 100644 (file)
@@ -401,6 +401,7 @@ bindings/js/JSErrorHandler.cpp
 bindings/js/JSEventCustom.cpp
 bindings/js/JSEventListener.cpp
 bindings/js/JSEventTargetCustom.cpp
+bindings/js/JSExecState.cpp
 bindings/js/JSExtendableMessageEventCustom.cpp
 bindings/js/JSFetchEventCustom.cpp
 bindings/js/JSFileSystemEntryCustom.cpp
@@ -417,7 +418,6 @@ bindings/js/JSIDBTransactionCustom.cpp
 bindings/js/JSImageDataCustom.cpp
 bindings/js/JSLazyEventListener.cpp
 bindings/js/JSLocationCustom.cpp
-bindings/js/JSMainThreadExecState.cpp
 bindings/js/JSMediaStreamTrackCustom.cpp
 bindings/js/JSMessageChannelCustom.cpp
 bindings/js/JSMessageEventCustom.cpp
index cee8d7e..004dca1 100644 (file)
                93CCF0270AF6C52900018E89 /* NavigationAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CCF0260AF6C52900018E89 /* NavigationAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93D196311D6CAB7600FC7E47 /* ExceptionOr.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D196301D6CAB7600FC7E47 /* ExceptionOr.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93D196331D6CAB8200FC7E47 /* Exception.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D196321D6CAB8200FC7E47 /* Exception.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               93D4379F1D57B15300AB85EA /* JSMainThreadExecState.h in Headers */ = {isa = PBXBuildFile; fileRef = 8F934D831189F1EE00508D5D /* JSMainThreadExecState.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               93D4379F1D57B15300AB85EA /* JSExecState.h in Headers */ = {isa = PBXBuildFile; fileRef = 8F934D831189F1EE00508D5D /* JSExecState.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93D437A01D57B19A00AB85EA /* CustomElementReactionQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B56C9A81C89312800C456DF /* CustomElementReactionQueue.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93D437A11D57B3F400AB85EA /* ElementDescendantIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = ADE11F4A18D8311B0078983B /* ElementDescendantIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93D437A21D57B3FE00AB85EA /* URLUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 656B9DCA189DE10000BB842C /* URLUtils.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E3B2F0EE1D7F4CA900B0C9D1 /* LoadableScriptClient.h in Headers */ = {isa = PBXBuildFile; fileRef = E3B2F0E81D7F35EC00B0C9D1 /* LoadableScriptClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E3B2F0F01D7F4CB500B0C9D1 /* LoadableClassicScript.h in Headers */ = {isa = PBXBuildFile; fileRef = E3B2F0E41D7F35EC00B0C9D1 /* LoadableClassicScript.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E3C99A091DC3D41C00794AD3 /* DOMJITCheckDOM.h in Headers */ = {isa = PBXBuildFile; fileRef = E3C99A081DC3D41700794AD3 /* DOMJITCheckDOM.h */; };
+               E3C9AECB2113149900419B92 /* JSMicrotaskCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = E3C9AEC92113147400419B92 /* JSMicrotaskCallback.h */; };
                E3E4E2A81E3B17100023BB8A /* ScriptElementCachedScriptFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = E3E4E2A61E3B16FC0023BB8A /* ScriptElementCachedScriptFetcher.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E3FA38641D71812D00AA5950 /* PendingScriptClient.h in Headers */ = {isa = PBXBuildFile; fileRef = E3FA38611D716E7600AA5950 /* PendingScriptClient.h */; };
                E401C27517CE53EC00C41A35 /* ElementIteratorAssertions.h in Headers */ = {isa = PBXBuildFile; fileRef = E401C27417CE53EC00C41A35 /* ElementIteratorAssertions.h */; settings = {ATTRIBUTES = (Private, ); }; };
                8E620E8020EE5FFC007BC5EF /* VRPlatformDisplayClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VRPlatformDisplayClient.h; sourceTree = "<group>"; };
                8EC6C961201A250100FBFA53 /* GapLength.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GapLength.h; sourceTree = "<group>"; };
                8F6756191288B17B0047ACA3 /* EventQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventQueue.h; sourceTree = "<group>"; };
-               8F934D831189F1EE00508D5D /* JSMainThreadExecState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMainThreadExecState.h; sourceTree = "<group>"; };
-               8F934D841189F1EE00508D5D /* JSMainThreadExecState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMainThreadExecState.cpp; sourceTree = "<group>"; };
+               8F934D831189F1EE00508D5D /* JSExecState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSExecState.h; sourceTree = "<group>"; };
+               8F934D841189F1EE00508D5D /* JSExecState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSExecState.cpp; sourceTree = "<group>"; };
                9001773D12E0347800648462 /* OESStandardDerivatives.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OESStandardDerivatives.cpp; sourceTree = "<group>"; };
                9001773E12E0347800648462 /* OESStandardDerivatives.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OESStandardDerivatives.h; sourceTree = "<group>"; };
                9001773F12E0347800648462 /* OESStandardDerivatives.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = OESStandardDerivatives.idl; sourceTree = "<group>"; };
                B543B85617EB758F003BE93A /* SVGPropertyInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPropertyInfo.cpp; sourceTree = "<group>"; };
                B562DB5E17D3CD560010AF96 /* HTMLElementTypeHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTMLElementTypeHelpers.h; sourceTree = "<group>"; };
                B562DB5F17D3CD560010AF96 /* SVGElementTypeHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGElementTypeHelpers.h; sourceTree = "<group>"; };
-               B56576E417DA599F00A56BDC /* JSMainThreadExecStateInstrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMainThreadExecStateInstrumentation.h; sourceTree = "<group>"; };
+               B56576E417DA599F00A56BDC /* JSExecStateInstrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSExecStateInstrumentation.h; sourceTree = "<group>"; };
                B56579B41824D12A00E79F23 /* RenderChildIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderChildIterator.h; sourceTree = "<group>"; };
                B57CB52B182A37F60079A647 /* InlineElementBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineElementBox.h; sourceTree = "<group>"; };
                B57CB52C182A3EED0079A647 /* InlineElementBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InlineElementBox.cpp; sourceTree = "<group>"; };
                E3B2F0E91D7F3D3C00B0C9D1 /* LoadableScript.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoadableScript.cpp; sourceTree = "<group>"; };
                E3B7C0621DC3415A001FB0B8 /* JSDocumentDOMJIT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDocumentDOMJIT.cpp; sourceTree = "<group>"; };
                E3C99A081DC3D41700794AD3 /* DOMJITCheckDOM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMJITCheckDOM.h; sourceTree = "<group>"; };
+               E3C9AEC92113147400419B92 /* JSMicrotaskCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMicrotaskCallback.h; sourceTree = "<group>"; };
                E3D049931DADC04500718F3C /* NodeConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeConstants.h; sourceTree = "<group>"; };
                E3E4E2A51E3B16FC0023BB8A /* ScriptElementCachedScriptFetcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptElementCachedScriptFetcher.cpp; sourceTree = "<group>"; };
                E3E4E2A61E3B16FC0023BB8A /* ScriptElementCachedScriptFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptElementCachedScriptFetcher.h; sourceTree = "<group>"; };
                                65E0E9431133C89F00B4CB10 /* JSDOMWrapper.h */,
                                7C45C9CB1E3E8E4900AAB558 /* JSDOMWrapperCache.cpp */,
                                7C45C9C81E3E8B5100AAB558 /* JSDOMWrapperCache.h */,
-                               8F934D841189F1EE00508D5D /* JSMainThreadExecState.cpp */,
-                               8F934D831189F1EE00508D5D /* JSMainThreadExecState.h */,
-                               B56576E417DA599F00A56BDC /* JSMainThreadExecStateInstrumentation.h */,
+                               8F934D841189F1EE00508D5D /* JSExecState.cpp */,
+                               8F934D831189F1EE00508D5D /* JSExecState.h */,
+                               B56576E417DA599F00A56BDC /* JSExecStateInstrumentation.h */,
+                               E3C9AEC92113147400419B92 /* JSMicrotaskCallback.h */,
                                93B70D4F09EB0C7C009D8468 /* JSPluginElementFunctions.cpp */,
                                93B70D5009EB0C7C009D8468 /* JSPluginElementFunctions.h */,
                                4129DF831BB5B7F700322A16 /* JSReadableStreamPrivateConstructors.cpp */,
                                E0FEF372B37C53EAC1C1FBEE /* JSEventSource.h in Headers */,
                                5FC7DC26CFE2563200B85AE4 /* JSEventTarget.h in Headers */,
                                46B63F6C1C6E8D19002E914B /* JSEventTargetCustom.h in Headers */,
+                               93D4379F1D57B15300AB85EA /* JSExecState.h in Headers */,
                                724ED3321A3A8B2300F5F13C /* JSEXTBlendMinMax.h in Headers */,
                                7E4C96DD1AD4483500365A53 /* JSExtendableEvent.h in Headers */,
                                83102B271F9EADD900E404B9 /* JSExtendableMessageEvent.h in Headers */,
                                935F45430F7C3B5F00D7C1FB /* JSLazyEventListener.h in Headers */,
                                BCE1C43C0D9830D3003B02F2 /* JSLocation.h in Headers */,
                                93A806201E03B585008A1F26 /* JSLongRange.h in Headers */,
-                               93D4379F1D57B15300AB85EA /* JSMainThreadExecState.h in Headers */,
                                CDAB6D2E17C814EE00C60B34 /* JSMediaControlsHost.h in Headers */,
                                159741DB1B7D140100201C92 /* JSMediaDeviceInfo.h in Headers */,
                                15739BBB1B42012D00D258C1 /* JSMediaDevices.h in Headers */,
                                E107400E0E77BDC00033AF24 /* JSMessageChannel.h in Headers */,
                                75793EC90D0CE72D007FC0AC /* JSMessageEvent.h in Headers */,
                                E1ADEDDA0E76BD93004A1A5E /* JSMessagePort.h in Headers */,
+                               E3C9AECB2113149900419B92 /* JSMicrotaskCallback.h in Headers */,
                                A86629D109DA2B48009633A5 /* JSMouseEvent.h in Headers */,
                                830A36BD1DAC5FAD006D7D09 /* JSMouseEventInit.h in Headers */,
                                65DF31FC09D1CC60000BE325 /* JSMutationEvent.h in Headers */,
index 8166c76..f6d9756 100644 (file)
@@ -62,6 +62,7 @@
 #include "JSEventCustom.cpp"
 #include "JSEventListener.cpp"
 #include "JSEventTargetCustom.cpp"
+#include "JSExecState.cpp"
 #include "JSExtendableMessageEventCustom.cpp"
 #include "JSFileSystemEntryCustom.cpp"
 #include "JSHTMLCollectionCustom.cpp"
@@ -72,7 +73,6 @@
 #include "JSImageDataCustom.cpp"
 #include "JSLazyEventListener.cpp"
 #include "JSLocationCustom.cpp"
-#include "JSMainThreadExecState.cpp"
 #include "JSMediaStreamTrackCustom.cpp"
 #include "JSMessageChannelCustom.cpp"
 #include "JSMessageEventCustom.cpp"
index 90a837e..9ba0eaf 100644 (file)
@@ -31,8 +31,8 @@
 
 #include "Document.h"
 #include "JSDOMBinding.h"
-#include "JSMainThreadExecState.h"
-#include "JSMainThreadExecStateInstrumentation.h"
+#include "JSExecState.h"
+#include "JSExecStateInstrumentation.h"
 #include <JavaScriptCore/Exception.h>
 
 namespace WebCore {
@@ -75,12 +75,10 @@ JSValue JSCallbackData::invokeCallback(JSDOMGlobalObject& globalObject, JSObject
     if (!context)
         return JSValue();
 
-    InspectorInstrumentationCookie cookie = JSMainThreadExecState::instrumentFunctionCall(context, callType, callData);
+    InspectorInstrumentationCookie cookie = JSExecState::instrumentFunctionCall(context, callType, callData);
 
     returnedException = nullptr;
-    JSValue result = context->isDocument()
-        ? JSMainThreadExecState::profiledCall(exec, JSC::ProfilingReason::Other, function, callType, callData, thisValue, args, returnedException)
-        : JSC::profiledCall(exec, JSC::ProfilingReason::Other, function, callType, callData, thisValue, args, returnedException);
+    JSValue result = JSExecState::profiledCall(exec, JSC::ProfilingReason::Other, function, callType, callData, thisValue, args, returnedException);
 
     InspectorInstrumentation::didCallFunction(cookie, context);
 
index f10815f..ec172a4 100644 (file)
@@ -35,9 +35,9 @@
 #include "JSDOMConvertStrings.h"
 #include "JSDOMWindow.h"
 #include "JSElement.h"
+#include "JSExecState.h"
+#include "JSExecStateInstrumentation.h"
 #include "JSHTMLElement.h"
-#include "JSMainThreadExecState.h"
-#include "JSMainThreadExecStateInstrumentation.h"
 #include "ScriptExecutionContext.h"
 #include <JavaScriptCore/JSLock.h>
 #include <JavaScriptCore/WeakInlines.h>
@@ -124,7 +124,7 @@ static RefPtr<Element> constructCustomElementSynchronously(Document& document, V
         return nullptr;
     }
 
-    InspectorInstrumentationCookie cookie = JSMainThreadExecState::instrumentFunctionConstruct(&document, constructType, constructData);
+    InspectorInstrumentationCookie cookie = JSExecState::instrumentFunctionConstruct(&document, constructType, constructData);
     MarkedArgumentBuffer args;
     ASSERT(!args.hasOverflowed());
     JSValue newElement = construct(&state, constructor, constructType, constructData, args);
@@ -199,7 +199,7 @@ void JSCustomElementInterface::upgradeElement(Element& element)
 
     MarkedArgumentBuffer args;
     ASSERT(!args.hasOverflowed());
-    InspectorInstrumentationCookie cookie = JSMainThreadExecState::instrumentFunctionConstruct(context, constructType, constructData);
+    InspectorInstrumentationCookie cookie = JSExecState::instrumentFunctionConstruct(context, constructType, constructData);
     JSValue returnedElement = construct(state, m_constructor.get(), constructType, constructData, args);
     InspectorInstrumentation::didCallFunction(cookie, context);
 
@@ -248,10 +248,10 @@ void JSCustomElementInterface::invokeCallback(Element& element, JSObject* callba
     addArguments(state, globalObject, args);
     RELEASE_ASSERT(!args.hasOverflowed());
 
-    InspectorInstrumentationCookie cookie = JSMainThreadExecState::instrumentFunctionCall(context, callType, callData);
+    InspectorInstrumentationCookie cookie = JSExecState::instrumentFunctionCall(context, callType, callData);
 
     NakedPtr<JSC::Exception> exception;
-    JSMainThreadExecState::call(state, callback, callType, callData, jsElement, args, exception);
+    JSExecState::call(state, callback, callType, callData, jsElement, args, exception);
 
     InspectorInstrumentation::didCallFunction(cookie, context);
 
index 76a662f..21acf02 100644 (file)
@@ -32,7 +32,7 @@
 #include "Frame.h"
 #include "JSDOMExceptionHandling.h"
 #include "JSDOMWindowCustom.h"
-#include "JSMainThreadExecState.h"
+#include "JSExecState.h"
 #include "Page.h"
 #include "PageConsoleClient.h"
 #include <JavaScriptCore/JSLock.h>
@@ -91,7 +91,7 @@ String JSCustomXPathNSResolver::lookupNamespaceURI(const String& prefix)
     ASSERT(!args.hasOverflowed());
 
     NakedPtr<JSC::Exception> exception;
-    JSValue retval = JSMainThreadExecState::call(exec, function, callType, callData, m_customResolver.get(), args, exception);
+    JSValue retval = JSExecState::call(exec, function, callType, callData, m_customResolver.get(), args, exception);
 
     String result;
     if (exception)
index 664ec33..9fc306c 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "ActiveDOMCallback.h"
 #include "JSDOMGlobalObject.h"
-#include "JSMainThreadExecState.h"
+#include "JSExecState.h"
 #include <JavaScriptCore/Microtask.h>
 #include <JavaScriptCore/StrongInlines.h>
 #include <wtf/Ref.h>
@@ -59,13 +59,7 @@ public:
         // We will fail to get the context if the frame has been detached.
         if (!context)
             return;
-
-        // When on the main thread (e.g. the document's thread), we need to make sure to
-        // push the current ExecState on to the JSMainThreadExecState stack.
-        if (context->isDocument())
-            JSMainThreadExecState::runTask(exec, m_task);
-        else
-            m_task->run(exec);
+        JSExecState::runTask(exec, m_task);
         scope.assertNoException();
     }
 
index f4d8cf3..2222822 100644 (file)
@@ -36,7 +36,7 @@
 #include "JSDOMGlobalObjectTask.h"
 #include "JSDOMWindowCustom.h"
 #include "JSFetchResponse.h"
-#include "JSMainThreadExecState.h"
+#include "JSMicrotaskCallback.h"
 #include "JSNode.h"
 #include "Logging.h"
 #include "Page.h"
@@ -205,43 +205,11 @@ RuntimeFlags JSDOMWindowBase::javaScriptRuntimeFlags(const JSGlobalObject* objec
     return frame->settings().javaScriptRuntimeFlags();
 }
 
-class JSDOMWindowMicrotaskCallback : public RefCounted<JSDOMWindowMicrotaskCallback> {
-public:
-    static Ref<JSDOMWindowMicrotaskCallback> create(JSDOMWindowBase& globalObject, Ref<JSC::Microtask>&& task)
-    {
-        return adoptRef(*new JSDOMWindowMicrotaskCallback(globalObject, WTFMove(task)));
-    }
-
-    void call()
-    {
-        Ref<JSDOMWindowMicrotaskCallback> protectedThis(*this);
-        VM& vm = m_globalObject->vm();
-        JSLockHolder lock(vm);
-        auto scope = DECLARE_THROW_SCOPE(vm);
-
-        ExecState* exec = m_globalObject->globalExec();
-
-        JSMainThreadExecState::runTask(exec, m_task);
-
-        scope.assertNoException();
-    }
-
-private:
-    JSDOMWindowMicrotaskCallback(JSDOMWindowBase& globalObject, Ref<JSC::Microtask>&& task)
-        : m_globalObject { globalObject.vm(), &globalObject }
-        , m_task { WTFMove(task) }
-    {
-    }
-
-    Strong<JSDOMWindowBase> m_globalObject;
-    Ref<JSC::Microtask> m_task;
-};
-
 void JSDOMWindowBase::queueTaskToEventLoop(JSGlobalObject& object, Ref<JSC::Microtask>&& task)
 {
     JSDOMWindowBase& thisObject = static_cast<JSDOMWindowBase&>(object);
 
-    RefPtr<JSDOMWindowMicrotaskCallback> callback = JSDOMWindowMicrotaskCallback::create(thisObject, WTFMove(task));
+    RefPtr<JSMicrotaskCallback> callback = JSMicrotaskCallback::create(thisObject, WTFMove(task));
     auto microtask = std::make_unique<ActiveDOMCallbackMicrotask>(MicrotaskQueue::mainThreadQueue(), *thisObject.scriptExecutionContext(), [callback]() mutable {
         callback->call();
     });
index f72e185..4291989 100644 (file)
@@ -38,8 +38,8 @@
 #include "JSDOMConvertNumbers.h"
 #include "JSDOMConvertStrings.h"
 #include "JSEvent.h"
-#include "JSMainThreadExecState.h"
-#include "JSMainThreadExecStateInstrumentation.h"
+#include "JSExecState.h"
+#include "JSExecStateInstrumentation.h"
 #include <JavaScriptCore/JSLock.h>
 #include <JavaScriptCore/VMEntryScope.h>
 #include <wtf/Ref.h>
@@ -99,12 +99,10 @@ void JSErrorHandler::handleEvent(ScriptExecutionContext& scriptExecutionContext,
         VM& vm = globalObject->vm();
         VMEntryScope entryScope(vm, vm.entryScope ? vm.entryScope->globalObject() : globalObject);
 
-        InspectorInstrumentationCookie cookie = JSMainThreadExecState::instrumentFunctionCall(&scriptExecutionContext, callType, callData);
+        InspectorInstrumentationCookie cookie = JSExecState::instrumentFunctionCall(&scriptExecutionContext, callType, callData);
 
         NakedPtr<JSC::Exception> exception;
-        JSValue returnValue = scriptExecutionContext.isDocument()
-            ? JSMainThreadExecState::profiledCall(exec, JSC::ProfilingReason::Other, jsFunction, callType, callData, globalObject, args, exception)
-            : JSC::profiledCall(exec, JSC::ProfilingReason::Other, jsFunction, callType, callData, globalObject, args, exception);
+        JSValue returnValue = JSExecState::profiledCall(exec, JSC::ProfilingReason::Other, jsFunction, callType, callData, globalObject, args, exception);
 
         InspectorInstrumentation::didCallFunction(cookie, &scriptExecutionContext);
 
index a015d7e..9931fe8 100644 (file)
@@ -30,8 +30,8 @@
 #include "JSDocument.h"
 #include "JSEvent.h"
 #include "JSEventTarget.h"
-#include "JSMainThreadExecState.h"
-#include "JSMainThreadExecStateInstrumentation.h"
+#include "JSExecState.h"
+#include "JSExecStateInstrumentation.h"
 #include "JSWorkerGlobalScope.h"
 #include "ScriptController.h"
 #include "WorkerGlobalScope.h"
@@ -165,13 +165,11 @@ void JSEventListener::handleEvent(ScriptExecutionContext& scriptExecutionContext
 
         VMEntryScope entryScope(vm, vm.entryScope ? vm.entryScope->globalObject() : globalObject);
 
-        InspectorInstrumentationCookie cookie = JSMainThreadExecState::instrumentFunctionCall(&scriptExecutionContext, callType, callData);
+        InspectorInstrumentationCookie cookie = JSExecState::instrumentFunctionCall(&scriptExecutionContext, callType, callData);
 
         JSValue thisValue = handleEventFunction == jsFunction ? toJS(exec, globalObject, event.currentTarget()) : jsFunction;
         NakedPtr<JSC::Exception> exception;
-        JSValue retval = scriptExecutionContext.isDocument()
-            ? JSMainThreadExecState::profiledCall(exec, JSC::ProfilingReason::Other, handleEventFunction, callType, callData, thisValue, args, exception)
-            : JSC::profiledCall(exec, JSC::ProfilingReason::Other, handleEventFunction, callType, callData, thisValue, args, exception);
+        JSValue retval = JSExecState::profiledCall(exec, JSC::ProfilingReason::Other, handleEventFunction, callType, callData, thisValue, args, exception);
 
         InspectorInstrumentation::didCallFunction(cookie, &scriptExecutionContext);
 
  */
 
 #include "config.h"
-#include "JSMainThreadExecState.h"
+#include "JSExecState.h"
 
 #include "Microtasks.h"
 #include "RejectedPromiseTracker.h"
 #include "ScriptExecutionContext.h"
 #include "ScriptState.h"
+#include "WorkerGlobalScope.h"
 
 namespace WebCore {
 
-JSC::ExecState* JSMainThreadExecState::s_mainThreadState = 0;
-
-void JSMainThreadExecState::didLeaveScriptContext(JSC::ExecState* exec)
+void JSExecState::didLeaveScriptContext(JSC::ExecState* exec)
 {
-    MicrotaskQueue::mainThreadQueue().performMicrotaskCheckpoint();
-    scriptExecutionContextFromExecState(exec)->ensureRejectedPromiseTracker().processQueueSoon();
+    // While main thread has many ScriptExecutionContexts, WorkerGlobalScope and worker thread have
+    // one on one correspondence. The lifetime of MicrotaskQueue is aligned to this semantics.
+    // While main thread MicrotaskQueue is persistently held, worker's MicrotaskQueue is held by
+    // WorkerGlobalScope.
+    ScriptExecutionContext* context = scriptExecutionContextFromExecState(exec);
+    if (isMainThread()) {
+        MicrotaskQueue::mainThreadQueue().performMicrotaskCheckpoint();
+        // FIXME: Promise rejection tracker is available only in non-worker environment.
+        // https://bugs.webkit.org/show_bug.cgi?id=188265
+        context->ensureRejectedPromiseTracker().processQueueSoon();
+    } else {
+        ASSERT(context->isWorkerGlobalScope());
+        static_cast<WorkerGlobalScope*>(context)->microtaskQueue().performMicrotaskCheckpoint();
+    }
 }
 
 JSC::JSValue functionCallHandlerFromAnyThread(JSC::ExecState* exec, JSC::JSValue functionObject, JSC::CallType callType, const JSC::CallData& callData, JSC::JSValue thisValue, const JSC::ArgList& args, NakedPtr<JSC::Exception>& returnedException)
 {
-    if (isMainThread())
-        return JSMainThreadExecState::call(exec, functionObject, callType, callData, thisValue, args, returnedException);
-    return JSC::call(exec, functionObject, callType, callData, thisValue, args, returnedException);
+    return JSExecState::call(exec, functionObject, callType, callData, thisValue, args, returnedException);
 }
 
 JSC::JSValue evaluateHandlerFromAnyThread(JSC::ExecState* exec, const JSC::SourceCode& source, JSC::JSValue thisValue, NakedPtr<JSC::Exception>& returnedException)
 {
-    if (isMainThread())
-        return JSMainThreadExecState::evaluate(exec, source, thisValue, returnedException);
-    return JSC::evaluate(exec, source, thisValue, returnedException);
+    return JSExecState::evaluate(exec, source, thisValue, returnedException);
 }
 
 } // namespace WebCore
 
 #include "CustomElementReactionQueue.h"
 #include "JSDOMBinding.h"
+#include "ThreadGlobalData.h"
 #include <JavaScriptCore/CatchScope.h>
 #include <JavaScriptCore/Completion.h>
 #include <JavaScriptCore/Microtask.h>
+#include <wtf/ForbidHeapAllocation.h>
 #include <wtf/MainThread.h>
 
 namespace WebCore {
@@ -38,25 +40,25 @@ namespace WebCore {
 class InspectorInstrumentationCookie;
 class ScriptExecutionContext;
 
-class JSMainThreadExecState {
-    WTF_MAKE_NONCOPYABLE(JSMainThreadExecState);
+class JSExecState {
+    WTF_MAKE_NONCOPYABLE(JSExecState);
+    WTF_FORBID_HEAP_ALLOCATION;
     friend class JSMainThreadNullState;
 public:
     static JSC::ExecState* currentState()
     {
-        ASSERT(isMainThread());
-        return s_mainThreadState;
+        return threadGlobalData().currentState();
     };
     
     static JSC::JSValue call(JSC::ExecState* exec, JSC::JSValue functionObject, JSC::CallType callType, const JSC::CallData& callData, JSC::JSValue thisValue, const JSC::ArgList& args, NakedPtr<JSC::Exception>& returnedException)
     {
-        JSMainThreadExecState currentState(exec);
+        JSExecState currentState(exec);
         return JSC::call(exec, functionObject, callType, callData, thisValue, args, returnedException);
     };
 
     static JSC::JSValue evaluate(JSC::ExecState* exec, const JSC::SourceCode& source, JSC::JSValue thisValue, NakedPtr<JSC::Exception>& returnedException)
     {
-        JSMainThreadExecState currentState(exec);
+        JSExecState currentState(exec);
         return JSC::evaluate(exec, source, thisValue, returnedException);
     };
 
@@ -68,13 +70,13 @@ public:
 
     static JSC::JSValue profiledCall(JSC::ExecState* exec, JSC::ProfilingReason reason, JSC::JSValue functionObject, JSC::CallType callType, const JSC::CallData& callData, JSC::JSValue thisValue, const JSC::ArgList& args, NakedPtr<JSC::Exception>& returnedException)
     {
-        JSMainThreadExecState currentState(exec);
+        JSExecState currentState(exec);
         return JSC::profiledCall(exec, reason, functionObject, callType, callData, thisValue, args, returnedException);
     }
 
     static JSC::JSValue profiledEvaluate(JSC::ExecState* exec, JSC::ProfilingReason reason, const JSC::SourceCode& source, JSC::JSValue thisValue, NakedPtr<JSC::Exception>& returnedException)
     {
-        JSMainThreadExecState currentState(exec);
+        JSExecState currentState(exec);
         return JSC::profiledEvaluate(exec, reason, source, thisValue, returnedException);
     }
 
@@ -86,19 +88,19 @@ public:
 
     static void runTask(JSC::ExecState* exec, JSC::Microtask& task)
     {
-        JSMainThreadExecState currentState(exec);
+        JSExecState currentState(exec);
         task.run(exec);
     }
 
     static JSC::JSInternalPromise& loadModule(JSC::ExecState& state, const String& moduleName, JSC::JSValue parameters, JSC::JSValue scriptFetcher)
     {
-        JSMainThreadExecState currentState(&state);
+        JSExecState currentState(&state);
         return *JSC::loadModule(&state, moduleName, parameters, scriptFetcher);
     }
 
     static JSC::JSInternalPromise& loadModule(JSC::ExecState& state, const JSC::SourceCode& sourceCode, JSC::JSValue scriptFetcher)
     {
-        JSMainThreadExecState currentState(&state);
+        JSExecState currentState(&state);
         return *JSC::loadModule(&state, sourceCode, scriptFetcher);
     }
 
@@ -107,7 +109,7 @@ public:
         JSC::VM& vm = state.vm();
         auto scope = DECLARE_CATCH_SCOPE(vm);
     
-        JSMainThreadExecState currentState(&state);
+        JSExecState currentState(&state);
         auto returnValue = JSC::linkAndEvaluateModule(&state, moduleKey, scriptFetcher);
         if (UNLIKELY(scope.exception())) {
             returnedException = scope.exception();
@@ -121,33 +123,35 @@ public:
     static InspectorInstrumentationCookie instrumentFunctionConstruct(ScriptExecutionContext*, JSC::ConstructType, const JSC::ConstructData&);
 
 private:
-    explicit JSMainThreadExecState(JSC::ExecState* exec)
-        : m_previousState(s_mainThreadState)
+    explicit JSExecState(JSC::ExecState* exec)
+        : m_previousState(currentState())
         , m_lock(exec)
     {
-        ASSERT(isMainThread());
-        s_mainThreadState = exec;
+        setCurrentState(exec);
     };
 
-    ~JSMainThreadExecState()
+    ~JSExecState()
     {
-        JSC::VM& vm = s_mainThreadState->vm();
+        JSC::VM& vm = currentState()->vm();
         auto scope = DECLARE_CATCH_SCOPE(vm);
-        ASSERT(isMainThread());
         scope.assertNoException();
 
-        JSC::ExecState* state = s_mainThreadState;
-        bool didExitJavaScript = s_mainThreadState && !m_previousState;
+        JSC::ExecState* state = currentState();
+        bool didExitJavaScript = state && !m_previousState;
 
-        s_mainThreadState = m_previousState;
+        setCurrentState(m_previousState);
 
         if (didExitJavaScript)
             didLeaveScriptContext(state);
     }
 
+    static void setCurrentState(JSC::ExecState* state)
+    {
+        threadGlobalData().setCurrentState(state);
+    }
+
     template<typename Type, Type jsType, typename DataType> static InspectorInstrumentationCookie instrumentFunctionInternal(ScriptExecutionContext*, Type, const DataType&);
 
-    WEBCORE_EXPORT static JSC::ExecState* s_mainThreadState;
     JSC::ExecState* m_previousState;
     JSC::JSLockHolder m_lock;
 
@@ -158,19 +162,20 @@ private:
 // Used by non-JavaScript bindings (ObjC, GObject).
 class JSMainThreadNullState {
     WTF_MAKE_NONCOPYABLE(JSMainThreadNullState);
+    WTF_FORBID_HEAP_ALLOCATION;
 public:
     explicit JSMainThreadNullState()
-        : m_previousState(JSMainThreadExecState::s_mainThreadState)
+        : m_previousState(JSExecState::currentState())
         , m_customElementReactionStack(m_previousState)
     {
         ASSERT(isMainThread());
-        JSMainThreadExecState::s_mainThreadState = nullptr;
+        JSExecState::setCurrentState(nullptr);
     }
 
     ~JSMainThreadNullState()
     {
         ASSERT(isMainThread());
-        JSMainThreadExecState::s_mainThreadState = m_previousState;
+        JSExecState::setCurrentState(m_previousState);
     }
 
 private:
 #pragma once
 
 #include "InspectorInstrumentation.h"
-#include "JSMainThreadExecState.h"
+#include "JSExecState.h"
 #include <JavaScriptCore/FunctionExecutable.h>
 
 namespace WebCore {
 
 template<typename Type, Type jsType, class DataType>
-inline InspectorInstrumentationCookie JSMainThreadExecState::instrumentFunctionInternal(ScriptExecutionContext* context, Type callType, const DataType& callData)
+inline InspectorInstrumentationCookie JSExecState::instrumentFunctionInternal(ScriptExecutionContext* context, Type callType, const DataType& callData)
 {
     if (!InspectorInstrumentation::timelineAgentEnabled(context))
         return InspectorInstrumentationCookie();
@@ -47,12 +47,12 @@ inline InspectorInstrumentationCookie JSMainThreadExecState::instrumentFunctionI
     return InspectorInstrumentation::willCallFunction(context, resourceName, lineNumber);
 }
 
-inline InspectorInstrumentationCookie JSMainThreadExecState::instrumentFunctionCall(ScriptExecutionContext* context, JSC::CallType type, const JSC::CallData& data)
+inline InspectorInstrumentationCookie JSExecState::instrumentFunctionCall(ScriptExecutionContext* context, JSC::CallType type, const JSC::CallData& data)
 {
     return instrumentFunctionInternal<JSC::CallType, JSC::CallType::JS, JSC::CallData>(context, type, data);
 }
 
-inline InspectorInstrumentationCookie JSMainThreadExecState::instrumentFunctionConstruct(ScriptExecutionContext* context, JSC::ConstructType type, const JSC::ConstructData& data)
+inline InspectorInstrumentationCookie JSExecState::instrumentFunctionConstruct(ScriptExecutionContext* context, JSC::ConstructType type, const JSC::ConstructData& data)
 {
     return instrumentFunctionInternal<JSC::ConstructType, JSC::ConstructType::JS, JSC::ConstructData>(context, type, data);
 }
diff --git a/Source/WebCore/bindings/js/JSMicrotaskCallback.h b/Source/WebCore/bindings/js/JSMicrotaskCallback.h
new file mode 100644 (file)
index 0000000..c9b8e64
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2018 Yusuke Suzuki <utatane.tea@gmail.com>.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#pragma once
+
+#include "JSExecState.h"
+
+namespace WebCore {
+
+class JSMicrotaskCallback : public RefCounted<JSMicrotaskCallback> {
+public:
+    static Ref<JSMicrotaskCallback> create(JSDOMGlobalObject& globalObject, Ref<JSC::Microtask>&& task)
+    {
+        return adoptRef(*new JSMicrotaskCallback(globalObject, WTFMove(task)));
+    }
+
+    void call()
+    {
+        auto protectedThis { makeRef(*this) };
+        VM& vm = m_globalObject->vm();
+        JSLockHolder lock(vm);
+        auto scope = DECLARE_THROW_SCOPE(vm);
+        JSExecState::runTask(m_globalObject->globalExec(), m_task);
+        scope.assertNoException();
+    }
+
+private:
+    JSMicrotaskCallback(JSDOMGlobalObject& globalObject, Ref<JSC::Microtask>&& task)
+        : m_globalObject { globalObject.vm(), &globalObject }
+        , m_task { WTFMove(task) }
+    {
+    }
+
+    Strong<JSDOMGlobalObject> m_globalObject;
+    Ref<JSC::Microtask> m_task;
+};
+
+} // namespace WebCore
index fd60df8..f4c4353 100644 (file)
 #include "config.h"
 #include "JSWorkerGlobalScopeBase.h"
 
+#include "ActiveDOMCallbackMicrotask.h"
 #include "DOMWrapperWorld.h"
 #include "JSDOMGlobalObjectTask.h"
 #include "JSDedicatedWorkerGlobalScope.h"
+#include "JSMicrotaskCallback.h"
 #include "JSWorkerGlobalScope.h"
 #include "WorkerGlobalScope.h"
 #include "WorkerThread.h"
@@ -129,7 +131,14 @@ RuntimeFlags JSWorkerGlobalScopeBase::javaScriptRuntimeFlags(const JSGlobalObjec
 void JSWorkerGlobalScopeBase::queueTaskToEventLoop(JSGlobalObject& object, Ref<JSC::Microtask>&& task)
 {
     JSWorkerGlobalScopeBase& thisObject = static_cast<JSWorkerGlobalScopeBase&>(object);
-    thisObject.scriptExecutionContext()->postTask(JSGlobalObjectTask(thisObject, WTFMove(task)));
+
+    RefPtr<JSMicrotaskCallback> callback = JSMicrotaskCallback::create(thisObject, WTFMove(task));
+    auto& context = thisObject.wrapped();
+    auto microtask = std::make_unique<ActiveDOMCallbackMicrotask>(context.microtaskQueue(), context, [callback]() mutable {
+        callback->call();
+    });
+
+    context.microtaskQueue().append(WTFMove(microtask));
 }
 
 JSValue toJS(ExecState* exec, JSDOMGlobalObject*, WorkerGlobalScope& workerGlobalScope)
index 15d126b..0343df8 100644 (file)
@@ -32,8 +32,8 @@
 #include "FrameLoader.h"
 #include "JSDOMExceptionHandling.h"
 #include "JSDOMWindow.h"
-#include "JSMainThreadExecState.h"
-#include "JSMainThreadExecStateInstrumentation.h"
+#include "JSExecState.h"
+#include "JSExecStateInstrumentation.h"
 #include "JSWorkerGlobalScope.h"
 #include "ScriptController.h"
 #include "ScriptExecutionContext.h"
@@ -112,13 +112,10 @@ void ScheduledAction::executeFunctionInContext(JSGlobalObject* globalObject, JSV
         return;
     }
 
-    InspectorInstrumentationCookie cookie = JSMainThreadExecState::instrumentFunctionCall(&context, callType, callData);
+    InspectorInstrumentationCookie cookie = JSExecState::instrumentFunctionCall(&context, callType, callData);
 
     NakedPtr<JSC::Exception> exception;
-    if (is<Document>(context))
-        JSMainThreadExecState::profiledCall(exec, JSC::ProfilingReason::Other, m_function.get(), callType, callData, thisValue, arguments, exception);
-    else
-        JSC::profiledCall(exec, JSC::ProfilingReason::Other, m_function.get(), callType, callData, thisValue, arguments, exception);
+    JSExecState::profiledCall(exec, JSC::ProfilingReason::Other, m_function.get(), callType, callData, thisValue, arguments, exception);
 
     InspectorInstrumentation::didCallFunction(cookie, &context);
 
index ce4c4e0..8869db1 100644 (file)
@@ -36,7 +36,7 @@
 #include "JSDOMExceptionHandling.h"
 #include "JSDOMWindow.h"
 #include "JSDocument.h"
-#include "JSMainThreadExecState.h"
+#include "JSExecState.h"
 #include "LoadableModuleScript.h"
 #include "ModuleFetchFailureKind.h"
 #include "ModuleFetchParameters.h"
@@ -128,7 +128,7 @@ JSValue ScriptController::evaluateInWorld(const ScriptSourceCode& sourceCode, DO
     InspectorInstrumentationCookie cookie = InspectorInstrumentation::willEvaluateScript(m_frame, sourceURL, sourceCode.startLine());
 
     NakedPtr<JSC::Exception> evaluationException;
-    JSValue returnValue = JSMainThreadExecState::profiledEvaluate(&exec, JSC::ProfilingReason::Other, jsSourceCode, &proxy, evaluationException);
+    JSValue returnValue = JSExecState::profiledEvaluate(&exec, JSC::ProfilingReason::Other, jsSourceCode, &proxy, evaluationException);
 
     InspectorInstrumentation::didEvaluateScript(cookie, m_frame);
 
@@ -154,7 +154,7 @@ void ScriptController::loadModuleScriptInWorld(LoadableModuleScript& moduleScrip
     auto& proxy = jsWindowProxy(world);
     auto& state = *proxy.window()->globalExec();
 
-    auto& promise = JSMainThreadExecState::loadModule(state, moduleName, JSC::JSScriptFetchParameters::create(state.vm(), WTFMove(topLevelFetchParameters)), JSC::JSScriptFetcher::create(state.vm(), { &moduleScript }));
+    auto& promise = JSExecState::loadModule(state, moduleName, JSC::JSScriptFetchParameters::create(state.vm(), WTFMove(topLevelFetchParameters)), JSC::JSScriptFetcher::create(state.vm(), { &moduleScript }));
     setupModuleScriptHandlers(moduleScript, promise, world);
 }
 
@@ -170,7 +170,7 @@ void ScriptController::loadModuleScriptInWorld(LoadableModuleScript& moduleScrip
     auto& proxy = jsWindowProxy(world);
     auto& state = *proxy.window()->globalExec();
 
-    auto& promise = JSMainThreadExecState::loadModule(state, sourceCode.jsSourceCode(), JSC::JSScriptFetcher::create(state.vm(), { &moduleScript }));
+    auto& promise = JSExecState::loadModule(state, sourceCode.jsSourceCode(), JSC::JSScriptFetcher::create(state.vm(), { &moduleScript }));
     setupModuleScriptHandlers(moduleScript, promise, world);
 }
 
@@ -191,7 +191,7 @@ JSC::JSValue ScriptController::linkAndEvaluateModuleScriptInWorld(LoadableModule
     Ref<Frame> protector(m_frame);
 
     NakedPtr<JSC::Exception> evaluationException;
-    auto returnValue = JSMainThreadExecState::linkAndEvaluateModule(state, Identifier::fromUid(&state.vm(), moduleScript.moduleKey()), jsUndefined(), evaluationException);
+    auto returnValue = JSExecState::linkAndEvaluateModule(state, Identifier::fromUid(&state.vm(), moduleScript.moduleKey()), jsUndefined(), evaluationException);
     if (evaluationException) {
         // FIXME: Give a chance to dump the stack trace if the "crossorigin" attribute allows.
         // https://bugs.webkit.org/show_bug.cgi?id=164539
@@ -380,7 +380,7 @@ void ScriptController::disableWebAssembly(const String& errorMessage)
 
 bool ScriptController::canAccessFromCurrentOrigin(Frame* frame)
 {
-    auto* state = JSMainThreadExecState::currentState();
+    auto* state = JSExecState::currentState();
 
     // If the current state is null we're in a call path where the DOM security check doesn't apply (eg. parser).
     if (!state)
index 9bc583a..a373c39 100644 (file)
@@ -30,6 +30,7 @@
 #include "JSDOMBinding.h"
 #include "JSDedicatedWorkerGlobalScope.h"
 #include "JSEventTarget.h"
+#include "JSExecState.h"
 #include "JSServiceWorkerGlobalScope.h"
 #include "ScriptSourceCode.h"
 #include "WebCoreJSClientData.h"
@@ -143,7 +144,7 @@ void WorkerScriptController::evaluate(const ScriptSourceCode& sourceCode, NakedP
     VM& vm = state.vm();
     JSLockHolder lock { vm };
 
-    JSC::evaluate(&state, sourceCode.jsSourceCode(), m_workerGlobalScopeWrapper->globalThis(), returnedException);
+    JSExecState::profiledEvaluate(&state, JSC::ProfilingReason::Other, sourceCode.jsSourceCode(), m_workerGlobalScopeWrapper->globalThis(), returnedException);
 
     if ((returnedException && isTerminatedExecutionException(vm, returnedException)) || isTerminatingExecution()) {
         forbidExecution();
index 0397794..97c7d7c 100644 (file)
@@ -31,8 +31,8 @@
 #import "JSDOMBindingSecurity.h"
 #import "JSDOMWindow.h"
 #import "JSDOMWindowCustom.h"
+#import "JSExecState.h"
 #import "JSHTMLElement.h"
-#import "JSMainThreadExecState.h"
 #import "JSPluginElementFunctions.h"
 #import "ObjCRuntimeObject.h"
 #import "WebCoreObjCExtras.h"
@@ -360,7 +360,7 @@ static void getListFromNSArray(ExecState *exec, NSArray *array, RootObject* root
         return nil;
 
     NakedPtr<JSC::Exception> exception;
-    JSC::JSValue result = JSMainThreadExecState::profiledCall(exec, JSC::ProfilingReason::Other, function, callType, callData, [self _imp], argList, exception);
+    JSC::JSValue result = JSExecState::profiledCall(exec, JSC::ProfilingReason::Other, function, callType, callData, [self _imp], argList, exception);
 
     if (exception) {
         addExceptionToConsole(exec, exception);
@@ -385,7 +385,7 @@ static void getListFromNSArray(ExecState *exec, NSArray *array, RootObject* root
     ExecState* exec = globalObject->globalExec();
     UNUSED_PARAM(scope);
     
-    JSC::JSValue returnValue = JSMainThreadExecState::profiledEvaluate(exec, JSC::ProfilingReason::Other, makeSource(String(script), { }), JSC::JSValue());
+    JSC::JSValue returnValue = JSExecState::profiledEvaluate(exec, JSC::ProfilingReason::Other, makeSource(String(script), { }), JSC::JSValue());
 
     id resultObj = [WebScriptObject _convertValueToObjcValue:returnValue originRootObject:[self _originRootObject] rootObject:[self _rootObject]];
     
index a63c2c5..b2a12ae 100644 (file)
@@ -53,7 +53,7 @@
 #include "ImageData.h"
 #include "InspectorInstrumentation.h"
 #include "IntSize.h"
-#include "JSMainThreadExecState.h"
+#include "JSExecState.h"
 #include "Logging.h"
 #include "NotImplemented.h"
 #include "OESElementIndexUint.h"
@@ -1534,7 +1534,7 @@ void WebGLRenderingContextBase::compileShader(WebGLShader* shader)
     auto* canvas = htmlCanvas();
 
     if (canvas && m_synthesizedErrorsToConsole && !value) {
-        Ref<Inspector::ScriptCallStack> stackTrace = Inspector::createScriptCallStack(JSMainThreadExecState::currentState());
+        Ref<Inspector::ScriptCallStack> stackTrace = Inspector::createScriptCallStack(JSExecState::currentState());
 
         for (auto& error : getShaderInfoLog(shader).split('\n'))
             canvas->document().addConsoleMessage(std::make_unique<Inspector::ConsoleMessage>(MessageSource::Rendering, MessageType::Log, MessageLevel::Error, "WebGL: " + error, stackTrace.copyRef()));
@@ -5658,7 +5658,7 @@ void WebGLRenderingContextBase::printToConsole(MessageLevel level, const String&
 
     // Error messages can occur during function calls, so show stack traces for them.
     if (level == MessageLevel::Error) {
-        Ref<Inspector::ScriptCallStack> stackTrace = Inspector::createScriptCallStack(JSMainThreadExecState::currentState());
+        Ref<Inspector::ScriptCallStack> stackTrace = Inspector::createScriptCallStack(JSExecState::currentState());
         consoleMessage = std::make_unique<Inspector::ConsoleMessage>(MessageSource::Rendering, MessageType::Log, level, message, WTFMove(stackTrace));
     } else
         consoleMessage = std::make_unique<Inspector::ConsoleMessage>(MessageSource::Rendering, MessageType::Log, level, message);
index 3b2284f..0caa764 100644 (file)
@@ -51,8 +51,8 @@
 #include "JSCanvasLineJoin.h"
 #include "JSCanvasTextAlign.h"
 #include "JSCanvasTextBaseline.h"
+#include "JSExecState.h"
 #include "JSImageSmoothingQuality.h"
-#include "JSMainThreadExecState.h"
 #include "Path2D.h"
 #include "Pattern.h"
 #include "RecordingSwizzleTypes.h"
@@ -289,7 +289,7 @@ Ref<Inspector::Protocol::Canvas::Canvas> InspectorCanvas::buildObjectForCanvas(I
     }
 
     if (captureBacktrace) {
-        auto stackTrace = Inspector::createScriptCallStack(JSMainThreadExecState::currentState(), Inspector::ScriptCallStack::maxCallStackSizeToCapture);
+        auto stackTrace = Inspector::createScriptCallStack(JSExecState::currentState(), Inspector::ScriptCallStack::maxCallStackSizeToCapture);
         canvas->setBacktrace(stackTrace->buildInspectorArray());
     }
 
@@ -602,7 +602,7 @@ Ref<JSON::ArrayOf<JSON::Value>> InspectorCanvas::buildAction(const String& name,
     action->addItem(WTFMove(swizzleTypes));
 
     auto trace = JSON::ArrayOf<double>::create();
-    auto stackTrace = Inspector::createScriptCallStack(JSMainThreadExecState::currentState(), Inspector::ScriptCallStack::maxCallStackSizeToCapture);
+    auto stackTrace = Inspector::createScriptCallStack(JSExecState::currentState(), Inspector::ScriptCallStack::maxCallStackSizeToCapture);
     for (size_t i = 0; i < stackTrace->size(); ++i)
         trace->addItem(indexForData(stackTrace->at(i)));
     action->addItem(WTFMove(trace));
index 20eb10f..c514967 100644 (file)
@@ -58,7 +58,7 @@
 #include "JSDOMBindingSecurity.h"
 #include "JSDOMWindow.h"
 #include "JSDOMWindowCustom.h"
-#include "JSMainThreadExecState.h"
+#include "JSExecState.h"
 #include "Page.h"
 #include "PageConsoleAgent.h"
 #include "PageDebuggerAgent.h"
index 55f3d48..c734da2 100644 (file)
@@ -45,8 +45,8 @@
 #include "InspectorFrontendClient.h"
 #include "JSDOMConvertInterface.h"
 #include "JSDOMExceptionHandling.h"
+#include "JSExecState.h"
 #include "JSInspectorFrontendHost.h"
-#include "JSMainThreadExecState.h"
 #include "MouseEvent.h"
 #include "Node.h"
 #include "Page.h"
index cc6c1b3..f2b7be1 100644 (file)
@@ -34,7 +34,7 @@
 
 #include "Event.h"
 #include "FloatQuad.h"
-#include "JSMainThreadExecState.h"
+#include "JSExecState.h"
 #include <JavaScriptCore/InspectorProtocolObjects.h>
 #include <JavaScriptCore/ScriptBreakpoint.h>
 #include <JavaScriptCore/ScriptCallStack.h>
@@ -50,7 +50,7 @@ Ref<JSON::Object> TimelineRecordFactory::createGenericRecord(double startTime, i
     record->setDouble("startTime"_s, startTime);
 
     if (maxCallStackDepth) {
-        Ref<ScriptCallStack> stackTrace = createScriptCallStack(JSMainThreadExecState::currentState(), maxCallStackDepth);
+        Ref<ScriptCallStack> stackTrace = createScriptCallStack(JSExecState::currentState(), maxCallStackDepth);
         if (stackTrace->size())
             record->setValue("stackTrace"_s, stackTrace->buildInspectorArray());
     }
index aa81e01..77d0531 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "CommandLineAPIHost.h"
 #include "InstrumentingAgents.h"
-#include "JSMainThreadExecState.h"
+#include "JSExecState.h"
 #include "WebHeapAgent.h"
 #include "WebInjectedScriptHost.h"
 #include "WebInjectedScriptManager.h"
index 8121841..543937e 100644 (file)
@@ -35,8 +35,8 @@
 #include "InspectorDOMAgent.h"
 #include "InstrumentingAgents.h"
 #include "JSCanvasRenderingContext2D.h"
+#include "JSExecState.h"
 #include "JSImageBitmapRenderingContext.h"
-#include "JSMainThreadExecState.h"
 #include "OffscreenCanvas.h"
 #include "ScriptState.h"
 #include "StringAdaptors.h"
index 86ef81f..b2889a3 100644 (file)
@@ -47,7 +47,7 @@
 #include "HTTPHeaderNames.h"
 #include "InspectorTimelineAgent.h"
 #include "InstrumentingAgents.h"
-#include "JSMainThreadExecState.h"
+#include "JSExecState.h"
 #include "JSWebSocket.h"
 #include "LoaderStrategy.h"
 #include "MIMETypeRegistry.h"
@@ -641,7 +641,7 @@ RefPtr<Inspector::Protocol::Network::Initiator> InspectorNetworkAgent::buildInit
             .release();
     }
 
-    Ref<ScriptCallStack> stackTrace = createScriptCallStack(JSMainThreadExecState::currentState());
+    Ref<ScriptCallStack> stackTrace = createScriptCallStack(JSExecState::currentState());
     if (stackTrace->size() > 0) {
         auto initiatorObject = Inspector::Protocol::Network::Initiator::create()
             .setType(Inspector::Protocol::Network::Initiator::Type::Script)
index b5c43cf..ff37171 100644 (file)
@@ -67,7 +67,7 @@
 #include "History.h"
 #include "InspectorInstrumentation.h"
 #include "JSDOMWindowBase.h"
-#include "JSMainThreadExecState.h"
+#include "JSExecState.h"
 #include "Location.h"
 #include "MediaQueryList.h"
 #include "MediaQueryMatcher.h"
@@ -956,7 +956,7 @@ ExceptionOr<void> DOMWindow::postMessage(JSC::ExecState& state, DOMWindow& incum
     // Capture stack trace only when inspector front-end is loaded as it may be time consuming.
     RefPtr<ScriptCallStack> stackTrace;
     if (InspectorInstrumentation::consoleAgentEnabled(sourceDocument))
-        stackTrace = createScriptCallStack(JSMainThreadExecState::currentState());
+        stackTrace = createScriptCallStack(JSExecState::currentState());
 
     MessageWithMessagePorts message { messageData.releaseReturnValue(), disentangledPorts.releaseReturnValue() };
 
index 1c350cd..d8f3039 100644 (file)
@@ -38,8 +38,8 @@
 #include "InspectorController.h"
 #include "InspectorInstrumentation.h"
 #include "JSCanvasRenderingContext2D.h"
+#include "JSExecState.h"
 #include "JSHTMLCanvasElement.h"
-#include "JSMainThreadExecState.h"
 #include "JSOffscreenCanvas.h"
 #include "OffscreenCanvas.h"
 #include "Page.h"
@@ -134,7 +134,7 @@ void PageConsoleClient::addMessage(MessageSource source, MessageLevel level, con
     unsigned column = 0;
     getParserLocationForConsoleMessage(document, url, line, column);
 
-    addMessage(source, level, message, url, line, column, 0, JSMainThreadExecState::currentState(), requestIdentifier);
+    addMessage(source, level, message, url, line, column, 0, JSExecState::currentState(), requestIdentifier);
 }
 
 void PageConsoleClient::addMessage(MessageSource source, MessageLevel level, const String& message, Ref<ScriptCallStack>&& callStack)
index 04e4f97..9b966fa 100644 (file)
@@ -42,7 +42,7 @@
 #include "Frame.h"
 #include "HTMLParserIdioms.h"
 #include "InspectorInstrumentation.h"
-#include "JSMainThreadExecState.h"
+#include "JSExecState.h"
 #include "JSWindowProxy.h"
 #include "ParsingUtilities.h"
 #include "PingLoader.h"
@@ -691,7 +691,7 @@ void ContentSecurityPolicy::reportViolation(const String& effectiveViolatedDirec
 
         info.documentURI = document.url().strippedForUseAsReferrer();
 
-        auto stack = createScriptCallStack(JSMainThreadExecState::currentState(), 2);
+        auto stack = createScriptCallStack(JSExecState::currentState(), 2);
         auto* callFrame = stack->firstNonNativeCallFrame();
         if (callFrame && callFrame->lineNumber()) {
             info.sourceFile = deprecatedURLForReporting(URL { URL { }, callFrame->sourceURL() });
index d28f739..7f7f644 100644 (file)
 #include <wtf/ThreadSafeRefCounted.h>
 #include <wtf/text/StringHash.h>
 
+namespace JSC {
+class ExecState;
+}
+
 namespace WebCore {
 
     class QualifiedNameCache;
@@ -58,6 +62,9 @@ namespace WebCore {
 
         ICUConverterWrapper& cachedConverterICU() { return *m_cachedConverterICU; }
 
+        JSC::ExecState* currentState() const { return m_currentState; }
+        void setCurrentState(JSC::ExecState* state) { m_currentState = state; }
+
 #if USE(WEB_THREAD)
         void setWebCoreThreadData();
 #endif
@@ -70,6 +77,7 @@ namespace WebCore {
         std::unique_ptr<EventNames> m_eventNames;
         std::unique_ptr<ThreadTimers> m_threadTimers;
         std::unique_ptr<QualifiedNameCache> m_qualifiedNameCache;
+        JSC::ExecState* m_currentState { nullptr };
 
 #ifndef NDEBUG
         bool m_isMainThread;
index a5b1b36..4f8e66d 100644 (file)
@@ -33,6 +33,7 @@
 #include "IDBConnectionProxy.h"
 #include "ImageBitmapOptions.h"
 #include "InspectorInstrumentation.h"
+#include "Microtasks.h"
 #include "Performance.h"
 #include "ScheduledAction.h"
 #include "ScriptSourceCode.h"
@@ -60,6 +61,7 @@ WorkerGlobalScope::WorkerGlobalScope(const URL& url, Ref<SecurityOrigin>&& origi
     , m_thread(thread)
     , m_script(std::make_unique<WorkerScriptController>(this))
     , m_inspectorController(std::make_unique<WorkerInspectorController>(*this))
+    , m_microtaskQueue(std::make_unique<MicrotaskQueue>())
     , m_isOnline(isOnline)
     , m_shouldBypassMainWorldContentSecurityPolicy(shouldBypassMainWorldContentSecurityPolicy)
     , m_eventQueue(*this)
@@ -110,6 +112,11 @@ void WorkerGlobalScope::removeAllEventListeners()
     m_performance->removeAllObservers();
 }
 
+void WorkerGlobalScope::removeMicrotaskQueue()
+{
+    m_microtaskQueue = nullptr;
+}
+
 bool WorkerGlobalScope::isSecureContext() const
 {
     return securityOrigin() && securityOrigin()->isPotentiallyTrustworthy();
index bac0db8..68c3444 100644 (file)
@@ -44,6 +44,7 @@ namespace WebCore {
 
 class ContentSecurityPolicyResponseHeaders;
 class Crypto;
+class MicrotaskQueue;
 class Performance;
 class ScheduledAction;
 class WorkerInspectorController;
@@ -78,6 +79,8 @@ public:
 
     WorkerInspectorController& inspectorController() const { return *m_inspectorController; }
 
+    MicrotaskQueue& microtaskQueue() const { return *m_microtaskQueue; }
+
     WorkerThread& thread() const { return m_thread; }
 
     using ScriptExecutionContext::hasPendingActivity;
@@ -116,6 +119,8 @@ public:
 
     void removeAllEventListeners() final;
 
+    void removeMicrotaskQueue();
+
     void createImageBitmap(ImageBitmap::Source&&, ImageBitmapOptions&&, ImageBitmap::Promise&&);
     void createImageBitmap(ImageBitmap::Source&&, int sx, int sy, int sw, int sh, ImageBitmapOptions&&, ImageBitmap::Promise&&);
 
@@ -179,6 +184,7 @@ private:
     WorkerThread& m_thread;
     std::unique_ptr<WorkerScriptController> m_script;
     std::unique_ptr<WorkerInspectorController> m_inspectorController;
+    std::unique_ptr<MicrotaskQueue> m_microtaskQueue;
 
     bool m_closing { false };
     bool m_isOnline;
index f9a7903..533d11a 100644 (file)
@@ -299,6 +299,9 @@ void WorkerThread::stop(WTF::Function<void()>&& stoppedCallback)
             // which become dangling once Heap is destroyed.
             workerGlobalScope.removeAllEventListeners();
 
+            // MicrotaskQueue references Heap.
+            workerGlobalScope.removeMicrotaskQueue();
+
             // Stick a shutdown command at the end of the queue, so that we deal
             // with all the cleanup tasks the databases post first.
             workerGlobalScope.postTask({ ScriptExecutionContext::Task::CleanupTask, [] (ScriptExecutionContext& context) {
index 5cc6cef..e219561 100644 (file)
@@ -29,6 +29,7 @@
 #if ENABLE(SERVICE_WORKER)
 
 #include "JSDOMPromise.h"
+#include "ScriptExecutionContext.h"
 #include <JavaScriptCore/Microtask.h>
 
 namespace WebCore {
@@ -85,19 +86,25 @@ private:
 void ExtendableEvent::addExtendLifetimePromise(Ref<DOMPromise>&& promise)
 {
     promise->whenSettled([this, protectedThis = makeRefPtr(this), settledPromise = promise.ptr()] () mutable {
-        settledPromise->globalObject()->queueMicrotask(FunctionMicrotask::create([this, protectedThis = WTFMove(protectedThis)] {
+        auto& globalObject = *settledPromise->globalObject();
+        globalObject.queueMicrotask(FunctionMicrotask::create([this, protectedThis = WTFMove(protectedThis), settledPromise = WTFMove(settledPromise)] () mutable {
             --m_pendingPromiseCount;
 
             // FIXME: Let registration be the context object's relevant global object's associated service worker's containing service worker registration.
             // FIXME: If registration's uninstalling flag is set, invoke Try Clear Registration with registration.
             // FIXME: If registration is not null, invoke Try Activate with registration.
 
-            if (m_pendingPromiseCount)
+            auto* context = settledPromise->globalObject()->scriptExecutionContext();
+            if (!context)
                 return;
-
-            auto settledPromises = WTFMove(m_extendLifetimePromises);
-            if (auto handler = WTFMove(m_whenAllExtendLifetimePromisesAreSettledHandler))
-                handler(WTFMove(settledPromises));
+            context->postTask([this, protectedThis = WTFMove(protectedThis)] (ScriptExecutionContext&) mutable {
+                if (m_pendingPromiseCount)
+                    return;
+
+                auto settledPromises = WTFMove(m_extendLifetimePromises);
+                if (auto handler = WTFMove(m_whenAllExtendLifetimePromisesAreSettledHandler))
+                    handler(WTFMove(settledPromises));
+            });
         }));
     });
 
index f459f8d..079c46f 100644 (file)
@@ -1,3 +1,112 @@
+2018-08-05  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        Add support for microtasks in workers
+        https://bugs.webkit.org/show_bug.cgi?id=188246
+
+        Reviewed by Darin Adler.
+
+        Rename JSMainThreadExecState.h to JSExecState.h.
+
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementGtk.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeGtk.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathNSResolver.cpp:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.cpp:
+
 2018-08-03  Ben Richards  <benton_richards@apple.com>
 
         We should cache the compiled sandbox profile in a data vault
index 6bd9aee..9c98da9 100644 (file)
@@ -25,7 +25,7 @@
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMAttrPrivate.h"
 #include "WebKitDOMElementPrivate.h"
 #include "WebKitDOMEventPrivate.h"
index 6d84c23..bf21058 100644 (file)
@@ -23,7 +23,7 @@
 #include <WebCore/CSSImportRule.h>
 #include "DOMObjectCache.h"
 #include <WebCore/Document.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMBlobPrivate.h"
 #include "WebKitDOMPrivate.h"
 #include "ConvertToUTF8String.h"
index 072c4d0..ad8cd68 100644 (file)
@@ -25,7 +25,7 @@
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMCDATASectionPrivate.h"
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
index 3f8bfe6..1629f32 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMCSSRulePrivate.h"
 #include "WebKitDOMCSSStyleSheetPrivate.h"
 #include "WebKitDOMPrivate.h"
index 82d9212..a3c7301 100644 (file)
@@ -23,7 +23,7 @@
 #include <WebCore/CSSImportRule.h>
 #include "DOMObjectCache.h"
 #include <WebCore/Document.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMCSSRuleListPrivate.h"
 #include "WebKitDOMCSSRulePrivate.h"
 #include "WebKitDOMPrivate.h"
index f4741c9..d4b4d5d 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMCSSRulePrivate.h"
 #include "WebKitDOMCSSStyleDeclarationPrivate.h"
 #include "WebKitDOMPrivate.h"
index 2a112ae..857b8f4 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMCSSRuleListPrivate.h"
 #include "WebKitDOMCSSRulePrivate.h"
 #include "WebKitDOMCSSStyleSheetPrivate.h"
index 6a9eb59..e85e563 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMCSSValuePrivate.h"
 #include "WebKitDOMPrivate.h"
 #include "ConvertToUTF8String.h"
index ce90977..200689e 100644 (file)
@@ -25,7 +25,7 @@
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMCharacterDataPrivate.h"
 #include "WebKitDOMElementPrivate.h"
 #include "WebKitDOMEventPrivate.h"
index e50fa59..e4f5912 100644 (file)
@@ -27,7 +27,7 @@
 #include <WebCore/CSSImportRule.h>
 #include <WebCore/Document.h>
 #include <WebCore/ExceptionCode.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include <wtf/GetPtr.h>
 #include <wtf/RefPtr.h>
 
index 95036ad..374d48d 100644 (file)
@@ -28,7 +28,7 @@
 #include <WebCore/CSSImportRule.h>
 #include <WebCore/Document.h>
 #include <WebCore/ExceptionCode.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include <wtf/GetPtr.h>
 #include <wtf/RefPtr.h>
 
index eab34fa..09a882b 100644 (file)
@@ -25,7 +25,7 @@
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMCommentPrivate.h"
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
index f91cf50..bf8c442 100644 (file)
@@ -31,7 +31,7 @@
 #include <WebCore/CSSImportRule.h>
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include <WebCore/SVGTests.h>
 #include <wtf/GetPtr.h>
 #include <wtf/RefPtr.h>
index d0947e4..c5e283b 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMDOMSelectionPrivate.h"
 #include "WebKitDOMNodePrivate.h"
 #include "WebKitDOMPrivate.h"
index 65c7fbe..b606e29 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMDOMTokenListPrivate.h"
 #include "WebKitDOMPrivate.h"
 #include "ConvertToUTF8String.h"
index 677d66c..09e0c6d 100644 (file)
@@ -25,7 +25,7 @@
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include <WebCore/SerializedScriptValue.h>
 #include <WebCore/UserMessageHandlersNamespace.h>
 #include <WebCore/WebKitNamespace.h>
index 0d89352..aa3b597 100644 (file)
@@ -23,7 +23,7 @@
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
 #include <WebCore/Element.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include <WebCore/HTMLCollection.h>
 #include "WebKitDOMDocumentPrivate.h"
 #include "WebKitDOMElementPrivate.h"
index e8fec69..5d46bc4 100644 (file)
@@ -25,7 +25,7 @@
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMDocumentFragmentPrivate.h"
 #include "WebKitDOMElementPrivate.h"
 #include "WebKitDOMEventPrivate.h"
index b68bc40..f6997ef 100644 (file)
@@ -55,7 +55,7 @@
 #include <WebCore/CSSImportRule.h>
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include <wtf/GetPtr.h>
 #include <wtf/RefPtr.h>
 
index 88873b2..529a3f1 100644 (file)
@@ -25,7 +25,7 @@
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMDocumentTypePrivate.h"
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
index 31a158e..bbce97f 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include <WebCore/StyledElement.h>
 #include "WebKitDOMAttrPrivate.h"
 #include "WebKitDOMCSSStyleDeclarationPrivate.h"
index 482d5b9..ace31c8 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/Document.h>
 #include <WebCore/ExceptionCode.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTargetPrivate.h"
 #include "WebKitDOMPrivate.h"
index d639f95..ce7e21b 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/Document.h>
 #include <WebCore/ExceptionCode.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMBlobPrivate.h"
 #include "WebKitDOMFilePrivate.h"
 #include "WebKitDOMPrivate.h"
index da5416c..52dfbe5 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/Document.h>
 #include <WebCore/ExceptionCode.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMFileListPrivate.h"
 #include "WebKitDOMFilePrivate.h"
 #include "WebKitDOMPrivate.h"
index 8e5eddc..cacd050 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMDOMTokenListPrivate.h"
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
index 5c17e8c..657b2f6 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLAppletElementPrivate.h"
index 8e09e70..75d9fe4 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMDOMTokenListPrivate.h"
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
index 6e327af..0b4de01 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLBRElementPrivate.h"
index 9d10e2c..001a578 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLBaseElementPrivate.h"
index 1b270d5..211fa65 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLBodyElementPrivate.h"
index 616831b..b033faa 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLButtonElementPrivate.h"
index f33babe..0ca47d0 100644 (file)
@@ -25,7 +25,7 @@
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLCanvasElementPrivate.h"
index 25585ab..0175c75 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/Document.h>
 #include <WebCore/ExceptionCode.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMHTMLCollectionPrivate.h"
 #include "WebKitDOMNodePrivate.h"
 #include "WebKitDOMPrivate.h"
index 64bbe92..3b2c3dd 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLDListElementPrivate.h"
index 311f1f0..7e54090 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLDirectoryElementPrivate.h"
index 5f06416..d44594c 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLDivElementPrivate.h"
index f712e8d..0db6567 100644 (file)
@@ -25,7 +25,7 @@
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLDocumentPrivate.h"
index 7e17154..e316436 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLElementPrivate.h"
index 9131246..4fa89f9 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLEmbedElementPrivate.h"
index 6f104b4..4086147 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLCollectionPrivate.h"
index ef948d9..25d2408 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLFontElementPrivate.h"
index ed96f1b..df20e4d 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLCollectionPrivate.h"
index 5b67152..f3447f0 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMDOMWindowPrivate.h"
 #include "WebKitDOMDocumentPrivate.h"
 #include "WebKitDOMEventPrivate.h"
index b1ede5b..954ba41 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLFrameSetElementPrivate.h"
index 2f6e240..29595c8 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLHRElementPrivate.h"
index ed469ec..5357fc5 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLHeadElementPrivate.h"
index 17fe1bc..9bbe17e 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLHeadingElementPrivate.h"
index 917b068..29a520b 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLHtmlElementPrivate.h"
index 3e674af..4fe4605 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMDOMWindowPrivate.h"
 #include "WebKitDOMDocumentPrivate.h"
 #include "WebKitDOMEventPrivate.h"
index 75bc962..bbd571b 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLImageElementPrivate.h"
index a1a20f5..3ded5e2 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMFileListPrivate.h"
index c60ad7f..49ea439 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLLIElementPrivate.h"
index 3763c57..2dc6c21 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLElementPrivate.h"
index a9c62be..5243a0f 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLFormElementPrivate.h"
index 77d0402..3b754b6 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMDOMTokenListPrivate.h"
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
index b13bdcd..be3dd5a 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLCollectionPrivate.h"
index 0285c84..9dbccdd 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLMarqueeElementPrivate.h"
index 0325cb8..ff995fb 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLMenuElementPrivate.h"
index 5529bd5..97fe1bc 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLMetaElementPrivate.h"
index 5dde14c..dacd989 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLModElementPrivate.h"
index a30c6d6..21d23cb 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLOListElementPrivate.h"
index 9068e31..004bdae 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMDocumentPrivate.h"
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
index 9a0189e..6f7db89 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLOptGroupElementPrivate.h"
index 895a712..15c745d 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLFormElementPrivate.h"
index c9f54cc..85f6dfe 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/Document.h>
 #include <WebCore/ExceptionCode.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMHTMLCollectionPrivate.h"
 #include "WebKitDOMHTMLOptionElementPrivate.h"
 #include "WebKitDOMHTMLOptionsCollectionPrivate.h"
index 01b2857..fc8e72b 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLParagraphElementPrivate.h"
index 29ba0f1..cb8d62c 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLParamElementPrivate.h"
index 4ae2113..b7b9c81 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLPreElementPrivate.h"
index cfb4b39..9011473 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLQuoteElementPrivate.h"
index 8b141fe..f1550bf 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLScriptElementPrivate.h"
index 190acbe..91a810d 100644 (file)
@@ -27,7 +27,7 @@
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
 #include <WebCore/HTMLOptGroupElement.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLCollectionPrivate.h"
index e74788b..3d0ec8f 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLStyleElementPrivate.h"
index 8ab958b..c163ac6 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLTableCaptionElementPrivate.h"
index 6b79fc7..0a36b16 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLTableCellElementPrivate.h"
index 090f209..8f4cbab 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLTableColElementPrivate.h"
index bbb5547..6b527f0 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLCollectionPrivate.h"
index c874f58..afad670 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLCollectionPrivate.h"
index f943814..301b260 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLCollectionPrivate.h"
index 800d2d3..02c4b92 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLFormElementPrivate.h"
index 91e277b..96731d3 100644 (file)
@@ -25,7 +25,7 @@
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLTitleElementPrivate.h"
index 6883e51..42ad679 100644 (file)
@@ -26,7 +26,7 @@
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
 #include <WebCore/HTMLNames.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMHTMLUListElementPrivate.h"
index 7da3263..5ab2502 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/Document.h>
 #include <WebCore/ExceptionCode.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMDOMWindowPrivate.h"
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMKeyboardEventPrivate.h"
index 8731b99..2599554 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMMediaListPrivate.h"
 #include "WebKitDOMPrivate.h"
 #include "ConvertToUTF8String.h"
index 217e565..a023893 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/Document.h>
 #include <WebCore/ExceptionCode.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMDOMWindowPrivate.h"
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTargetPrivate.h"
index baf658a..2b8ff98 100644 (file)
@@ -29,7 +29,7 @@
 #include <WebCore/CSSImportRule.h>
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include <wtf/GetPtr.h>
 #include <wtf/RefPtr.h>
 
index 5f8622b..6dd9f88 100644 (file)
@@ -32,7 +32,7 @@
 #include <WebCore/CSSImportRule.h>
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include <WebCore/JSNode.h>
 #include <WebCore/SVGTests.h>
 #include <wtf/GetPtr.h>
index df80db7..6188eb1 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/Document.h>
 #include <WebCore/ExceptionCode.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMNodeFilterPrivate.h"
 #include "WebKitDOMNodeIteratorPrivate.h"
 #include "WebKitDOMNodePrivate.h"
index 0952218..ece2f70 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/Document.h>
 #include <WebCore/ExceptionCode.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMNodeListPrivate.h"
 #include "WebKitDOMNodePrivate.h"
 #include "WebKitDOMPrivate.h"
index ecc878e..8b11920 100644 (file)
@@ -25,7 +25,7 @@
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMNodePrivate.h"
index beb435b..0678cd4 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMDocumentFragmentPrivate.h"
 #include "WebKitDOMNodePrivate.h"
 #include "WebKitDOMPrivate.h"
index eb24058..51c0059 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/Document.h>
 #include <WebCore/ExceptionCode.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMMediaListPrivate.h"
 #include "WebKitDOMNodePrivate.h"
 #include "WebKitDOMPrivate.h"
index 61d8db6..48c87db 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/Document.h>
 #include <WebCore/ExceptionCode.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMPrivate.h"
 #include "WebKitDOMStyleSheetListPrivate.h"
 #include "WebKitDOMStyleSheetPrivate.h"
index 962087a..04ef7c7 100644 (file)
@@ -25,7 +25,7 @@
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
 #include "GObjectEventListener.h"
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMNodePrivate.h"
index 8676391..473fab1 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/Document.h>
 #include <WebCore/ExceptionCode.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMNodeFilterPrivate.h"
 #include "WebKitDOMNodePrivate.h"
 #include "WebKitDOMPrivate.h"
index a0f6a90..f0d812e 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/Document.h>
 #include <WebCore/ExceptionCode.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include <WebCore/KeyboardEvent.h>
 #include "WebKitDOMDOMWindowPrivate.h"
 #include "WebKitDOMEventPrivate.h"
index e774cd1..8d77bfc 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/Document.h>
 #include <WebCore/ExceptionCode.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMDOMWindowPrivate.h"
 #include "WebKitDOMEventPrivate.h"
 #include "WebKitDOMPrivate.h"
index 962b6e4..9c91d54 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMNodePrivate.h"
 #include "WebKitDOMPrivate.h"
 #include "WebKitDOMXPathExpressionPrivate.h"
index fe97298..53c7a9c 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "DOMObjectCache.h"
 #include "GObjectXPathNSResolver.h"
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMObject.h"
 #include "WebKitDOMXPathNSResolverPrivate.h"
 #include "ConvertToUTF8String.h"
index 2c06a95..8ede06e 100644 (file)
@@ -24,7 +24,7 @@
 #include "DOMObjectCache.h"
 #include <WebCore/DOMException.h>
 #include <WebCore/Document.h>
-#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/JSExecState.h>
 #include "WebKitDOMNodePrivate.h"
 #include "WebKitDOMPrivate.h"
 #include "WebKitDOMXPathResultPrivate.h"
index 7f6b25e..edb3f30 100644 (file)
@@ -1,3 +1,129 @@
+2018-08-05  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        Add support for microtasks in workers
+        https://bugs.webkit.org/show_bug.cgi?id=188246
+
+        Reviewed by Darin Adler.
+
+        Rename JSMainThreadExecState.h to JSExecState.h.
+
+        * DOM/DOMAttr.mm:
+        * DOM/DOMBlob.mm:
+        * DOM/DOMCDATASection.mm:
+        * DOM/DOMCSSCharsetRule.mm:
+        * DOM/DOMCSSFontFaceRule.mm:
+        * DOM/DOMCSSImportRule.mm:
+        * DOM/DOMCSSMediaRule.mm:
+        * DOM/DOMCSSPageRule.mm:
+        * DOM/DOMCSSPrimitiveValue.mm:
+        * DOM/DOMCSSRule.mm:
+        * DOM/DOMCSSRuleList.mm:
+        * DOM/DOMCSSStyleDeclaration.mm:
+        * DOM/DOMCSSStyleRule.mm:
+        * DOM/DOMCSSStyleSheet.mm:
+        * DOM/DOMCSSUnknownRule.mm:
+        * DOM/DOMCSSValue.mm:
+        * DOM/DOMCSSValueList.mm:
+        * DOM/DOMCharacterData.mm:
+        * DOM/DOMComment.mm:
+        * DOM/DOMCounter.mm:
+        * DOM/DOMDocument.mm:
+        * DOM/DOMDocumentFragment.mm:
+        * DOM/DOMDocumentType.mm:
+        * DOM/DOMElement.mm:
+        * DOM/DOMEvent.mm:
+        * DOM/DOMFile.mm:
+        * DOM/DOMFileList.mm:
+        * DOM/DOMHTML.mm:
+        * DOM/DOMHTMLAnchorElement.mm:
+        * DOM/DOMHTMLAppletElement.mm:
+        * DOM/DOMHTMLAreaElement.mm:
+        * DOM/DOMHTMLBRElement.mm:
+        * DOM/DOMHTMLBaseElement.mm:
+        * DOM/DOMHTMLBaseFontElement.mm:
+        * DOM/DOMHTMLBodyElement.mm:
+        * DOM/DOMHTMLButtonElement.mm:
+        * DOM/DOMHTMLCanvasElement.mm:
+        * DOM/DOMHTMLCollection.mm:
+        * DOM/DOMHTMLDListElement.mm:
+        * DOM/DOMHTMLDirectoryElement.mm:
+        * DOM/DOMHTMLDivElement.mm:
+        * DOM/DOMHTMLDocument.mm:
+        * DOM/DOMHTMLElement.mm:
+        * DOM/DOMHTMLEmbedElement.mm:
+        * DOM/DOMHTMLFieldSetElement.mm:
+        * DOM/DOMHTMLFontElement.mm:
+        * DOM/DOMHTMLFormElement.mm:
+        * DOM/DOMHTMLFrameElement.mm:
+        * DOM/DOMHTMLFrameSetElement.mm:
+        * DOM/DOMHTMLHRElement.mm:
+        * DOM/DOMHTMLHeadElement.mm:
+        * DOM/DOMHTMLHeadingElement.mm:
+        * DOM/DOMHTMLHtmlElement.mm:
+        * DOM/DOMHTMLIFrameElement.mm:
+        * DOM/DOMHTMLImageElement.mm:
+        * DOM/DOMHTMLInputElement.mm:
+        * DOM/DOMHTMLLIElement.mm:
+        * DOM/DOMHTMLLabelElement.mm:
+        * DOM/DOMHTMLLegendElement.mm:
+        * DOM/DOMHTMLLinkElement.mm:
+        * DOM/DOMHTMLMapElement.mm:
+        * DOM/DOMHTMLMarqueeElement.mm:
+        * DOM/DOMHTMLMediaElement.mm:
+        * DOM/DOMHTMLMenuElement.mm:
+        * DOM/DOMHTMLMetaElement.mm:
+        * DOM/DOMHTMLModElement.mm:
+        * DOM/DOMHTMLOListElement.mm:
+        * DOM/DOMHTMLObjectElement.mm:
+        * DOM/DOMHTMLOptGroupElement.mm:
+        * DOM/DOMHTMLOptionElement.mm:
+        * DOM/DOMHTMLOptionsCollection.mm:
+        * DOM/DOMHTMLParagraphElement.mm:
+        * DOM/DOMHTMLParamElement.mm:
+        * DOM/DOMHTMLPreElement.mm:
+        * DOM/DOMHTMLQuoteElement.mm:
+        * DOM/DOMHTMLScriptElement.mm:
+        * DOM/DOMHTMLSelectElement.mm:
+        * DOM/DOMHTMLStyleElement.mm:
+        * DOM/DOMHTMLTableCaptionElement.mm:
+        * DOM/DOMHTMLTableCellElement.mm:
+        * DOM/DOMHTMLTableColElement.mm:
+        * DOM/DOMHTMLTableElement.mm:
+        * DOM/DOMHTMLTableRowElement.mm:
+        * DOM/DOMHTMLTableSectionElement.mm:
+        * DOM/DOMHTMLTextAreaElement.mm:
+        * DOM/DOMHTMLTitleElement.mm:
+        * DOM/DOMHTMLUListElement.mm:
+        * DOM/DOMHTMLVideoElement.mm:
+        * DOM/DOMImplementation.mm:
+        * DOM/DOMKeyboardEvent.mm:
+        * DOM/DOMMediaError.mm:
+        * DOM/DOMMediaList.mm:
+        * DOM/DOMMouseEvent.mm:
+        * DOM/DOMMutationEvent.mm:
+        * DOM/DOMNamedNodeMap.mm:
+        * DOM/DOMNode.mm:
+        * DOM/DOMNodeIterator.mm:
+        * DOM/DOMNodeList.mm:
+        * DOM/DOMOverflowEvent.mm:
+        * DOM/DOMProcessingInstruction.mm:
+        * DOM/DOMProgressEvent.mm:
+        * DOM/DOMRGBColor.mm:
+        * DOM/DOMRange.mm:
+        * DOM/DOMRect.mm:
+        * DOM/DOMStyleSheet.mm:
+        * DOM/DOMStyleSheetList.mm:
+        * DOM/DOMText.mm:
+        * DOM/DOMTextEvent.mm:
+        * DOM/DOMTimeRanges.mm:
+        * DOM/DOMTokenList.mm:
+        * DOM/DOMTreeWalker.mm:
+        * DOM/DOMUIEvent.mm:
+        * DOM/DOMWheelEvent.mm:
+        * DOM/DOMXPathExpression.mm:
+        * DOM/DOMXPathResult.mm:
+        * DOM/ObjCEventListener.mm:
+
 2018-08-03  Alex Christensen  <achristensen@webkit.org>
 
         Fix spelling of "overridden"
index 43923d7..e8f76f1 100644 (file)
@@ -32,7 +32,7 @@
 #import "DOMNodeInternal.h"
 #import <WebCore/Element.h>
 #import "ExceptionHandlers.h"
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/StyleProperties.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
index 75914db..4e6edc5 100644 (file)
@@ -29,7 +29,7 @@
 #import "DOMInternal.h"
 #import "DOMNodeInternal.h"
 #import "ExceptionHandlers.h"
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebCoreObjCExtras.h>
index 49ba78a..1ea453f 100644 (file)
@@ -28,7 +28,7 @@
 #import <WebCore/CDATASection.h>
 #import "DOMNodeInternal.h"
 #import "ExceptionHandlers.h"
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/WebScriptObjectPrivate.h>
 #import <wtf/GetPtr.h>
index 33ebdc0..d1b5eab 100644 (file)
@@ -28,7 +28,7 @@
 #import "DOMCSSRuleInternal.h"
 #import "DOMNodeInternal.h"
 #import "ExceptionHandlers.h"
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 9d1e59b..ef26675 100644 (file)
@@ -31,7 +31,7 @@
 #import "DOMCSSStyleDeclarationInternal.h"
 #import "DOMNodeInternal.h"
 #import "ExceptionHandlers.h"
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/StyleProperties.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index d2b366c..8804f24 100644 (file)
@@ -32,7 +32,7 @@
 #import "DOMMediaListInternal.h"
 #import "DOMNodeInternal.h"
 #import "ExceptionHandlers.h"
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/MediaList.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
index 90596a5..159a9a4 100644 (file)
@@ -32,7 +32,7 @@
 #import "DOMMediaListInternal.h"
 #import "DOMNodeInternal.h"
 #import "ExceptionHandlers.h"
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/MediaList.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
index 6f36336..f362231 100644 (file)
@@ -31,7 +31,7 @@
 #import "DOMCSSStyleDeclarationInternal.h"
 #import "DOMNodeInternal.h"
 #import "ExceptionHandlers.h"
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/StyleProperties.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
index da1be95..35a8934 100644 (file)
@@ -35,7 +35,7 @@
 #import "DOMRGBColorInternal.h"
 #import "DOMRectInternal.h"
 #import "ExceptionHandlers.h"
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 760fb5b..d48cb3f 100644 (file)
@@ -32,7 +32,7 @@
 #import "DOMCSSStyleSheetInternal.h"
 #import "DOMNodeInternal.h"
 #import "ExceptionHandlers.h"
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebCoreObjCExtras.h>
index 3cac5c2..8efde61 100644 (file)
@@ -32,7 +32,7 @@
 #import "DOMInternal.h"
 #import "DOMNodeInternal.h"
 #import "ExceptionHandlers.h"
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/WebCoreObjCExtras.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 0a0677d..2d9feff 100644 (file)
@@ -34,7 +34,7 @@
 #import "DOMInternal.h"
 #import "DOMNodeInternal.h"
 #import "ExceptionHandlers.h"
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebCoreObjCExtras.h>
index fa10df1..8a4cff3 100644 (file)
@@ -31,7 +31,7 @@
 #import "DOMCSSStyleDeclarationInternal.h"
 #import "DOMNodeInternal.h"
 #import "ExceptionHandlers.h"
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/StyleProperties.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
index d1a1f0f..8c24060 100644 (file)
@@ -34,7 +34,7 @@
 #import "DOMNodeInternal.h"
 #import "DOMStyleSheetInternal.h"
 #import "ExceptionHandlers.h"
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 6883e20..db23376 100644 (file)
@@ -29,7 +29,7 @@
 #import "DOMCSSRuleInternal.h"
 #import "DOMNodeInternal.h"
 #import "ExceptionHandlers.h"
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/WebScriptObjectPrivate.h>
 #import <wtf/GetPtr.h>
index 799fb61..0c6e074 100644 (file)
@@ -29,7 +29,7 @@
 #import "DOMInternal.h"
 #import "DOMNodeInternal.h"
 #import "ExceptionHandlers.h"
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebCoreObjCExtras.h>
index 138e531..8c1aebc 100644 (file)
@@ -29,7 +29,7 @@
 #import "DOMNodeInternal.h"
 #import "ExceptionHandlers.h"
 #import <WebCore/DeprecatedCSSOMValueList.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/WebScriptObjectPrivate.h>
 #import <wtf/GetPtr.h>
index 704aab9..8c3b4d4 100644 (file)
@@ -29,7 +29,7 @@
 #import "DOMNodeInternal.h"
 #import <WebCore/Element.h>
 #import "ExceptionHandlers.h"
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index f6012ee..e25d261 100644 (file)
@@ -28,7 +28,7 @@
 #import <WebCore/Comment.h>
 #import "DOMNodeInternal.h"
 #import "ExceptionHandlers.h"
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/WebScriptObjectPrivate.h>
 #import <wtf/GetPtr.h>
index b0e4af4..2d1e565 100644 (file)
@@ -29,7 +29,7 @@
 #import "DOMInternal.h"
 #import "DOMNodeInternal.h"
 #import "ExceptionHandlers.h"
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebCoreObjCExtras.h>
index e53e9d8..cf30561 100644 (file)
@@ -68,7 +68,7 @@
 #import <WebCore/HTMLElement.h>
 #import <WebCore/HTMLHeadElement.h>
 #import <WebCore/HTMLScriptElement.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/NameNodeList.h>
 #import <WebCore/NativeNodeFilter.h>
 #import <WebCore/Node.h>
index 1fd7ea9..96d0329 100644 (file)
@@ -33,7 +33,7 @@
 #import <WebCore/Element.h>
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLCollection.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/NameNodeList.h>
 #import <WebCore/NodeList.h>
 #import <WebCore/ThreadCheck.h>
index ee56f64..e201176 100644 (file)
@@ -29,7 +29,7 @@
 #import "DOMNodeInternal.h"
 #import <WebCore/DocumentType.h>
 #import "ExceptionHandlers.h"
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/NamedNodeMap.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
index cd1ed0d..718b135 100644 (file)
@@ -37,7 +37,7 @@
 #import <WebCore/Element.h>
 #import <WebCore/HTMLCollection.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/NameNodeList.h>
 #import <WebCore/NodeList.h>
 #import <WebCore/StyleProperties.h>
index 9aca41b..60cdb6e 100644 (file)
@@ -30,7 +30,7 @@
 #import "DOMNodeInternal.h"
 #import <WebCore/Event.h>
 #import "ExceptionHandlers.h"
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/Node.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
index 6bf57b4..eda87ff 100644 (file)
@@ -29,7 +29,7 @@
 #import "DOMNodeInternal.h"
 #import "ExceptionHandlers.h"
 #import <WebCore/File.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index a2674fe..c0ac825 100644 (file)
@@ -31,7 +31,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/File.h>
 #import <WebCore/FileList.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/WebCoreObjCExtras.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 7a5f981..e1c335b 100644 (file)
@@ -51,7 +51,7 @@
 #import "DOMHTMLElementInternal.h"
 #import <WebCore/Autocapitalize.h>
 #import <WebCore/HTMLTextFormControlElement.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/RenderLayer.h>
 #import <WebCore/WAKWindow.h>
 #import <WebCore/WebCoreThreadMessage.h>
index 23d1156..4460f27 100644 (file)
@@ -32,7 +32,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLAnchorElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index d6b2aa1..a84542d 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLAppletElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 1f2adac..c4ab232 100644 (file)
@@ -32,7 +32,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLAreaElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index ace786e..cf5b3e0 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLBRElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 65c3573..514b709 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLBaseElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 8c2fd30..a99c0b6 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLNames.h>
 #import <WebCore/HTMLUnknownElement.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 61c68f8..695293b 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLBodyElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 7cf60f4..98aa27c 100644 (file)
@@ -32,7 +32,7 @@
 #import <WebCore/HTMLButtonElement.h>
 #import <WebCore/HTMLFormElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/NameNodeList.h>
 #import <WebCore/NodeList.h>
 #import <WebCore/ThreadCheck.h>
index 3e371ee..0fd60a6 100644 (file)
@@ -28,7 +28,7 @@
 #import "DOMNodeInternal.h"
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLCanvasElement.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/StringAdaptors.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
index 7fe7381..e344098 100644 (file)
@@ -30,7 +30,7 @@
 #import "DOMNodeListInternal.h"
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLCollection.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/NameNodeList.h>
 #import <WebCore/Node.h>
 #import <WebCore/NodeList.h>
index d09570e..2e73851 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLDListElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/WebScriptObjectPrivate.h>
 #import <wtf/GetPtr.h>
index 4e589a6..228d418 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLDirectoryElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/WebScriptObjectPrivate.h>
 #import <wtf/GetPtr.h>
index 57d41d5..2936afa 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLDivElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 7d8dac7..0375a3c 100644 (file)
@@ -30,7 +30,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLCollection.h>
 #import <WebCore/HTMLDocument.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 7330dc1..a5e0cd3 100644 (file)
@@ -34,7 +34,7 @@
 #import <WebCore/HTMLElement.h>
 #import <WebCore/HTMLNames.h>
 #import <WebCore/HitTestResult.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 280e056..6b82be0 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLEmbedElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index a42cf31..ea92a01 100644 (file)
@@ -34,7 +34,7 @@
 #import <WebCore/HTMLFieldSetElement.h>
 #import <WebCore/HTMLFormElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/ValidityState.h>
index 2f45c2c..80de490 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLFontElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index dd431c4..bfde1da 100644 (file)
@@ -31,7 +31,7 @@
 #import <WebCore/HTMLCollection.h>
 #import <WebCore/HTMLFormElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 977eb4a..600f44f 100644 (file)
@@ -33,7 +33,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLFrameElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index be8d89a..f2f207f 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLFrameSetElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index d4d03ea..b2578aa 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLHRElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 65e508d..bef39ae 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLHeadElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 5c4e3b6..811bb18 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLHeadingElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 4d28441..287ce7f 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLHtmlElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index b1b2c03..f382c9e 100644 (file)
@@ -33,7 +33,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLIFrameElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 1800d6d..fc91953 100644 (file)
@@ -31,7 +31,7 @@
 #import <WebCore/HTMLImageElement.h>
 #import <WebCore/HTMLNames.h>
 #import <WebCore/HitTestResult.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index ec2e10a..8363735 100644 (file)
@@ -59,7 +59,7 @@
 #import <WebCore/HTMLInputElement.h>
 #import <WebCore/HTMLNames.h>
 #import <WebCore/HitTestResult.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/NameNodeList.h>
 #import <WebCore/NodeList.h>
 #import <WebCore/RenderElement.h>
index 617330e..269d1a5 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLLIElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index ee1a597..51f560c 100644 (file)
@@ -33,7 +33,7 @@
 #import <WebCore/HTMLFormElement.h>
 #import <WebCore/HTMLLabelElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index f9e8dd1..9343ca6 100644 (file)
@@ -31,7 +31,7 @@
 #import <WebCore/HTMLFormElement.h>
 #import <WebCore/HTMLLegendElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 3819335..20f4c01 100644 (file)
@@ -33,7 +33,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLLinkElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/StyleSheet.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
index cf33b0e..b921b3a 100644 (file)
@@ -31,7 +31,7 @@
 #import <WebCore/HTMLCollection.h>
 #import <WebCore/HTMLMapElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index d0d3ea8..61ab4c6 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLMarqueeElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index a1d211e..5bc7456 100644 (file)
@@ -34,7 +34,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLMediaElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/MediaError.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/TimeRanges.h>
index e32b612..1eecbaa 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLMenuElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/WebScriptObjectPrivate.h>
 #import <wtf/GetPtr.h>
index 84e8fb3..9987002 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLMetaElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index c2c6fa4..d885fcf 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLModElement.h>
 #import <WebCore/HTMLNames.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 321f3ff..a32c2d8 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLNames.h>
 #import <WebCore/HTMLOListElement.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index a9d0333..7ab73f5 100644 (file)
@@ -34,7 +34,7 @@
 #import <WebCore/HTMLFormElement.h>
 #import <WebCore/HTMLNames.h>
 #import <WebCore/HTMLObjectElement.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/RenderElement.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
index 5c6e497..4e515da 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLNames.h>
 #import <WebCore/HTMLOptGroupElement.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 5bd2ef0..fdec54e 100644 (file)
@@ -31,7 +31,7 @@
 #import <WebCore/HTMLFormElement.h>
 #import <WebCore/HTMLNames.h>
 #import <WebCore/HTMLOptionElement.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index fdfa6e8..f770a8a 100644 (file)
@@ -32,7 +32,7 @@
 #import <WebCore/HTMLOptGroupElement.h>
 #import <WebCore/HTMLOptionElement.h>
 #import <WebCore/HTMLOptionsCollection.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/Node.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
index 024cf47..6c511e9 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLNames.h>
 #import <WebCore/HTMLParagraphElement.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 166c751..5fb0cec 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLNames.h>
 #import <WebCore/HTMLParamElement.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index f5ee9b4..de6eb32 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLNames.h>
 #import <WebCore/HTMLPreElement.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/WebScriptObjectPrivate.h>
 #import <wtf/GetPtr.h>
index 0ea0f83..3749c18 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLNames.h>
 #import <WebCore/HTMLQuoteElement.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index 4f75e01..3344d54 100644 (file)
@@ -29,7 +29,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLNames.h>
 #import <WebCore/HTMLScriptElement.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>
 #import <WebCore/WebScriptObjectPrivate.h>
index a0423d4..758141d 100644 (file)
@@ -39,7 +39,7 @@
 #import <WebCore/HTMLOptGroupElement.h>
 #import <WebCore/HTMLOptionsCollection.h>
 #import <WebCore/HTMLSelectElement.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/NameNodeList.h>
 #import <WebCore/Node.h>
 #import <WebCore/NodeList.h>
index 65fc31a..a452782 100644 (file)
@@ -30,7 +30,7 @@
 #import "ExceptionHandlers.h"
 #import <WebCore/HTMLNames.h>
 #import <WebCore/HTMLStyleElement.h>
-#import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/JSExecState.h>
 #import <WebCore/StyleSheet.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/URL.h>