Remove WTF::setMainThreadCallbacksPaused
Created attachment 401706 [details] Patch
Comment on attachment 401706 [details] Patch What impact will removing this have on JS debugging? It's been there since 2010.
Comment on attachment 401706 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=401706&action=review > Source/WTF/ChangeLog:16 > + even queue. That should suspend JavaScript-visible stuff without s/even/event/ Also... if we can really do this, why don't we use this for JS-synchronous-but-ideally-not-engine-synchronous things like alert()?
> Also... if we can really do this, why don't we use this for > JS-synchronous-but-ideally-not-engine-synchronous things like alert()? Use... what? :P alert() still needs to run a nested run loop or a sync IPC because it's not possible to tear down the whole stack and return to the main run loop -- that's not currently a feature of C++ or of the JS engine. Also, the debugger intends to allow a little more continuing execution than alert(). For example, the debugger intends to allow scrolling, selection, re-layout, and nested JS execution, and alert() does not.
Aha! Ok, makes sense.
> What impact will removing this have on JS debugging? It's been there since > 2010. This code is all about how WebCore behaves when stopped at a breakpoint. Some edge case oddities will be fixed. For example, large images will be able to paint now. If I've overlooked something, some JS code will still run. So, you won't be as stopped as you wanted to be. The good news is, we can find and fix that kind of bug by migrating the code to the explicit JS event queue, which is much more reliable than just pausing all scheduled main thread code, including non-JS code. All of this being said, EWS says I did break a WK2 inspector test. Time for some fun debugging.
> All of this being said, EWS says I did break a WK2 inspector test. Time for > some fun debugging. Actually, that inspector test was broken by r262904, not this patch. So, back up for review.
Re-testing rdar://problem/14133001 still passes.
Created attachment 402607 [details] Patch for landing
Committed r263432: <https://trac.webkit.org/changeset/263432> All reviewed patches have been landed. Closing bug and clearing flags on attachment 402607 [details].
<rdar://problem/64673032>