Remove WTF::setMainThreadCallbacksPaused
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Jun 2020 00:27:44 +0000 (00:27 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Jun 2020 00:27:44 +0000 (00:27 +0000)
commitf81667d57b211df57c6c4f12c573751f1b13f084
tree197c67fb93d2ff6302064b0385051dc3543946e9
parent0deb058851d9a9ceb0fe03daa56b00d955407ce1
Remove WTF::setMainThreadCallbacksPaused
https://bugs.webkit.org/show_bug.cgi?id=213112

Reviewed by Tim Horton.

Source/WebCore:

* inspector/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::setJavaScriptPaused):

Source/WTF:

setMainThreadCallbacksPaused pauses all uses of callOnMainThread. That
has too many side-effects. For example, you can scroll, but you can't
paint any large images (since they do async image decoding).

Meanwhile, setMainThreadCallbacksPaused doesn't pause RunLoop::dispatch.
So, other things don't get paused.

Let's just rely on suspending the ScriptExecutionContext and document
event queue. That should suspend JavaScript-visible stuff without
suspending engine-critical stuff.

* wtf/MainThread.cpp:
(WTF::dispatchFunctionsFromMainThread):
(WTF::setMainThreadCallbacksPaused): Deleted.
* wtf/MainThread.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/MainThread.cpp
Source/WTF/wtf/MainThread.h
Source/WebCore/ChangeLog
Source/WebCore/inspector/PageScriptDebugServer.cpp