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

Unified Diff: tracing/tracing/importer/import.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/importer/find_startup_expectations.html ('k') | tracing/tracing/importer/importer.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/importer/import.html
diff --git a/tracing/tracing/importer/import.html b/tracing/tracing/importer/import.html
index ac54195fadadb6d1429a8d1d92acf46aecc814f3..22e627dbdbb691789760019960db6b438c8b8a5e 100644
--- a/tracing/tracing/importer/import.html
+++ b/tracing/tracing/importer/import.html
@@ -36,8 +36,9 @@ tr.exportTo('tr.importer', function() {
}
function Import(model, opt_options) {
- if (model === undefined)
+ if (model === undefined) {
throw new Error('Must provide model to import into.');
+ }
// TODO(dsinclair): Check the model is empty.
@@ -80,8 +81,9 @@ tr.exportTo('tr.importer', function() {
* during the import process.
*/
importTracesWithProgressDialog: function(traces) {
- if (tr.isHeadless)
+ if (tr.isHeadless) {
throw new Error('Cannot use this method in headless mode.');
+ }
var overlay = tr.ui.b.Overlay();
overlay.title = 'Importing...';
@@ -110,8 +112,9 @@ tr.exportTo('tr.importer', function() {
*/
createImportTracesTask: function(progressMeter, traces) {
var importStartTimeMs = performance.now();
- if (this.importing_)
+ if (this.importing_) {
throw new Error('Already importing.');
+ }
this.importing_ = true;
// Just some simple setup. It is useful to have a no-op first
@@ -148,8 +151,9 @@ tr.exportTo('tr.importer', function() {
traces = traces.slice(0);
progressMeter.update('Creating importers...');
// Figure out which importers to use.
- for (var i = 0; i < traces.length; ++i)
+ for (var i = 0; i < traces.length; ++i) {
importers.push(this.createImporter_(traces[i]));
+ }
// Some traces have other traces inside them. Before doing the full
// import, ask the importer if it has any subtraces, and if so, create
@@ -318,8 +322,7 @@ tr.exportTo('tr.importer', function() {
hasEventDataDecoder_: function(importers) {
for (var i = 0; i < importers.length; ++i) {
- if (!importers[i].isTraceDataContainer())
- return true;
+ if (!importers[i].isTraceDataContainer()) return true;
}
return false;
« no previous file with comments | « tracing/tracing/importer/find_startup_expectations.html ('k') | tracing/tracing/importer/importer.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698