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

Unified Diff: tracing/tracing/ui/analysis/stacked_pane_view.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: rebase Created 3 years, 9 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: tracing/tracing/ui/analysis/stacked_pane_view.html
diff --git a/tracing/tracing/ui/analysis/stacked_pane_view.html b/tracing/tracing/ui/analysis/stacked_pane_view.html
index fe0ebf9bd90b04cc467450d653876266273cebfa..5987ac69e51b50d3d786b307348ab35bb78dbd43 100644
--- a/tracing/tracing/ui/analysis/stacked_pane_view.html
+++ b/tracing/tracing/ui/analysis/stacked_pane_view.html
@@ -110,10 +110,12 @@ Polymer({
// If the parent pane is provided, it must be an HTML element and a child
// of the pane container.
if (opt_parentPane) {
- if (!(opt_parentPane instanceof HTMLElement))
+ if (!(opt_parentPane instanceof HTMLElement)) {
throw new Error('Parent pane must be an HTML element');
- if (opt_parentPane.parentElement !== paneContainer)
+ }
+ if (opt_parentPane.parentElement !== paneContainer) {
throw new Error('Parent pane must be a child of the pane container');
+ }
}
// Remove all descendants of the parent pane (or all panes if no parent
@@ -122,29 +124,30 @@ Polymer({
Polymer.dom(paneContainer).lastElementChild !== opt_parentPane) {
var removedPane = Polymer.dom(this.$.pane_container).lastElementChild;
var listener = this.listeners_.get(removedPane);
- if (listener === undefined)
+ if (listener === undefined) {
throw new Error('No listener associated with pane');
+ }
this.listeners_.delete(removedPane);
removedPane.removeEventListener(
'request-child-pane-change', listener);
Polymer.dom(paneContainer).removeChild(removedPane);
}
- if (opt_parentPane && opt_parentPane.parentElement !== paneContainer)
+ if (opt_parentPane && opt_parentPane.parentElement !== paneContainer) {
throw new Error('Parent pane was removed from the pane container');
+ }
// This check is performed here (and not at the beginning of the method)
// because undefined pane builder means that the parent pane requested
// having no child pane (e.g. when selection is cleared).
- if (!paneBuilder)
- return;
+ if (!paneBuilder) return;
var pane = paneBuilder();
- if (!pane)
- return;
+ if (!pane) return;
- if (!(pane instanceof HTMLElement))
+ if (!(pane instanceof HTMLElement)) {
throw new Error('Pane must be an HTML element');
+ }
// Listen for child pane change requests from the newly added pane.
var listener = function(event) {

Powered by Google App Engine
This is Rietveld 408576698