# HG changeset patch # User twisti # Date 1441234281 36000 # Node ID d77654050ba45d9022c72e18d67389878c1e3fa1 # Parent ce70789042380fa565decf655826c4646faf561d Move assert in SharedRuntime::register_finalizer. diff -r ce7078904238 -r d77654050ba4 src/share/vm/runtime/sharedRuntime.cpp --- a/src/share/vm/runtime/sharedRuntime.cpp Fri Sep 04 19:22:19 2015 +0200 +++ b/src/share/vm/runtime/sharedRuntime.cpp Wed Sep 02 12:51:21 2015 -1000 @@ -1013,6 +1013,7 @@ JRT_ENTRY_NO_ASYNC(void, SharedRuntime::register_finalizer(JavaThread* thread, oopDesc* obj)) + assert(obj->is_oop(), "must be a valid oop"); #if INCLUDE_JVMCI // This removes the requirement for JVMCI compilers to emit code // performing a dynamic check that obj has a finalizer before @@ -1023,7 +1024,6 @@ return; } #endif - assert(obj->is_oop(), "must be a valid oop"); assert(obj->klass()->has_finalizer(), "shouldn't be here otherwise"); InstanceKlass::register_finalizer(instanceOop(obj), CHECK); JRT_END