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

Unified Diff: tracing/tracing/ui/base/ui_state.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
« no previous file with comments | « tracing/tracing/ui/base/ui.html ('k') | tracing/tracing/ui/base/ui_state_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/base/ui_state.html
diff --git a/tracing/tracing/ui/base/ui_state.html b/tracing/tracing/ui/base/ui_state.html
index 59eda29240022de8c555575a21efd81b309ed56d..6dfd95b845b8a4f52f9c76b5295278a8aaaa47a1 100644
--- a/tracing/tracing/ui/base/ui_state.html
+++ b/tracing/tracing/ui/base/ui_state.html
@@ -34,18 +34,19 @@ tr.exportTo('tr.ui.b', function() {
UIState.fromUserFriendlyString = function(model, viewport, stateString) {
var navByFinderPattern = /^(-?\d+(\.\d+)?)@(.+)x(\d+(\.\d+)?)$/g;
var match = navByFinderPattern.exec(stateString);
- if (!match)
- return;
+ if (!match) return;
var timestamp = parseFloat(match[1]);
var stableId = match[3];
var scaleX = parseFloat(match[4]);
- if (scaleX <= 0)
+ if (scaleX <= 0) {
throw new Error('Invalid ScaleX value in UI State string.');
+ }
- if (!viewport.containerToTrackMap.getTrackByStableId(stableId))
+ if (!viewport.containerToTrackMap.getTrackByStableId(stableId)) {
throw new Error('Invalid StableID given in UI State String.');
+ }
var loc = tr.model.Location.fromStableIdAndTimestamp(
viewport, stableId, timestamp);
« no previous file with comments | « tracing/tracing/ui/base/ui.html ('k') | tracing/tracing/ui/base/ui_state_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698