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

Unified Diff: Source/devtools/front_end/sdk/DefaultScriptMapping.js

Issue 352953002: DevTools: properly support targets in LiveEditSupport (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix test Created 6 years, 6 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/sdk/DefaultScriptMapping.js
diff --git a/Source/devtools/front_end/sdk/DefaultScriptMapping.js b/Source/devtools/front_end/sdk/DefaultScriptMapping.js
index 2a3839091b8bc5a013ecab87217f75413c1e74f1..43d8b9daeb1e085476b5b12a1e6dc6db7700f125 100644
--- a/Source/devtools/front_end/sdk/DefaultScriptMapping.js
+++ b/Source/devtools/front_end/sdk/DefaultScriptMapping.js
@@ -38,7 +38,7 @@ WebInspector.DefaultScriptMapping = function(debuggerModel, workspace)
{
this._debuggerModel = debuggerModel;
this._workspace = workspace;
- this._projectId = "debugger:" + debuggerModel.target().id();
+ this._projectId = WebInspector.DefaultScriptMapping.projectIdForTarget(debuggerModel.target());
this._projectDelegate = new WebInspector.DebuggerProjectDelegate(this._workspace, this._projectId, WebInspector.projectTypes.Debugger);
debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.GlobalObjectCleared, this._debuggerReset, this);
this._debuggerReset();
@@ -123,6 +123,15 @@ WebInspector.DefaultScriptMapping.prototype = {
}
/**
+ * @param {!WebInspector.Target} target
+ * @return {string}
+ */
+WebInspector.DefaultScriptMapping.projectIdForTarget = function(target)
+{
+ return "debugger:" + target.id();
+}
+
+/**
* @constructor
* @param {!WebInspector.Workspace} workspace
* @param {string} id
« no previous file with comments | « Source/devtools/front_end/sdk/DebuggerScriptMapping.js ('k') | Source/devtools/front_end/sdk/LiveEditSupport.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698