comparison src/share/vm/compiler/abstractCompiler.cpp @ 2092:68c5a4e8881d

6928562: Assert(_no_handle_mark_nesting==0,"allocating handle inside NoHandleMark") Summary: reset NoHandleMark before going into VM. Reviewed-by: iveresov
author kvn
date Thu, 30 Dec 2010 09:36:03 -0800
parents f95d63e2154a
children 469216acdb28
comparison
equal deleted inserted replaced
2091:51bd2d261853 2092:68c5a4e8881d
31 // We are thread in native here... 31 // We are thread in native here...
32 CompilerThread* thread = CompilerThread::current(); 32 CompilerThread* thread = CompilerThread::current();
33 bool do_initialization = false; 33 bool do_initialization = false;
34 { 34 {
35 ThreadInVMfromNative tv(thread); 35 ThreadInVMfromNative tv(thread);
36 ResetNoHandleMark rnhm;
36 MutexLocker only_one(CompileThread_lock, thread); 37 MutexLocker only_one(CompileThread_lock, thread);
37 if ( *state == uninitialized) { 38 if ( *state == uninitialized) {
38 do_initialization = true; 39 do_initialization = true;
39 *state = initializing; 40 *state = initializing;
40 } else { 41 } else {
51 (*f)(); 52 (*f)();
52 53
53 // To in_vm so we can use the lock 54 // To in_vm so we can use the lock
54 55
55 ThreadInVMfromNative tv(thread); 56 ThreadInVMfromNative tv(thread);
57 ResetNoHandleMark rnhm;
56 MutexLocker only_one(CompileThread_lock, thread); 58 MutexLocker only_one(CompileThread_lock, thread);
57 assert(*state == initializing, "wrong state"); 59 assert(*state == initializing, "wrong state");
58 *state = initialized; 60 *state = initialized;
59 CompileThread_lock->notify_all(); 61 CompileThread_lock->notify_all();
60 } 62 }