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

Unified Diff: Source/devtools/front_end/Script.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
Index: Source/devtools/front_end/Script.js
diff --git a/Source/devtools/front_end/Script.js b/Source/devtools/front_end/Script.js
index 0aba66624ca288314ff867fe64972bec3938ac52..0bd86cedc2fdcc2629964e83401b223702a21ab3 100644
--- a/Source/devtools/front_end/Script.js
+++ b/Source/devtools/front_end/Script.js
@@ -25,8 +25,9 @@
/**
* @constructor
- * @extends {WebInspector.Object}
+ * @extends {WebInspector.TargetAwareObject}
* @implements {WebInspector.ContentProvider}
+ * @param {!WebInspector.Target} target
* @param {string} scriptId
* @param {string} sourceURL
* @param {number} startLine
@@ -37,8 +38,9 @@
* @param {string=} sourceMapURL
* @param {boolean=} hasSourceURL
*/
-WebInspector.Script = function(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, isContentScript, sourceMapURL, hasSourceURL)
+WebInspector.Script = function(target, scriptId, sourceURL, startLine, startColumn, endLine, endColumn, isContentScript, sourceMapURL, hasSourceURL)
{
+ WebInspector.TargetAwareObject.call(this, target);
this.scriptId = scriptId;
this.sourceURL = sourceURL;
this.lineOffset = startLine;
@@ -225,7 +227,7 @@ WebInspector.Script.prototype = {
rawLocationToUILocation: function(lineNumber, columnNumber)
{
var uiLocation;
- var rawLocation = new WebInspector.DebuggerModel.Location(this.scriptId, lineNumber, columnNumber || 0);
+ var rawLocation = new WebInspector.DebuggerModel.Location(this.target(), this.scriptId, lineNumber, columnNumber || 0);
for (var i = this._sourceMappings.length - 1; !uiLocation && i >= 0; --i)
uiLocation = this._sourceMappings[i].rawLocationToUILocation(rawLocation);
console.assert(uiLocation, "Script raw location can not be mapped to any ui location.");
@@ -272,7 +274,7 @@ WebInspector.Script.prototype = {
return location;
},
- __proto__: WebInspector.Object.prototype
+ __proto__: WebInspector.TargetAwareObject.prototype
}
/**
« no previous file with comments | « Source/devtools/front_end/SASSSourceMapping.js ('k') | Source/devtools/front_end/ScriptFormatterEditorAction.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698