Chromium Code Reviews| 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) |