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 66224
Web Inspector: extract breakpoint management code to a helper class and add tests.
https://bugs.webkit.org/show_bug.cgi?id=66224
Summary
Web Inspector: extract breakpoint management code to a helper class and add t...
Pavel Podivilov
Reported
2011-08-15 07:34:11 PDT
Web Inspector: extract breakpoint management code to a helper class and add tests. Our breakpoint management code is quite complex, why don't we move it to a separate class and add a set of unit tests for it? The next step would be to dispatch breakpoint events on uiSourceCode objects directly and thus completely decouple breakpoint management code from the rest of presentation model's code.
Attachments
Patch
(28.77 KB, patch)
2011-08-15 07:35 PDT
,
Pavel Podivilov
no flags
Details
Formatted Diff
Diff
Patch
(29.88 KB, patch)
2011-08-16 05:23 PDT
,
Pavel Podivilov
no flags
Details
Formatted Diff
Diff
Patch
(33.67 KB, patch)
2011-08-18 04:50 PDT
,
Pavel Podivilov
pfeldman
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Pavel Podivilov
Comment 1
2011-08-15 07:35:45 PDT
Created
attachment 103912
[details]
Patch
Pavel Podivilov
Comment 2
2011-08-15 07:41:09 PDT
For actually switching to BreakpointHelper in DebuggerPresentationModel see
https://bugs.webkit.org/show_bug.cgi?id=66225
.
Pavel Podivilov
Comment 3
2011-08-16 05:23:36 PDT
Created
attachment 104028
[details]
Patch
Pavel Podivilov
Comment 4
2011-08-16 05:24:21 PDT
(In reply to
comment #3
)
> Created an attachment (id=104028) [details] > Patch
Split BreakpointHelper into 3 classes and cleanup the code.
Pavel Feldman
Comment 5
2011-08-18 01:56:58 PDT
Comment on
attachment 104028
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=104028&action=review
> Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:705 > +WebInspector.BreakpointHelper = function(debuggerModel, breakpoints, breakpointAddedDelegate, breakpointRemovedDelegate)
Class with two inner classes deserves to be defined in a separate file.
> Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:720 > + registerUISourceCode: function(uiSourceCodeId, rawSourceCode, persistent)
Can we pass real instance here? Also, remove <persist>. This could be called uiSourceCodeAdded
> Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:722 > + this._uiSourceCodeInfo[uiSourceCodeId] = { rawSourceCode: rawSourceCode, persistent: persistent };
This mapping should be bi-directional, should be defined in the RawSourceCode <-> UISourceCode terms.
> Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:745 > + this._uiBreakpoints.addBreakpoint(breakpoint);
Either pass all the parameters into addBreakpoint or define a class for a breakpoint.
Pavel Podivilov
Comment 6
2011-08-18 04:50:13 PDT
Created
attachment 104324
[details]
Patch
Pavel Feldman
Comment 7
2011-08-18 07:45:16 PDT
Comment on
attachment 104324
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=104324&action=review
> Source/WebCore/inspector/front-end/BreakpointManager.js:31 > +WebInspector.BreakpointManager = function(debuggerModel, breakpoints, breakpointAddedDelegate, breakpointRemovedDelegate)
Please remove the breakpoints parameter and replace it with the "setBreakpointsForTest" method.
Pavel Podivilov
Comment 8
2011-08-19 08:50:49 PDT
Committed
r93415
: <
http://trac.webkit.org/changeset/93415
>
Ryosuke Niwa
Comment 9
2011-08-19 20:44:18 PDT
The test added by this patch (inspector/debugger/breakpoint-manager.html) is failing everywhere:
http://build.webkit.org/results/Windows%20XP%20Debug%20(Tests)/r93465%20(31415)/inspector/debugger/breakpoint-manager-pretty-diff.html
http://build.webkit.org/results/Qt%20Linux%20Release/r93416%20(36643)/inspector/debugger/breakpoint-manager-pretty-diff.html
http://build.webkit.org/results/SnowLeopard%20Intel%20Debug%20(Tests)/r93461%20(1777)/inspector/debugger/breakpoint-manager-pretty-diff.html
I don't even know on which platform this test passes.
Pavel Feldman
Comment 10
2011-08-19 23:31:03 PDT
> I don't even know on which platform this test passes.
I'm rolling it now, sorry for trouble.
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