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

Unified Diff: third_party/WebKit/Source/devtools/front_end/components/ExecutionContextSelector.js

Issue 2137773002: [DevTools] Replace the target type with capabilities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [DevTools] Replace target type with capabilities Created 4 years, 5 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/components/ExecutionContextSelector.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/ExecutionContextSelector.js b/third_party/WebKit/Source/devtools/front_end/components/ExecutionContextSelector.js
index 442321322d2a0efb5c1c9d7d100a069045bed320..da4d56b68186b5eb9e864ed27016c273798da00b 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/ExecutionContextSelector.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/ExecutionContextSelector.js
@@ -28,7 +28,7 @@ WebInspector.ExecutionContextSelector.prototype = {
*/
targetAdded: function(target)
{
- if (!target.hasJSContext())
+ if (!target.hasJSDomains())
return;
// Defer selecting default target since we need all clients to get their
// targetAdded notifications first.
@@ -51,7 +51,7 @@ WebInspector.ExecutionContextSelector.prototype = {
*/
targetRemoved: function(target)
{
- if (!target.hasJSContext())
+ if (!target.hasJSDomains())
return;
var currentExecutionContext = this._context.flavor(WebInspector.ExecutionContext);
if (currentExecutionContext && currentExecutionContext.target() === target)
@@ -168,7 +168,7 @@ WebInspector.ExecutionContextSelector.prototype = {
var targets = this._targetManager.targetsWithJSContext();
var newContext = null;
for (var i = 0; i < targets.length && !newContext; ++i) {
- if (targets[i].isServiceWorker())
+ if (!targets[i].hasJSDomains())
continue;
var executionContexts = targets[i].runtimeModel.executionContexts();
for (var executionContext of executionContexts) {

Powered by Google App Engine
This is Rietveld 408576698