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

Unified Diff: third_party/WebKit/Source/devtools/front_end/console/ConsoleContextSelector.js

Issue 2782773002: [DevTools] Remove SDKModels' fromTarget methods (Closed)
Patch Set: addressed review comments Created 3 years, 9 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/console/ConsoleContextSelector.js
diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsoleContextSelector.js b/third_party/WebKit/Source/devtools/front_end/console/ConsoleContextSelector.js
index 49c62adc6f2204eaf5a05111a01d4c3264bd10af..70494e5acedb5330ce3145addb85873f57e7e752 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleContextSelector.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleContextSelector.js
@@ -39,7 +39,7 @@ Console.ConsoleContextSelector = class {
if (!executionContext.isDefault)
depth++;
if (executionContext.frameId) {
- var resourceTreeModel = SDK.ResourceTreeModel.fromTarget(target);
+ var resourceTreeModel = target.model(SDK.ResourceTreeModel);
var frame = resourceTreeModel && resourceTreeModel.frameForId(executionContext.frameId);
if (frame) {
label = label || frame.displayName();
@@ -170,7 +170,7 @@ Console.ConsoleContextSelector = class {
_isTopContext(executionContext) {
if (!executionContext || !executionContext.isDefault)
return false;
- var resourceTreeModel = SDK.ResourceTreeModel.fromTarget(executionContext.target());
+ var resourceTreeModel = executionContext.target().model(SDK.ResourceTreeModel);
var frame = executionContext.frameId && resourceTreeModel && resourceTreeModel.frameForId(executionContext.frameId);
if (!frame)
return false;

Powered by Google App Engine
This is Rietveld 408576698