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

Unified Diff: runtime/vm/snapshot.cc

Issue 1947393003: - Use a map to lookup libraries by URL. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
« no previous file with comments | « runtime/vm/service_isolate.cc ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot.cc
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index e31c35e0eadb21c376750155a48672de88e56e1d..538701d3c96b377efbbbc61843b48043ed90bce7 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -253,7 +253,7 @@ RawClass* SnapshotReader::ReadClassId(intptr_t object_id) {
AddBackRef(object_id, &cls, kIsDeserialized);
// Read the library/class information and lookup the class.
str_ ^= ReadObjectImpl(class_header, kAsInlinedObject, kInvalidPatchIndex, 0);
- library_ = Library::LookupLibrary(str_);
+ library_ = Library::LookupLibrary(thread(), str_);
if (library_.IsNull() || !library_.Loaded()) {
SetReadException("Invalid object found in message.");
}
@@ -280,7 +280,7 @@ RawFunction* SnapshotReader::ReadFunctionId(intptr_t object_id) {
AddBackRef(object_id, &func, kIsDeserialized);
// Read the library/class/function information and lookup the function.
str_ ^= ReadObjectImpl(func_header, kAsInlinedObject, kInvalidPatchIndex, 0);
- library_ = Library::LookupLibrary(str_);
+ library_ = Library::LookupLibrary(thread(), str_);
if (library_.IsNull() || !library_.Loaded()) {
SetReadException("Expected a library name, but found an invalid name.");
}
@@ -316,7 +316,7 @@ RawObject* SnapshotReader::ReadStaticImplicitClosure(intptr_t object_id,
// Read the library/class/function information and lookup the function.
str_ ^= ReadObjectImpl(kAsInlinedObject);
- library_ = Library::LookupLibrary(str_);
+ library_ = Library::LookupLibrary(thread(), str_);
if (library_.IsNull() || !library_.Loaded()) {
SetReadException("Invalid Library object found in message.");
}
« no previous file with comments | « runtime/vm/service_isolate.cc ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698