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

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

Issue 2109813003: [DevTools] No NetworkManager and NetworkLog for v8only mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed review comments Created 4 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: 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 f79d7fb37c061e8f5b376b01133469b184d6918c..3644850f680ccf6fad66109f6325af512d707805 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/Target.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/Target.js
@@ -34,7 +34,8 @@ WebInspector.Target = function(targetManager, name, type, connection, parentTarg
WebInspector.Target.Type = {
Page: 1,
DedicatedWorker: 2,
- ServiceWorker: 4
+ ServiceWorker: 4,
+ JSInspector: 8
}
WebInspector.Target._nextId = 1;
@@ -106,7 +107,7 @@ WebInspector.Target.prototype = {
*/
isWorker: function()
{
- return this.isDedicatedWorker() || this.isServiceWorker();
+ return this.isDedicatedWorker() || this.isServiceWorker() || this.isJSInspector();
},
/**
@@ -128,12 +129,28 @@ WebInspector.Target.prototype = {
/**
* @return {boolean}
*/
+ isJSInspector: function()
+ {
+ return this._type === WebInspector.Target.Type.JSInspector;
+ },
+
+ /**
+ * @return {boolean}
+ */
hasJSContext: function()
{
return !this.isServiceWorker();
},
/**
+ * @return {boolean}
+ */
+ supportsWorkers: function()
+ {
+ return !this.isDedicatedWorker() && !this.isJSInspector();
dgozman 2016/06/30 17:24:33 Let's whitelist instead of blacklisting.
eostroukhov-old 2016/06/30 21:38:28 Done.
+ },
+
+ /**
* @return {?WebInspector.Target}
*/
parentTarget: function()
@@ -150,7 +167,6 @@ WebInspector.Target.prototype = {
_dispose: function()
{
this._targetManager.dispatchEventToListeners(WebInspector.TargetManager.Events.TargetDisposed, this);
- this.networkManager.dispose();
this.cpuProfilerModel.dispose();
WebInspector.ServiceWorkerCacheModel.fromTarget(this).dispose();
if (this.workerManager)

Powered by Google App Engine
This is Rietveld 408576698