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; |
} |