diff options
Diffstat (limited to 'runtime/mirror/class-inl.h')
-rw-r--r-- | runtime/mirror/class-inl.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/mirror/class-inl.h b/runtime/mirror/class-inl.h index 712286f4e5..cc6f5c4cd6 100644 --- a/runtime/mirror/class-inl.h +++ b/runtime/mirror/class-inl.h @@ -548,6 +548,10 @@ inline void Class::CheckObjectAlloc() { << PrettyClass(this) << "A class object shouldn't be allocated through this " << "as it requires a pre-fence visitor that sets the class size."; + DCHECK(!IsStringClass()) + << PrettyClass(this) + << "A string shouldn't be allocated through this " + << "as it requires a pre-fence visitor that sets the class size."; DCHECK(IsInstantiable()) << PrettyClass(this); // TODO: decide whether we want this check. It currently fails during bootstrap. // DCHECK(!Runtime::Current()->IsStarted() || IsInitializing()) << PrettyClass(this); |