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

Unified Diff: tracing/tracing/extras/importer/trace2html_importer.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/extras/importer/trace2html_importer.html
diff --git a/tracing/tracing/extras/importer/trace2html_importer.html b/tracing/tracing/extras/importer/trace2html_importer.html
index 5009b553aaf93a9b3b9cdafab7c7571e3565f541..d39308dcdf6ea31f9cbcadf305f6ff94409ebbad 100644
--- a/tracing/tracing/extras/importer/trace2html_importer.html
+++ b/tracing/tracing/extras/importer/trace2html_importer.html
@@ -30,12 +30,12 @@ tr.exportTo('tr.e.importer', function() {
while (true) {
if (!r.advanceToLineMatching(
new RegExp('^<\s*script id="viewer-data" ' +
- 'type="(application\/json|text\/plain)">$')))
+ 'type="(application\/json|text\/plain)">$'))) {
break;
+ }
r.beginSavingLines();
- if (!r.advanceToLineMatching(/^<\/\s*script>$/))
- return;
+ if (!r.advanceToLineMatching(/^<\/\s*script>$/)) return;
var rawEvents = r.endSavingLinesAndGetResult();
@@ -50,13 +50,11 @@ tr.exportTo('tr.e.importer', function() {
}
function _canImportFromHTML(text) {
- if (!/^<!DOCTYPE html>/.test(text))
- return false;
+ if (!/^<!DOCTYPE html>/.test(text)) return false;
// Try to find viewer-data...
_extractEventsFromHTML(text);
- if (Trace2HTMLImporter.subtraces_.length === 0)
- return false;
+ if (Trace2HTMLImporter.subtraces_.length === 0) return false;
return true;
}

Powered by Google App Engine
This is Rietveld 408576698