Bug 52999

Summary: Web Inspector: debugger and browser debugger agents should manage sticky breakpoints independently
Product: WebKit Reporter: Pavel Podivilov <podivilov>
Component: Web Inspector (Deprecated)Assignee: Pavel Podivilov <podivilov>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch.
none
Fix style. pfeldman: review+

Description Pavel Podivilov 2011-01-24 02:19:52 PST
Web Inspector: debugger and browser debugger agents should manage sticky breakpoints independently.

This is a second step of debugger api refactoring (see bug 52879).
Comment 1 Pavel Podivilov 2011-01-24 02:20:32 PST
Created attachment 79904 [details]
Patch.
Comment 2 WebKit Review Bot 2011-01-24 02:22:16 PST
Attachment 79904 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebCore/inspector/InspectorBrowserDebuggerAgent.h:61:  The parameter name "breakpoints" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/inspector/InspectorDebuggerAgent.h:64:  The parameter name "breakpoints" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 2 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Pavel Podivilov 2011-01-24 02:23:28 PST
Created attachment 79906 [details]
Fix style.
Comment 4 Pavel Feldman 2011-01-24 02:27:14 PST
Comment on attachment 79904 [details]
Patch.

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

> Source/WebCore/inspector/front-end/BreakpointManager.js:333
> +        InspectorBackend.setAllJavaScriptBreakpoints(allJavaScriptBreakpoints);

Why do we push JavaScript breakpoints to the backend?
Comment 5 Pavel Podivilov 2011-01-24 02:34:54 PST
(In reply to comment #4)
> (From update of attachment 79904 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=79904&action=review
> 
> > Source/WebCore/inspector/front-end/BreakpointManager.js:333
> > +        InspectorBackend.setAllJavaScriptBreakpoints(allJavaScriptBreakpoints);
> 
> Why do we push JavaScript breakpoints to the backend?

Because JavaScript breakpoints are persisted in localStorage, and we have to sync them with backend when loading inspector.
Comment 6 Pavel Feldman 2011-01-24 04:36:23 PST
(In reply to comment #5)
> (In reply to comment #4)
> > (From update of attachment 79904 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=79904&action=review
> > 
> > > Source/WebCore/inspector/front-end/BreakpointManager.js:333
> > > +        InspectorBackend.setAllJavaScriptBreakpoints(allJavaScriptBreakpoints);
> > 
> > Why do we push JavaScript breakpoints to the backend?
> 
> Because JavaScript breakpoints are persisted in localStorage, and we have to sync them with backend when loading inspector.

I thought we agreed that there should be no explicit setAllJavaScriptBreakpoints method.
Comment 7 Pavel Podivilov 2011-01-24 05:14:45 PST
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > (From update of attachment 79904 [details] [details] [details])
> > > View in context: https://bugs.webkit.org/attachment.cgi?id=79904&action=review
> > > 
> > > > Source/WebCore/inspector/front-end/BreakpointManager.js:333
> > > > +        InspectorBackend.setAllJavaScriptBreakpoints(allJavaScriptBreakpoints);
> > > 
> > > Why do we push JavaScript breakpoints to the backend?
> > 
> > Because JavaScript breakpoints are persisted in localStorage, and we have to sync them with backend when loading inspector.
> 
> I thought we agreed that there should be no explicit setAllJavaScriptBreakpoints method.

In this change JavaScript breakpoints are separated from browser breakpoints to simplify further refactoring. Later we'll get rid of setAllBreakpoints protocol methods.
Comment 8 Pavel Podivilov 2011-01-25 01:44:59 PST
Committed r76581: <http://trac.webkit.org/changeset/76581>