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

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

Issue 2573323002: Revert of [DevTools] Remove methods on Common.Event. (Closed)
Patch Set: 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/SourcesPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
index fc305dd5e414cc5e5ea9690f1f5b449b288b1b78..9e93907ca897da2769d689a34b5c421b7b76b92b 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
@@ -595,15 +595,16 @@
}
/**
- * @param {!Common.Event} event
- */
- _longResume(event) {
+ * @return {boolean}
+ */
+ _longResume() {
var debuggerModel = this._prepareToResume();
if (!debuggerModel)
- return;
+ return true;
debuggerModel.skipAllPausesUntilReloadOrTimeout(500);
debuggerModel.resume();
+ return true;
}
/**
@@ -680,7 +681,7 @@
var longResumeButton =
new UI.ToolbarButton(Common.UIString('Resume with all pauses blocked for 500 ms'), 'largeicon-play');
- longResumeButton.addEventListener(UI.ToolbarButton.Events.Click, this._longResume, this);
+ longResumeButton.addEventListener('click', this._longResume.bind(this), this);
debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._togglePauseAction, [longResumeButton], []));
debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepOverAction));
@@ -690,7 +691,7 @@
debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._toggleBreakpointsActiveAction));
this._pauseOnExceptionButton = new UI.ToolbarToggle('', 'largeicon-pause-on-exceptions');
- this._pauseOnExceptionButton.addEventListener(UI.ToolbarButton.Events.Click, this._togglePauseOnExceptions, this);
+ this._pauseOnExceptionButton.addEventListener('click', this._togglePauseOnExceptions, this);
debugToolbar.appendToolbarItem(this._pauseOnExceptionButton);
debugToolbar.appendSeparator();

Powered by Google App Engine
This is Rietveld 408576698