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

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

Issue 2122353002: [DevTools] Make resource tree model optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments Created 4 years, 4 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 de1ceda9ada0601dab31484c5a3a3162797ee512..8073bead6351b1c6aa60d160cfd4e4749698734d 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleContextSelector.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleContextSelector.js
@@ -34,7 +34,8 @@ WebInspector.ConsoleContextSelector.prototype = {
var result;
if (executionContext.isDefault) {
if (executionContext.frameId) {
- var frame = executionContext.target().resourceTreeModel.frameForId(executionContext.frameId);
+ var resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(executionContext.target());
+ var frame = resourceTreeModel && resourceTreeModel.frameForId(executionContext.frameId);
result = frame ? frame.displayName() : executionContext.label();
} else {
result = executionContext.target().decorateLabel(executionContext.label());

Powered by Google App Engine
This is Rietveld 408576698