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

Unified Diff: runtime/vm/snapshot.cc

Issue 2955923002: [vm] Fix reading a named reference to a top-level class. (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | no next file » | 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 51e551140aa46197f33016560127835cff4457d3..f54a84c58a77dea8cb372eb5a0375ae106bff456 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -276,7 +276,11 @@ RawClass* SnapshotReader::ReadClassId(intptr_t object_id) {
SetReadException("Invalid object found in message.");
}
str_ ^= ReadObjectImpl(kAsInlinedObject);
- cls = library_.LookupClassAllowPrivate(str_);
+ if (str_.raw() == Symbols::TopLevel().raw()) {
+ cls = library_.toplevel_class();
+ } else {
+ cls = library_.LookupClassAllowPrivate(str_);
siva 2017/06/26 20:36:45 Would it be beneficial to add this login into Look
rmacnak 2017/06/26 20:51:45 I'm not sure. I don't think we can generally treat
+ }
if (cls.IsNull()) {
SetReadException("Invalid object found in message.");
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698