Index: tracing/tracing/extras/importer/gzip_importer.html |
diff --git a/tracing/tracing/extras/importer/gzip_importer.html b/tracing/tracing/extras/importer/gzip_importer.html |
index c849e223813b00fedf0ce6272b0848b00d8ac47f..3d58ca9cb99fd8c3ddd08eff47a5af4737a6594a 100644 |
--- a/tracing/tracing/extras/importer/gzip_importer.html |
+++ b/tracing/tracing/extras/importer/gzip_importer.html |
@@ -133,7 +133,14 @@ tr.exportTo('tr.e.importer', function() { |
return GzipImporter.transformToStream(inflatedData); |
} |
- const string = GzipImporter.transformToString(inflatedData); |
+ let string; |
+ try { |
+ string = GzipImporter.transformToString(inflatedData); |
+ } catch (err) { |
+ // It may be the case that inflated data does not fit into a V8 string. In |
+ // that case, try to transform to a trace stream. |
+ return GzipImporter.transformToStream(inflatedData); |
+ } |
if (inflatedData.length > 0 && string.length === 0) { |
throw new RangeError('Inflated gzip data too long to fit into a string' + |