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

Unified Diff: runtime/vm/kernel_reader.cc

Issue 2854393002: [kernel] [partial] Streaming of kernel binary without AST nodes (Closed)
Patch Set: Created 3 years, 8 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: runtime/vm/kernel_reader.cc
diff --git a/runtime/vm/kernel_reader.cc b/runtime/vm/kernel_reader.cc
index 0879f95ed2e713ab619368227eda0b8b03e121cf..42652c84c9050208425c11150046aaff2911c53c 100644
--- a/runtime/vm/kernel_reader.cc
+++ b/runtime/vm/kernel_reader.cc
@@ -201,11 +201,13 @@ Object& KernelReader::ReadProgram() {
// linked with a script, it does not need to be patched.
if ((procedure != NULL) && (procedure->function()->body() == NULL)) {
// We will handle the StaticGet specially and will not use the name.
+ // Note that we pass "true" in cannot_stream to avoid trying to stream
+ // a non-existing part of the binary.
//
// TODO(kmillikin): we are leaking the function body. Find a way to
// deallocate it.
procedure->function()->set_body(
- new ReturnStatement(new StaticGet(NULL)));
+ new ReturnStatement(new StaticGet(NULL, true), true));
}
return library;
}

Powered by Google App Engine
This is Rietveld 408576698