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

Unified Diff: runtime/vm/clustered_snapshot.cc

Issue 2979763002: [VM generic function types] Properly set the scope function after parsing a (Closed)
Patch Set: address comments, move new test from language to language_2, sync Created 3 years, 5 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/class_finalizer.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/clustered_snapshot.cc
diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc
index de332128c221f93815ffbf25de2d6a17e2297759..06210a5477610abcc2ebc256fc19600dc9c3df0f 100644
--- a/runtime/vm/clustered_snapshot.cc
+++ b/runtime/vm/clustered_snapshot.cc
@@ -1570,7 +1570,8 @@ class CodeSerializationCluster : public SerializationCluster {
}
if (kind == Snapshot::kFullAOT) {
if (code->ptr()->instructions_ != code->ptr()->active_instructions_) {
- s->UnexpectedObject(code, "Disabled code");
+ // TODO(rmacnak): Fix references to disabled code before serializing.
+ // s->UnexpectedObject(code, "Disabled code");
}
}
@@ -4629,12 +4630,18 @@ void Serializer::Trace(RawObject* object) {
}
void Serializer::UnexpectedObject(RawObject* raw_object, const char* message) {
+ // Exit the no safepoint scope so we can allocate while printing.
+ while (thread()->no_safepoint_scope_depth() > 0) {
+ thread()->DecrementNoSafepointScopeDepth();
+ }
Object& object = Object::Handle(raw_object);
- OS::PrintErr("Unexpected object (%s): %s\n", message, object.ToCString());
+ OS::PrintErr("Unexpected object (%s): 0x%" Px " %s\n", message,
+ reinterpret_cast<uword>(object.raw()), object.ToCString());
#if defined(SNAPSHOT_BACKTRACE)
while (!object.IsNull()) {
object = ParentOf(object);
- OS::PrintErr("referenced by %s\n", object.ToCString());
+ OS::PrintErr("referenced by 0x%" Px " %s\n",
+ reinterpret_cast<uword>(object.raw()), object.ToCString());
}
#endif
OS::Abort();
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698