Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1483)

Unified Diff: Source/devtools/front_end/ScriptFormatterEditorAction.js

Issue 220903002: DevTools: wrap DebuggerAgent.Location with DebuggerModel.Location. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: All tests!!! Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/Script.js ('k') | Source/devtools/front_end/SourcesPanel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ScriptFormatterEditorAction.js
diff --git a/Source/devtools/front_end/ScriptFormatterEditorAction.js b/Source/devtools/front_end/ScriptFormatterEditorAction.js
index 3f885e7b45a3736553ab4bc78420525fd58ed6c0..0eb81d8f513dca04064e680670c9a912332b4a67 100644
--- a/Source/devtools/front_end/ScriptFormatterEditorAction.js
+++ b/Source/devtools/front_end/ScriptFormatterEditorAction.js
@@ -29,7 +29,7 @@ WebInspector.FormatterScriptMapping.prototype = {
rawLocationToUILocation: function(rawLocation)
{
var debuggerModelLocation = /** @type {!WebInspector.DebuggerModel.Location} */ (rawLocation);
- var script = this._debuggerModel.scriptForId(debuggerModelLocation.scriptId);
+ var script = debuggerModelLocation.script();
var uiSourceCode = this._uiSourceCodes.get(script);
if (!uiSourceCode)
return null;
@@ -85,8 +85,8 @@ WebInspector.FormatterScriptMapping.prototype = {
if (uiSourceCode.contentType() === WebInspector.resourceTypes.Document)
return this._debuggerModel.scriptsForSourceURL(uiSourceCode.url).filter(isInlineScript);
if (uiSourceCode.contentType() === WebInspector.resourceTypes.Script) {
- var rawLocation = uiSourceCode.uiLocationToRawLocation(0, 0);
- return rawLocation ? [this._debuggerModel.scriptForId(rawLocation.scriptId)] : [];
+ var rawLocation = /** @type {!WebInspector.DebuggerModel.Location} */ (uiSourceCode.uiLocationToRawLocation(0, 0));
+ return rawLocation ? [rawLocation.script()] : [];
}
return [];
},
« no previous file with comments | « Source/devtools/front_end/Script.js ('k') | Source/devtools/front_end/SourcesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698