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

Unified Diff: runtime/lib/mirrors.cc

Issue 34533003: VM: Always return immutable collections from the mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | runtime/lib/mirrors_impl.dart » ('j') | runtime/vm/object.cc » ('J')
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 88b35b0169b5798359a93d212f3b9c1288b46235..252248074dd7e25c70e3003d32c9f555be59514d 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -111,7 +111,9 @@ DEFINE_NATIVE_ENTRY(Mirrors_isLocalPort, 1) {
}
static void EnsureConstructorsAreCompiled(const Function& func) {
- if (func.kind() != RawFunction::kConstructor) return;
+ // Only generative constructors can have initializing formals.
+ if (!func.IsConstructor()) return;
+
const Class& cls = Class::Handle(func.Owner());
const Error& error = Error::Handle(cls.EnsureIsFinalized(Isolate::Current()));
if (!error.IsNull()) {
« no previous file with comments | « no previous file | runtime/lib/mirrors_impl.dart » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698