Make Kotlin_initRuntimeIfNeeded switch to native state

This commit is contained in:
Alexander Shabalin
2021-05-20 13:48:49 +00:00
committed by Space
parent f40110eb83
commit eac3f507b6
16 changed files with 61 additions and 7 deletions
@@ -19,6 +19,7 @@ inline bool isForeignRefAccessible(ObjHeader* object, ForeignRefContext context)
// If runtime has not been initialized on this thread, then the object is either unowned or shared.
// In the former case initialized runtime is required to throw exceptions
// in the latter case -- to provide proper execution context for caller.
// TODO: Can this be called in uninitialized state in the new MM?
Kotlin_initRuntimeIfNeeded();
return IsForeignRefAccessible(object, context);