* SUMMARY By hitting the breakpoint on our serial dispatch_queue for debuggable connections we run a nested runloop and block future tasks on that queue, including any incoming debugger commands! * TEST: <script> function foo() { console.log('a'); console.log('b'); console.log('c'); } </script> * STEPS TO REPRODUCE 1. Remotely inspect test. 2. Set a breakpoint in foo (e.g. "b" line) 3. In console: js> foo(); => Breakpoint is hit, and we can no longer do anything.
Created attachment 226328 [details] [PATCH] Proposed Fix This approach is modeled after the WebThreadRun queue with run loop source. It uses the CFMainRunLoop, which is fine because currently remote inspection requires a runloop.
Comment on attachment 226328 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=226328&action=review > Source/JavaScriptCore/inspector/EventLoop.cpp:43 > +CFStringRef EventLoop::remoteInspectorRunLoopMode() > +{ > + return CFSTR("com.apple.JavaScriptCore.remote-inspector-runloop-mode"); > +} This makes EventLoop more about Inspector than before. But it is in the inspector directory, so I guess it is fine. > Source/JavaScriptCore/inspector/remote/RemoteInspectorDebuggableConnection.mm:123 > + CFRunLoopAddSource(CFRunLoopGetMain(), rwiRunLoopSource, kCFRunLoopDefaultMode); > + CFRunLoopAddSource(CFRunLoopGetMain(), rwiRunLoopSource, EventLoop::remoteInspectorRunLoopMode()); Needs added to both so paused and non-paused works? Maybe add a comment?
<http://trac.webkit.org/changeset/165508>