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

Unified Diff: runtime/lib/mirrors.cc

Issue 129513002: Ensure a class is finalized before attempting any reflective invocation on it. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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 | tests/lib/lib.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors.cc
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index fe4ccf065978ca01834ee4724775d515a6663cc2..ac558b171d8f5a4d0b6f11cc1d2e255748462da0 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -337,6 +337,12 @@ static RawInstance* CreateClassMirror(const Class& cls,
}
}
+ const Error& error = Error::Handle(cls.EnsureIsFinalized(Isolate::Current()));
+ if (!error.IsNull()) {
+ ThrowInvokeError(error);
+ UNREACHABLE();
+ }
+
const Bool& is_generic = Bool::Get(cls.NumTypeParameters() != 0);
const Bool& is_mixin_app_alias = Bool::Get(cls.is_mixin_app_alias());
« no previous file with comments | « no previous file | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698