summaryrefslogtreecommitdiff
path: root/Source/WebCore/bindings/js/JSMainThreadExecState.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/bindings/js/JSMainThreadExecState.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/bindings/js/JSMainThreadExecState.cpp')
-rw-r--r--Source/WebCore/bindings/js/JSMainThreadExecState.cpp26
1 files changed, 9 insertions, 17 deletions
diff --git a/Source/WebCore/bindings/js/JSMainThreadExecState.cpp b/Source/WebCore/bindings/js/JSMainThreadExecState.cpp
index 779b96ab0..f49f4a87e 100644
--- a/Source/WebCore/bindings/js/JSMainThreadExecState.cpp
+++ b/Source/WebCore/bindings/js/JSMainThreadExecState.cpp
@@ -25,11 +25,9 @@
#include "config.h"
#include "JSMainThreadExecState.h"
-#include "MutationObserver.h"
-#if ENABLE(INDEXED_DATABASE)
-#include "IDBPendingTransactionMonitor.h"
-#endif
+#include "Microtasks.h"
+#include "MutationObserver.h"
namespace WebCore {
@@ -37,27 +35,21 @@ JSC::ExecState* JSMainThreadExecState::s_mainThreadState = 0;
void JSMainThreadExecState::didLeaveScriptContext()
{
-#if ENABLE(INDEXED_DATABASE)
- // Indexed DB requires that transactions are created with an internal |active| flag
- // set to true, but the flag becomes false when control returns to the event loop.
- IDBPendingTransactionMonitor::deactivateNewTransactions();
-#endif
-
- MutationObserver::deliverAllMutations();
+ MicrotaskQueue::mainThreadQueue().performMicrotaskCheckpoint();
}
-JSC::JSValue functionCallHandlerFromAnyThread(JSC::ExecState* exec, JSC::JSValue functionObject, JSC::CallType callType, const JSC::CallData& callData, JSC::JSValue thisValue, const JSC::ArgList& args)
+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);
- return JSC::call(exec, functionObject, callType, callData, thisValue, args);
+ return JSMainThreadExecState::call(exec, functionObject, callType, callData, thisValue, args, returnedException);
+ return JSC::call(exec, functionObject, callType, callData, thisValue, args, returnedException);
}
-JSC::JSValue evaluateHandlerFromAnyThread(JSC::ExecState* exec, const JSC::SourceCode& source, JSC::JSValue thisValue, JSC::JSValue* exception)
+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, exception);
- return JSC::evaluate(exec, source, thisValue, exception);
+ return JSMainThreadExecState::evaluate(exec, source, thisValue, returnedException);
+ return JSC::evaluate(exec, source, thisValue, returnedException);
}
} // namespace WebCore