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

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

Issue 464963002: DevTools: Make UISourceCode Target-agnostic (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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/LiveEditSupport.js
diff --git a/Source/devtools/front_end/sdk/LiveEditSupport.js b/Source/devtools/front_end/sdk/LiveEditSupport.js
index 7aa493fa9b90d68f8009bc4d4f902183497f25b2..10392f1739dcc67ac79058b51060582f2ac6dc54 100644
--- a/Source/devtools/front_end/sdk/LiveEditSupport.js
+++ b/Source/devtools/front_end/sdk/LiveEditSupport.js
@@ -49,11 +49,13 @@ WebInspector.LiveEditSupport = function(target, workspace, debuggerWorkspaceBind
WebInspector.LiveEditSupport.prototype = {
/**
* @param {!WebInspector.UISourceCode} uiSourceCode
- * @return {!WebInspector.UISourceCode}
+ * @return {?WebInspector.UISourceCode}
*/
uiSourceCodeForLiveEdit: function(uiSourceCode)
{
var debuggerModelLocation = this._debuggerWorkspaceBinding.uiLocationToRawLocation(this.target(), uiSourceCode, 0, 0);
+ if (!debuggerModelLocation)
+ return null;
var uiLocation = this._debuggerWorkspaceBinding.rawLocationToUILocation(debuggerModelLocation);
// FIXME: Support live editing of scripts mapped to some file.

Powered by Google App Engine
This is Rietveld 408576698