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

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: Rebased 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/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 e9fc42f18cbeff48b8ee9ad1efff0e47d21beb67..614e361943b992582224c76131f9ba12f231a86a 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());
pfeldman 2016/07/07 17:44:14 What we want here is a friendly executionContext n
eostroukhov-old 2016/07/13 23:30:59 Not sure if such a fix is in scope for this refact
+ 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