RESOLVED FIXED 47253
Web Inspector: highlight XHR breakpoint when hit
https://bugs.webkit.org/show_bug.cgi?id=47253
Summary Web Inspector: highlight XHR breakpoint when hit
Pavel Podivilov
Reported 2010-10-06 03:42:28 PDT
Web Inspector: highlight XHR breakpoint when hit
Attachments
Screenshot. (167.57 KB, image/png)
2010-10-06 03:42 PDT, Pavel Podivilov
no flags
Patch. (18.88 KB, patch)
2010-10-06 03:51 PDT, Pavel Podivilov
pfeldman: review+
Pavel Podivilov
Comment 1 2010-10-06 03:42:50 PDT
Created attachment 69916 [details] Screenshot.
Pavel Podivilov
Comment 2 2010-10-06 03:51:59 PDT
Pavel Feldman
Comment 3 2010-10-06 13:49:07 PDT
Comment on attachment 69918 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=69918&action=review > WebCore/ChangeLog:5 > + Web Inspector: highlight XHR breakpoint when hit Nit: We usually end titles with "." punctuation. > WebCore/inspector/InspectorController.cpp:1716 > +unsigned int InspectorController::findEventListenerBreakpoint(const String& eventName) I understand that it will linear wrt number of breakpoints set, but still linear search from within instrumentation does not sound right. It might be worth reversing the map. > WebCore/inspector/front-end/BreakpointManager.js:204 > + breakpoint._locked = true; _locked -> _beingAdded or _editing > WebCore/inspector/front-end/BreakpointManager.js:207 > + function didSetNativeBreakpoint(backendBreakpointId) We usually put callback function above the call. > WebCore/inspector/front-end/BreakpointManager.js:232 > + breakpoint.dispatchEventToListeners("hit"); Should we combine the two events into "hit-state-changed"? > WebCore/inspector/front-end/BreakpointManager.js:337 > + return this._manager.nativeBreakpointEnabled(this); This sounds strange: breakpoint asks manager, passes itself -> then manager tests breakpoint against one of the properties. Given that both are in the same file and can access private memeber of each other, I'd suggest to shortcut it as "_breakpointId" in this. > WebCore/inspector/front-end/BreakpointManager.js:342 > + this._manager.setNativeBreakpointEnabled(this, enabled); could be private > WebCore/inspector/front-end/BreakpointManager.js:347 > + this._manager.removeNativeBreakpoint(this); ditto
Pavel Feldman
Comment 4 2010-10-06 13:50:19 PDT
Comment on attachment 69918 [details] Patch. r+ given that comments are addressed.
Joseph Pecoraro
Comment 5 2010-10-06 13:57:09 PDT
> > WebCore/ChangeLog:5 > > + Web Inspector: highlight XHR breakpoint when hit > > Nit: We usually end titles with "." punctuation. Wow, I never noticed that. Out of 241 "Web Inspector:" changelog entires in WebCore/ChangeLog, 112 of them end with a period. I didn't go further to see if that was a recent trend or not.
Pavel Feldman
Comment 6 2010-10-06 14:04:51 PDT
(In reply to comment #5) > > > WebCore/ChangeLog:5 > > > + Web Inspector: highlight XHR breakpoint when hit > > > > Nit: We usually end titles with "." punctuation. > > Wow, I never noticed that. Out of 241 "Web Inspector:" changelog entires in > WebCore/ChangeLog, 112 of them end with a period. I didn't go further to > see if that was a recent trend or not. Most likely these 112 are mine :P
Pavel Podivilov
Comment 7 2010-10-07 05:43:33 PDT
Note You need to log in before you can comment on or make changes to this bug.