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

Unified Diff: Source/devtools/front_end/Linkifier.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/JavaScriptSourceFrame.js ('k') | Source/devtools/front_end/LiveEditSupport.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/Linkifier.js
diff --git a/Source/devtools/front_end/Linkifier.js b/Source/devtools/front_end/Linkifier.js
index 2840b6158941a0d9a6e19f28039e77db6e4e2463..8c00c1e4c5cb4a670f567402c2b75bd44cb22c4e 100644
--- a/Source/devtools/front_end/Linkifier.js
+++ b/Source/devtools/front_end/Linkifier.js
@@ -131,11 +131,12 @@ WebInspector.Linkifier.prototype = {
*/
linkifyRawLocation: function(rawLocation, classes)
{
- var script = WebInspector.debuggerModel.scriptForId(rawLocation.scriptId);
+ // FIXME: this check should not be here.
+ var script = rawLocation.target().debuggerModel.scriptForId(rawLocation.scriptId);
if (!script)
return null;
var anchor = this._createAnchor(classes);
- var liveLocation = script.createLiveLocation(rawLocation, this._updateAnchor.bind(this, anchor));
+ var liveLocation = rawLocation.createLiveLocation(this._updateAnchor.bind(this, anchor));
this._liveLocations.push(liveLocation);
return anchor;
},
@@ -149,7 +150,7 @@ WebInspector.Linkifier.prototype = {
linkifyCSSLocation: function(styleSheetId, rawLocation, classes)
{
var anchor = this._createAnchor(classes);
- var liveLocation = WebInspector.cssModel.createLiveLocation(styleSheetId, rawLocation, this._updateAnchor.bind(this, anchor));
+ var liveLocation = rawLocation.createLiveLocation(styleSheetId, this._updateAnchor.bind(this, anchor));
if (!liveLocation)
return null;
this._liveLocations.push(liveLocation);
« no previous file with comments | « Source/devtools/front_end/JavaScriptSourceFrame.js ('k') | Source/devtools/front_end/LiveEditSupport.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698