diff options
| author | 2014-07-11 14:52:06 +0000 | |
|---|---|---|
| committer | 2014-07-10 20:09:49 +0000 | |
| commit | 3641ac7de8b51c0853eaaa2ba3a3ab7e65a837c5 (patch) | |
| tree | 425daeee0978d1a551ede86422643da09fbe1f43 /runtime/mirror/class-inl.h | |
| parent | eab674a87b32794ae2c5e7d238292e56804de09d (diff) | |
| parent | 4e99b3d8955131f3fc71aa113f0fa71f0092cb6f (diff) | |
Merge "Add missing class initialization during compilation and tests"
Diffstat (limited to 'runtime/mirror/class-inl.h')
| -rw-r--r-- | runtime/mirror/class-inl.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/mirror/class-inl.h b/runtime/mirror/class-inl.h index 451235c327..2daa6e49a6 100644 --- a/runtime/mirror/class-inl.h +++ b/runtime/mirror/class-inl.h @@ -546,6 +546,14 @@ inline bool Class::DescriptorEquals(const char* match) { } } +inline void Class::AssertInitializedOrInitializingInThread(Thread* self) { + if (kIsDebugBuild && !IsInitialized()) { + CHECK(IsInitializing()) << PrettyClass(this) << " is not initializing: " << GetStatus(); + CHECK_EQ(GetClinitThreadId(), self->GetTid()) << PrettyClass(this) + << " is initializing in a different thread"; + } +} + } // namespace mirror } // namespace art |