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

Unified Diff: src/background-parsing-task.h

Issue 2297523002: Release streamed script resources after it was compiled (Closed)
Patch Set: Created 4 years, 4 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 | « src/api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/background-parsing-task.h
diff --git a/src/background-parsing-task.h b/src/background-parsing-task.h
index bd96ee1f857b46f5b736930b8a9d683342f3a998..54ea6d97a951edf9b18fb61b6d20c1b68779afe0 100644
--- a/src/background-parsing-task.h
+++ b/src/background-parsing-task.h
@@ -26,6 +26,14 @@ struct StreamedSource {
ScriptCompiler::StreamedSource::Encoding encoding)
: source_stream(source_stream), encoding(encoding) {}
+ void Release() {
+ parser.reset();
+ info.reset();
+ zone.reset();
+ cached_data.reset();
+ source_stream.reset();
+ }
+
// Internal implementation of v8::ScriptCompiler::StreamedSource.
std::unique_ptr<ScriptCompiler::ExternalSourceStream> source_stream;
ScriptCompiler::StreamedSource::Encoding encoding;
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698