Web Inspector: fix breakpoints positions in formatted scripts. Add async requestMapping method to SourceFile interface as required for populating breakpoints sidebar pane when in "format all scripts" mode.
Created attachment 86629 [details] Patch.
Comment on attachment 86629 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=86629&action=review > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:276 > + function loadSnippet(callback) Can you turn it into a method on the PresentationBreakpoint? We don't usually set closures as object methods. > Source/WebCore/inspector/front-end/SourceFile.js:65 > + requestMapping: function(callback) It's not clear from the method name what kind of mapping is requested, consider renaming it to requestPosistionMapping or requestSourceMapping. Also why is this a request and not a synchronous getter? > Source/WebCore/inspector/front-end/SourceFile.js:190 > + this._scripts = scripts; You lean on the fact that the scripts are sorted, can you use a name reflecting this?
Committed r82103: <http://trac.webkit.org/changeset/82103>
(In reply to comment #2) > (From update of attachment 86629 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=86629&action=review > > > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:276 > > + function loadSnippet(callback) > > Can you turn it into a method on the PresentationBreakpoint? We don't usually set closures as object methods. Done. > > > Source/WebCore/inspector/front-end/SourceFile.js:65 > > + requestMapping: function(callback) > > It's not clear from the method name what kind of mapping is requested, consider renaming it to requestPosistionMapping or requestSourceMapping. Done. > > Also why is this a request and not a synchronous getter? When we are in formatted scripts mode, we need to format the script to obtain source mapping which is done asynchronously. > > > Source/WebCore/inspector/front-end/SourceFile.js:190 > > + this._scripts = scripts; > > You lean on the fact that the scripts are sorted, can you use a name reflecting this? Done.