Bug 56123 - Web Inspector: move breakpoints restoring to debugger presentation model
Summary: Web Inspector: move breakpoints restoring to debugger presentation model
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Podivilov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-10 11:11 PST by Pavel Podivilov
Modified: 2011-03-14 08:26 PDT (History)
10 users (show)

See Also:


Attachments
Patch. (23.92 KB, patch)
2011-03-10 11:11 PST, Pavel Podivilov
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Podivilov 2011-03-10 11:11:20 PST
Web Inspector: move breakpoints restoring to debugger presentation model.

DebuggerModel's "breakpoint-added" and "breakpoint-removed" events are gone since setBreakpoint/removeBreakpoint are now called from DPM only.
Comment 1 Pavel Podivilov 2011-03-10 11:11:53 PST
Created attachment 85352 [details]
Patch.
Comment 2 Pavel Feldman 2011-03-14 05:57:37 PDT
Comment on attachment 85352 [details]
Patch.

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

> Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:51
> +            this._breakpointsRestored = true;

debugger is enabled with no state, we should restore breakpoints in all cases.

> Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:60
> +            if (id in this._breakpoints)

this._uiBreakpoints

> Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:196
> +            if (typeof breakpoint.url !== "string" || typeof breakpoint.lineNumber !== "number" || typeof breakpoint.columnNumber !== "number" ||

How can this happen?
Comment 3 Pavel Podivilov 2011-03-14 08:17:16 PDT
Committed r81025: <http://trac.webkit.org/changeset/81025>
Comment 4 Pavel Podivilov 2011-03-14 08:26:44 PDT
(In reply to comment #2)
> (From update of attachment 85352 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=85352&action=review
> 
> > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:51
> > +            this._breakpointsRestored = true;
> 
> debugger is enabled with no state, we should restore breakpoints in all cases.

Now breakpoints is cleared from cookie when debugger is disabled.

> 
> > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:60
> > +            if (id in this._breakpoints)
> 
> this._uiBreakpoints
> 
> > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:196
> > +            if (typeof breakpoint.url !== "string" || typeof breakpoint.lineNumber !== "number" || typeof breakpoint.columnNumber !== "number" ||
> 
> How can this happen?
Done.