Bug 68997 - Web Inspector: update call frame location when source mapping is changed.
Summary: Web Inspector: update call frame location when source mapping is changed.
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:
Blocks:
 
Reported: 2011-09-28 05:52 PDT by Pavel Podivilov
Modified: 2011-10-04 06:42 PDT (History)
10 users (show)

See Also:


Attachments
Patch (16.49 KB, patch)
2011-09-28 05:53 PDT, Pavel Podivilov
no flags Details | Formatted Diff | Diff
Patch (16.56 KB, patch)
2011-09-29 00:35 PDT, Pavel Podivilov
pfeldman: 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 2011-09-28 05:52:24 PDT
Web Inspector: update call frame location when source mapping is changed.

Currently we use fake "debugger-paused" event hack to update execution line and call stack placards when source mapping is changed.
- add PresentationCallFrame.createPlacard method to create "live" placards that are updated on source mapping changes. This works like DebuggerPresentationModel.linkifyLocation.
- fire execution-line-changed event when selected call frame or source mapping is changed.
Comment 1 Pavel Podivilov 2011-09-28 05:53:45 PDT
Created attachment 109009 [details]
Patch
Comment 2 Pavel Feldman 2011-09-28 22:42:13 PDT
Comment on attachment 109009 [details]
Patch

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

> Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:378
> +            this._executionRawSourceCode.removeEventListener(WebInspector.RawSourceCode.Events.SourceMappingUpdated, this._dispatchExecutionLineChanged, this);

I don't think the concept of the executionRawSourceCode should exist. Execution line for us is the line of the call frame, the one from the UI.

> Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:-445
> -    get isInternalScript()

You should mention this change in the ChangeLog

> Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:509
> +        this._rawSourceCode.addEventListener(WebInspector.RawSourceCode.Events.SourceMappingUpdated, updatePlacard, this);

Why aren't we using linkifyLocation here?
Comment 3 Pavel Podivilov 2011-09-29 00:34:11 PDT
(In reply to comment #2)
> (From update of attachment 109009 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=109009&action=review
> 
> > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:378
> > +            this._executionRawSourceCode.removeEventListener(WebInspector.RawSourceCode.Events.SourceMappingUpdated, this._dispatchExecutionLineChanged, this);
> 
> I don't think the concept of the executionRawSourceCode should exist. Execution line for us is the line of the call frame, the one from the UI.

Done.

> 
> > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:-445
> > -    get isInternalScript()
> 
> You should mention this change in the ChangeLog

Done.

> 
> > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:509
> > +        this._rawSourceCode.addEventListener(WebInspector.RawSourceCode.Events.SourceMappingUpdated, updatePlacard, this);
> 
> Why aren't we using linkifyLocation here?

linkifyLocation creates anchors, not placards. How can we use it here?
Comment 4 Pavel Podivilov 2011-09-29 00:35:05 PDT
Created attachment 109131 [details]
Patch
Comment 5 Pavel Podivilov 2011-10-04 06:42:59 PDT
Committed r96588: <http://trac.webkit.org/changeset/96588>