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

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

Issue 1192813002: DevTools: do no throw exception in "add watch" context menu item (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f3575be0855ae3538c4c60ab8acd2ec3a4ad9df9..581d01f5f2e924e51870f33b4977cdd79432582f 100644
--- a/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
+++ b/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
@@ -107,11 +107,12 @@ WebInspector.WatchExpressionsSidebarPane.prototype = {
},
/**
- * @param {!WebInspector.Event} event
+ * @param {!WebInspector.Event=} event
*/
_addButtonClicked: function(event)
{
- event.consume(true);
+ if (event)
+ event.consume(true);
this.expand();
this._createWatchExpression(null).startEditing();
},
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698