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

Unified Diff: Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js

Issue 341803002: DevTools: Support properly multiple targets in sources panel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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: Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
diff --git a/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js b/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
index 0f9bd6125fc360ae42daf71db33badbbd39ba106..68bf9027e1f2d0d4dd1a8afc22322d6e389cf5e0 100644
--- a/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
+++ b/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
@@ -52,6 +52,7 @@ WebInspector.WatchExpressionsSidebarPane = function()
addButton.title = WebInspector.UIString("Add watch expression");
this._requiresUpdate = true;
+ WebInspector.executionContextSelector.addExecutionContextChangeListener(this.refreshExpressions, this);
}
WebInspector.WatchExpressionsSidebarPane.prototype = {
@@ -60,11 +61,6 @@ WebInspector.WatchExpressionsSidebarPane.prototype = {
this._refreshExpressionsIfNeeded();
},
- reset: function()
- {
- this.refreshExpressions();
- },
-
refreshExpressions: function()
{
this._requiresUpdate = true;
@@ -203,7 +199,7 @@ WebInspector.WatchExpressionsSection.prototype = {
// Now process all the expressions, since we have the actual count,
// which is checked in the appendResult inner function.
- var currentExecutionContext = WebInspector.context.flavor(WebInspector.ExecutionContext);
+ var currentExecutionContext = WebInspector.executionContextSelector.currentExecutionContext();
if (currentExecutionContext) {
for (var i = 0; i < this.watchExpressions.length; ++i) {
var expression = this.watchExpressions[i];

Powered by Google App Engine
This is Rietveld 408576698