| Summary: | Web Inspector: Hang in Remote Inspection triggering breakpoint from console | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||
| Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | ggaren, graouts, joepeck, timothy, webkit-bug-importer | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Attachments: |
|
||||||
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? |
* 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.