WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 48434
Web Inspector: persist JavaScript breakpoints in frontend settings
https://bugs.webkit.org/show_bug.cgi?id=48434
Summary
Web Inspector: persist JavaScript breakpoints in frontend settings
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
Details
Formatted Diff
Diff
Patch.
(16.96 KB, patch)
2010-10-28 04:42 PDT
,
Pavel Podivilov
no flags
Details
Formatted Diff
Diff
Patch.
(64.44 KB, patch)
2010-12-21 04:54 PST
,
Pavel Podivilov
yurys
: review-
Details
Formatted Diff
Diff
Patch.
(64.49 KB, patch)
2010-12-21 09:50 PST
,
Pavel Podivilov
no flags
Details
Formatted Diff
Diff
Patch.
(64.49 KB, patch)
2010-12-21 09:52 PST
,
Pavel Podivilov
yurys
: review+
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Pavel Podivilov
Comment 1
2010-10-27 09:01:16 PDT
Created
attachment 72042
[details]
Patch.
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
Created
attachment 77102
[details]
Patch.
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
Created
attachment 77124
[details]
Patch.
Pavel Podivilov
Comment 8
2010-12-21 09:52:07 PST
Created
attachment 77125
[details]
Patch.
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
Committed
r74473
: <
http://trac.webkit.org/changeset/74473
>
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
Committed
r74477
: <
http://trac.webkit.org/changeset/74477
>
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.
Top of Page
Format For Printing
XML
Clone This Bug