Bug 157714 - Web Inspector: breakpoints in sourceURL named scripts are not persisted
Summary: Web Inspector: breakpoints in sourceURL named scripts are not persisted
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: BJ Burg
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-05-14 14:00 PDT by BJ Burg
Modified: 2016-05-17 15:02 PDT (History)
7 users (show)

See Also:


Attachments
Proposed Fix (20.96 KB, patch)
2016-05-14 22:01 PDT, BJ Burg
joepeck: review+
bburg: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2016-05-14 14:00:12 PDT
This makes it very difficult to debug our injected scripts using breakpoints. I don't think this is a regression.

STEPS TO REPRODUCE:

Using an engineering build, open the debugger tab.
Select the __WebInspectorInjectedScript__ resource.
Set a breakpoint anywhere.
Reload.

EXPECTED:

The breakpoint should be restored on reload

ACTUAL:

The breakpoint is not restored
Comment 1 Radar WebKit Bug Importer 2016-05-14 14:00:56 PDT
<rdar://problem/26287099>
Comment 2 BJ Burg 2016-05-14 22:01:22 PDT
Created attachment 278960 [details]
Proposed Fix

Still need to run tests and such, but it works for injected and normal scripts in my basic testing.
Comment 3 BJ Burg 2016-05-16 11:34:52 PDT
Comment on attachment 278960 [details]
Proposed Fix

I did not detect any test regressions caused by this patch, and it seems to work fine locally. Removing 'WIP' from patch, review away!
Comment 4 Joseph Pecoraro 2016-05-16 17:10:49 PDT
Comment on attachment 278960 [details]
Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=278960&action=review

r=me

I don't particularly like the name contentIdentifier, but I don't have a better suggestion.

> Source/WebInspectorUI/UserInterface/Models/Breakpoint.js:38
> +            var contentIdentifier = sourceCodeLocationOrInfo.contentIdentifier || sourceCodeLocationOrInfo.url;

We should throw a comment in here about sourceCodeLocationOrInfo that the info portion is legacy and can eventually be removed.
Comment 5 BJ Burg 2016-05-16 21:39:10 PDT
(In reply to comment #4)
> Comment on attachment 278960 [details]
> Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=278960&action=review
> 
> r=me
> 
> I don't particularly like the name contentIdentifier, but I don't have a
> better suggestion.

I hear ya. The other straightforward suggestion is contentURL.

> 
> > Source/WebInspectorUI/UserInterface/Models/Breakpoint.js:38
> > +            var contentIdentifier = sourceCodeLocationOrInfo.contentIdentifier || sourceCodeLocationOrInfo.url;
> 
> We should throw a comment in here about sourceCodeLocationOrInfo that the
> info portion is legacy and can eventually be removed.
Comment 6 BJ Burg 2016-05-17 10:32:24 PDT
Committed r201019: <http://trac.webkit.org/changeset/201019>