1.1 --- a/src/share/vm/ci/ciExceptionHandler.cpp Tue Jan 05 13:05:58 2010 +0100 1.2 +++ b/src/share/vm/ci/ciExceptionHandler.cpp Tue Jan 05 15:21:25 2010 +0100 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright 1999-2003 Sun Microsystems, Inc. All Rights Reserved. 1.6 + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -34,12 +34,16 @@ 1.11 // 1.12 // Get the exception klass that this handler catches. 1.13 ciInstanceKlass* ciExceptionHandler::catch_klass() { 1.14 + VM_ENTRY_MARK; 1.15 assert(!is_catch_all(), "bad index"); 1.16 if (_catch_klass == NULL) { 1.17 bool will_link; 1.18 - ciKlass* k = CURRENT_ENV->get_klass_by_index(_loading_klass, 1.19 + assert(_loading_klass->get_instanceKlass()->is_linked(), "must be linked before accessing constant pool"); 1.20 + constantPoolHandle cpool(_loading_klass->get_instanceKlass()->constants()); 1.21 + ciKlass* k = CURRENT_ENV->get_klass_by_index(cpool, 1.22 _catch_klass_index, 1.23 - will_link); 1.24 + will_link, 1.25 + _loading_klass); 1.26 if (!will_link && k->is_loaded()) { 1.27 GUARDED_VM_ENTRY( 1.28 k = CURRENT_ENV->get_unloaded_klass(_loading_klass, k->name());