Bug 48434

Summary: Web Inspector: persist JavaScript breakpoints in frontend settings
Product: WebKit Reporter: Pavel Podivilov <podivilov>
Component: Web Inspector (Deprecated)Assignee: Pavel Podivilov <podivilov>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, apavlov, bweinstein, eric, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, tonyg, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 51463    
Bug Blocks:    
Attachments:
Description Flags
Patch.
none
Patch.
none
Patch.
yurys: review-
Patch.
none
Patch. yurys: review+

Pavel Podivilov
Reported 2010-10-27 09:00:35 PDT
Web Inspector: persist breakpoints in frontend settings
Attachments
Patch. (16.90 KB, patch)
2010-10-27 09:01 PDT, Pavel Podivilov
no flags
Patch. (16.96 KB, patch)
2010-10-28 04:42 PDT, Pavel Podivilov
no flags
Patch. (64.44 KB, patch)
2010-12-21 04:54 PST, Pavel Podivilov
yurys: review-
Patch. (64.49 KB, patch)
2010-12-21 09:50 PST, Pavel Podivilov
no flags
Patch. (64.49 KB, patch)
2010-12-21 09:52 PST, Pavel Podivilov
yurys: review+
Pavel Podivilov
Comment 1 2010-10-27 09:01:16 PDT
Alexander Pavlov (apavlov)
Comment 2 2010-10-28 01:40:25 PDT
Comment on attachment 72042 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=72042&action=review > WebCore/inspector/InspectorState.cpp:162 > + RefPtr<InspectorObject> object; seems like an unused variable > WebCore/inspector/InspectorState.cpp:170 > + i->second.m_value = value; you can alias i->second for clarity (since it is used 3 times in the function) > WebCore/inspector/front-end/BreakpointManager.js:138 > + breakpoints[breakpoint.url][line] = {enabled: breakpoint.enabled, condition: breakpoint.condition}; while we have no consistent opinion on this, having spaces after '{' and before '}' is preferred (as noted by joepeck) > WebCore/inspector/front-end/Settings.js:91 > + } catch(e) { since empty catch blocks are considered a poor practice, please add a comment clarifying why this fall-through is OK
Pavel Podivilov
Comment 3 2010-10-28 04:42:52 PDT
Created attachment 72169 [details] Patch. All comments addressed.
Pavel Podivilov
Comment 4 2010-12-21 04:54:12 PST
Yury Semikhatsky
Comment 5 2010-12-21 07:52:56 PST
Comment on attachment 77102 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=77102&action=review > WebCore/bindings/js/ScriptDebugServer.cpp:162 > + intptr_t sourceIDValue = tokens[0].toIntPtr(); Please check for possible parse errors by passing &success flag into toIntPtr. > WebCore/inspector/Inspector.idl:248 > + [notify, domain=Debugger] void breakpointResolved(out String breakpointId, out String sourceID, out unsigned int lineNumber, out String condition, out boolean enabled, out unsigned int originalLineNumber); This method should report breakpointId if we have decided to address breakpoints using ids in other places, otherwise the API is inconsistent.
Yury Semikhatsky
Comment 6 2010-12-21 09:47:40 PST
Comment on attachment 77102 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=77102&action=review > WebCore/inspector/front-end/BreakpointManager.js:114 > + this._setNativeBreakpoint(breakpointId, breakpoint, enabled, restored); this method should be renamed
Pavel Podivilov
Comment 7 2010-12-21 09:50:23 PST
Pavel Podivilov
Comment 8 2010-12-21 09:52:07 PST
Pavel Podivilov
Comment 9 2010-12-21 09:54:06 PST
(In reply to comment #5) > (From update of attachment 77102 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=77102&action=review > > > WebCore/bindings/js/ScriptDebugServer.cpp:162 > > + intptr_t sourceIDValue = tokens[0].toIntPtr(); > > Please check for possible parse errors by passing &success flag into toIntPtr. > Done. > > WebCore/inspector/Inspector.idl:248 > > + [notify, domain=Debugger] void breakpointResolved(out String breakpointId, out String sourceID, out unsigned int lineNumber, out String condition, out boolean enabled, out unsigned int originalLineNumber); > > This method should report breakpointId if we have decided to address breakpoints using ids in other places, otherwise the API is inconsistent. We need to know in frontend scriptID and line where breakpoint was resolved by JS engine.
Yury Semikhatsky
Comment 10 2010-12-21 10:04:08 PST
Comment on attachment 77125 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=77125&action=review > WebCore/inspector/Inspector.idl:248 > + [notify, domain=Debugger] void breakpointResolved(out String breakpointId, out String sourceID, out unsigned int lineNumber, out String condition, out boolean enabled, out unsigned int originalLineNumber); no need to pass condition and enable parameters as FE already knows them
Pavel Podivilov
Comment 11 2010-12-22 05:13:59 PST
Pavel Podivilov
Comment 12 2010-12-22 05:20:35 PST
(In reply to comment #10) > (From update of attachment 77125 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=77125&action=review > > > WebCore/inspector/Inspector.idl:248 > > + [notify, domain=Debugger] void breakpointResolved(out String breakpointId, out String sourceID, out unsigned int lineNumber, out String condition, out boolean enabled, out unsigned int originalLineNumber); > > no need to pass condition and enable parameters as FE already knows them We have no guarantee this data would not change on frontend between call to InspectorBackend.setStickyBreakpoints() and the moment when breakpointResolved notification is dispatched on frontend. So we have to pass this data to frontend to be sure that it's up to date.
WebKit Review Bot
Comment 13 2010-12-22 05:27:01 PST
http://trac.webkit.org/changeset/74473 might have broken Leopard Intel Release (Build) and Leopard Intel Debug (Build)
Pavel Podivilov
Comment 14 2010-12-22 06:17:58 PST
Tony Gentilcore
Comment 15 2010-12-22 09:19:14 PST
I believe this is causing inspector/timeline-mark-timeline.html to crash on win debug. I'll add an expectation. http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=inspector%2Ftimeline-mark-timeline.html
Tony Gentilcore
Comment 16 2010-12-22 09:36:37 PST
(In reply to comment #15) > I believe this is causing inspector/timeline-mark-timeline.html to crash on win debug. I'll add an expectation. > > http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=inspector%2Ftimeline-mark-timeline.html Nevermind, just flaky.
Note You need to log in before you can comment on or make changes to this bug.