< prev index next >

src/share/vm/runtime/thread.cpp

Print this page

        

@@ -3590,11 +3590,12 @@
     JavaThread::_jvmci_old_thread_counters = NULL;
   }
 #endif // INCLUDE_JVMCI
 
   // Attach the main thread to this os thread
-  JavaThread* main_thread = new JavaThread();
+  JavaThread* main_thread = new JavaThread(true);
+  main_thread->set_done_attaching_via_jni();
   main_thread->set_thread_state(_thread_in_vm);
   main_thread->initialize_thread_current();
   // must do this before set_active_handles
   main_thread->record_stack_base_and_size();
   main_thread->set_active_handles(JNIHandleBlock::allocate_block());
< prev index next >