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

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 268853003: Fix library snapshotting breakage with native entry symbol resolver (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 | « runtime/vm/native_entry.cc ('k') | runtime/vm/reusable_handles.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object_snapshot.cc
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index 952bcc242a9e771b16b9b6ea62d95aea6976d7ce..d2ce0dfc89276a40028cec3bcb91f163d5d367e5 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -1026,6 +1026,11 @@ RawLibrary* Library::ReadFrom(SnapshotReader* reader,
reader->Read<Dart_NativeEntryResolver>();
ASSERT(resolver == NULL);
library.set_native_entry_resolver(resolver);
+ // The symbol resolver is not serialized.
+ Dart_NativeEntrySymbol symbol_resolver =
+ reader->Read<Dart_NativeEntrySymbol>();
+ ASSERT(symbol_resolver == NULL);
+ library.set_native_entry_symbol_resolver(symbol_resolver);
// The cache of loaded scripts is not serialized.
library.raw_ptr()->loaded_scripts_ = Array::null();
@@ -1074,6 +1079,9 @@ void RawLibrary::WriteTo(SnapshotWriter* writer,
// We do not serialize the native resolver over, this needs to be explicitly
// set after deserialization.
writer->Write<Dart_NativeEntryResolver>(NULL);
+ // We do not serialize the native entry symbol, this needs to be explicitly
+ // set after deserialization.
+ writer->Write<Dart_NativeEntrySymbol>(NULL);
// We do not write the loaded_scripts_ cache to the snapshot. It gets
// set to NULL when reading the library from the snapshot, and will
// be rebuilt lazily.
« no previous file with comments | « runtime/vm/native_entry.cc ('k') | runtime/vm/reusable_handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698