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

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

Issue 2562453003: [DevTools] Remove Common.Event.target field. (Closed)
Patch Set: works Created 4 years 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/sources/WatchExpressionsSidebarPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
index fd346033580c18eb6a0cd6ded0b9991a8bafb5d2..0ef1d30f1e9be8a613707668f0add09a33539fe6 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
@@ -116,7 +116,7 @@ Sources.WatchExpressionsSidebarPane = class extends UI.ThrottledWidget {
this._emptyElement.classList.add('hidden');
var watchExpression = new Sources.WatchExpression(expression, this._expandController, this._linkifier);
watchExpression.addEventListener(
- Sources.WatchExpression.Events.ExpressionUpdated, this._watchExpressionUpdated.bind(this));
+ Sources.WatchExpression.Events.ExpressionUpdated, this._watchExpressionUpdated, this);
this._bodyElement.appendChild(watchExpression.element());
this._watchExpressions.push(watchExpression);
return watchExpression;
@@ -126,7 +126,7 @@ Sources.WatchExpressionsSidebarPane = class extends UI.ThrottledWidget {
* @param {!Common.Event} event
*/
_watchExpressionUpdated(event) {
- var watchExpression = /** @type {!Sources.WatchExpression} */ (event.target);
+ var watchExpression = /** @type {!Sources.WatchExpression} */ (event.data);
if (!watchExpression.expression()) {
this._watchExpressions.remove(watchExpression);
this._bodyElement.removeChild(watchExpression.element());
@@ -304,7 +304,7 @@ Sources.WatchExpression = class extends Common.Object {
this._expandController.stopWatchSectionsWithId(this._expression);
this._expression = newExpression;
this.update();
- this.dispatchEventToListeners(Sources.WatchExpression.Events.ExpressionUpdated);
+ this.dispatchEventToListeners(Sources.WatchExpression.Events.ExpressionUpdated, this);
}
/**

Powered by Google App Engine
This is Rietveld 408576698