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

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 1955453002: - Use a map to lookup libraries by URL. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix precompiler handling. Created 4 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
Index: runtime/vm/raw_object_snapshot.cc
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index eec25231efd802fd6b598fb917a80a67a9f7dd3f..14169bae7ab1520f0399c9e89cf0e6a3fc7ba025 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -1132,7 +1132,7 @@ RawLibrary* Library::ReadFrom(SnapshotReader* reader,
if ((kind == Snapshot::kScript) && is_in_fullsnapshot) {
// Lookup the object as it should already exist in the heap.
*reader->StringHandle() ^= reader->ReadObjectImpl(kAsInlinedObject);
- library = Library::LookupLibrary(*reader->StringHandle());
+ library = Library::LookupLibrary(reader->thread(), *reader->StringHandle());
ASSERT(library.is_in_fullsnapshot());
} else {
// Allocate library object.
@@ -1174,7 +1174,7 @@ RawLibrary* Library::ReadFrom(SnapshotReader* reader,
if (!Snapshot::IsFull(kind)) {
// The cache of resolved names in library scope is not serialized.
library.InitResolvedNamesCache(kInitialNameCacheSize);
- library.Register();
+ library.Register(reader->thread());
} else {
library.InitResolvedNamesCache(kInitialNameCacheSize, reader);
}

Powered by Google App Engine
This is Rietveld 408576698