Bug 68997

Summary: Web Inspector: update call frame location when source mapping is changed.
Product: WebKit Reporter: Pavel Podivilov <podivilov>
Component: Web Inspector (Deprecated)Assignee: Pavel Podivilov <podivilov>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch pfeldman: review+

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>