Bug 50017 - Web Inspector: set DOM breakpoints by path
Summary: Web Inspector: set DOM breakpoints by path
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: 50084
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-24 04:51 PST by Pavel Podivilov
Modified: 2010-11-25 08:11 PST (History)
10 users (show)

See Also:


Attachments
Patch. (22.44 KB, patch)
2010-11-24 04:52 PST, Pavel Podivilov
yurys: 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 2010-11-24 04:51:34 PST
Web Inspector: set DOM breakpoints by path
Comment 1 Pavel Podivilov 2010-11-24 04:52:17 PST
Created attachment 74748 [details]
Patch.
Comment 2 Pavel Podivilov 2010-11-24 05:19:55 PST
Currently, restoring breakpoint requires additional round-trip to convert path to nodeId. As a result, breakpoint won't hit on early event after page reload.
Comment 3 Yury Semikhatsky 2010-11-24 07:22:32 PST
Comment on attachment 74748 [details]
Patch.

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

> WebCore/ChangeLog:5
> +        Web Inspector: set DOM breakpoints by path

Please provide more detailed description on the purpose of this change.

> WebCore/inspector/InspectorDOMAgent.cpp:787
> +    m_idToBreakpoint.set(breakpointId, breakpoint);

I'd still rather use some compound id string instead of this two way mapping or even better use dedicated methods for set/remove/hit breakpoint for different breakpoint types. It may be more code but the design will be clearer than these mappings from surrogate ids to breakpoints and back.

> WebCore/inspector/front-end/BreakpointManager.js:475
> +        if (this._nodeId) {

Prefer early return.
Comment 4 Pavel Podivilov 2010-11-25 05:57:12 PST
Committed r72727: <http://trac.webkit.org/changeset/72727>