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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/Target.js

Issue 2422803002: DevTools: prefix node.js scripts's sourceURL with "file://" to make them a valid url (Closed)
Patch Set: WI.ParsedURL.platformPathToURL Created 4 years, 2 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: third_party/WebKit/Source/devtools/front_end/sdk/Target.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/Target.js b/third_party/WebKit/Source/devtools/front_end/sdk/Target.js
index 9db628e49136a7a5e1fbb3140544054ca2045cc8..82f9ee07038be1424c800846418a946a9eba8b53 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/Target.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/Target.js
@@ -45,6 +45,20 @@ WebInspector.Target._nextId = 1;
WebInspector.Target.prototype = {
/**
+ * @return {boolean}
+ */
+ isNodeJS: function()
+ {
+ // TODO(lushnikov): this is an unreliable way to detect Node.js targets.
+ return this._capabilitiesMask === WebInspector.Target.Capability.JS || this._isNodeJSForTest;
+ },
+
+ setIsNodeJSForTest: function()
+ {
+ this._isNodeJSForTest = true;
+ },
+
+ /**
* @return {number}
*/
id: function()

Powered by Google App Engine
This is Rietveld 408576698