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

Unified Diff: runtime/vm/object.cc

Issue 10871005: Make ClassFinalizer indifferent on whether we are generating a snapshot or not. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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/object.cc
===================================================================
--- runtime/vm/object.cc (revision 11113)
+++ runtime/vm/object.cc (working copy)
@@ -4367,7 +4367,9 @@
}
const Type& signature_type = Type::Handle(signature_class.SignatureType());
if (!signature_type.IsFinalized()) {
- ClassFinalizer::FinalizeType(
+ // No additional malformed types can be detected during finalization.
+ ClassFinalizer class_finalizer(ClassFinalizer::kNotGeneratingSnapshot);
+ class_finalizer.FinalizeType(
signature_class, signature_type, ClassFinalizer::kCanonicalize);
}
ASSERT(closure_function.signature_class() == signature_class.raw());
@@ -6273,7 +6275,8 @@
RawError* Library::Patch(const Script& script) const {
ASSERT(script.kind() == RawScript::kPatchTag);
- return Compiler::Compile(*this, script);
+ // Do not tolerate malformed types when patching libraries.
+ return Compiler::Compile(*this, script, ClassFinalizer::kGeneratingSnapshot);
}

Powered by Google App Engine
This is Rietveld 408576698