Summary: | Web Inspector: Unable to delete breakpoint from worker script | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Matt Baker <mattbaker> | ||||||
Component: | Web Inspector | Assignee: | Joseph Pecoraro <joepeck> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | bburg, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer | ||||||
Priority: | P2 | ||||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Matt Baker
2016-12-07 18:38:47 PST
Other code uses this pattern: if (breakpoint.contentIdentifier) { // Affect all targets } else if (breakpoint.scriptIdentifier) { // Affect only breakpoint.target } I should be using this pattern in DebuggerManager.prototype._removeBreakpoint just like we do in DebuggerManager.prototype._setBreakpoint. Testing a fix now. Yep, that addresses the issue. I'll should be able to write a test for this. To clarify, the breakpoint is removed from only 1 Worker and not all Workers that shared a resource with the same URL. Created attachment 296468 [details]
[PATCH] Proposed Fix
Comment on attachment 296468 [details]
[PATCH] Proposed Fix
Forgot to update test results in patch.
Created attachment 296472 [details]
[PATCH] Proposed Fix
Comment on attachment 296472 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=296472&action=review Nice test! r=me > LayoutTests/inspector/worker/debugger-shared-breakpoint.html:33 > + // pause on the next statement. Do an InspectorTest.log, which evalutes evaluates > LayoutTests/inspector/worker/debugger-shared-breakpoint.html:74 > + InspectorTest.evaluateInPage(`triggerCreateWorkers(); triggerWorkerResponse();`); Seems like a template literal isn't needed here. > LayoutTests/inspector/worker/debugger-shared-breakpoint.html:100 > + InspectorTest.evaluateInPage(`triggerWorkerBreakpointPauses()`); Ditto. > LayoutTests/inspector/worker/debugger-shared-breakpoint.html:126 > + InspectorTest.evaluateInPage(`triggerWorkerResponse()`); Ditto. Comment on attachment 296472 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=296472&action=review >> LayoutTests/inspector/worker/debugger-shared-breakpoint.html:74 >> + InspectorTest.evaluateInPage(`triggerCreateWorkers(); triggerWorkerResponse();`); > > Seems like a template literal isn't needed here. It is easy to use a template literal for code to not have to worry about strings that may appear in the code. |