src/hotspot/share/runtime/os.cpp
changeset 50217 843fc56f4686
parent 50184 1a4101ebec92
child 51139 c95334202a14
--- a/src/hotspot/share/runtime/os.cpp	Fri May 18 15:35:32 2018 +0200
+++ b/src/hotspot/share/runtime/os.cpp	Fri May 18 09:15:08 2018 -0700
@@ -446,31 +446,25 @@
 void os::initialize_jdk_signal_support(TRAPS) {
   if (!ReduceSignalUsage) {
     // Setup JavaThread for processing signals
-    Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::java_lang_Thread(), true, CHECK);
-    InstanceKlass* ik = InstanceKlass::cast(k);
-    instanceHandle thread_oop = ik->allocate_instance_handle(CHECK);
-
     const char thread_name[] = "Signal Dispatcher";
     Handle string = java_lang_String::create_from_str(thread_name, CHECK);
 
     // Initialize thread_oop to put it into the system threadGroup
     Handle thread_group (THREAD, Universe::system_thread_group());
-    JavaValue result(T_VOID);
-    JavaCalls::call_special(&result, thread_oop,
-                           ik,
-                           vmSymbols::object_initializer_name(),
+    Handle thread_oop = JavaCalls::construct_new_instance(SystemDictionary::Thread_klass(),
                            vmSymbols::threadgroup_string_void_signature(),
                            thread_group,
                            string,
                            CHECK);
 
     Klass* group = SystemDictionary::ThreadGroup_klass();
+    JavaValue result(T_VOID);
     JavaCalls::call_special(&result,
                             thread_group,
                             group,
                             vmSymbols::add_method_name(),
                             vmSymbols::thread_void_signature(),
-                            thread_oop,         // ARG 1
+                            thread_oop,
                             CHECK);
 
     { MutexLocker mu(Threads_lock);