Bug 127865

Summary: Web Inspector: Run JSC Inspector EventLoop in a custom run loop mode to prevent default observers from running
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ggaren, graouts, joepeck, mark.lam, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix none

Description Joseph Pecoraro 2014-01-29 16:20:03 PST
* SUMMARY
When the main thread triggers a JSC event loop, an NSTimer scheduled to fire on the main thread can still run.

Bad! We want to get as close to possible to having everything paused and have the debugger control execution going forward. Having NSTimers evaluate code in the context while paused is unexpected and could be bad.

* NOTES
As a temporary solution spin the runloop in a custom mode that won't fire default/common observers. We need to investigate better solutions for more complete pausing of the process, as this doesn't handle apps that may already have multiple threads accessing a JSContext concurrently.
Comment 1 Joseph Pecoraro 2014-01-29 16:24:10 PST
Created attachment 222606 [details]
[PATCH] Proposed Fix
Comment 2 Radar WebKit Bug Importer 2014-01-29 16:24:34 PST
<rdar://problem/15941995>
Comment 3 Geoffrey Garen 2014-01-29 16:36:46 PST
Comment on attachment 222606 [details]
[PATCH] Proposed Fix

r=me
Comment 4 WebKit Commit Bot 2014-01-29 17:28:09 PST
Comment on attachment 222606 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 222606

Committed r163054: <http://trac.webkit.org/changeset/163054>
Comment 5 WebKit Commit Bot 2014-01-29 17:28:11 PST
All reviewed patches have been landed.  Closing bug.