src/share/vm/runtime/jniHandles.cpp

changeset 4037
da91efe96a93
parent 3156
f08d439fab8c
child 4299
f34d701e952e
     1.1 --- a/src/share/vm/runtime/jniHandles.cpp	Fri Aug 31 16:39:35 2012 -0700
     1.2 +++ b/src/share/vm/runtime/jniHandles.cpp	Sat Sep 01 13:25:18 2012 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1998, 2012, Oracle and/or its affiliates. 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 @@ -111,19 +111,6 @@
    1.11    return res;
    1.12  }
    1.13  
    1.14 -jmethodID JNIHandles::make_jmethod_id(methodHandle mh) {
    1.15 -  return (jmethodID) make_weak_global(mh);
    1.16 -}
    1.17 -
    1.18 -
    1.19 -
    1.20 -void JNIHandles::change_method_associated_with_jmethod_id(jmethodID jmid, methodHandle mh) {
    1.21 -  MutexLocker ml(JNIGlobalHandle_lock); // Is this necessary?
    1.22 -  Handle obj = (Handle)mh;
    1.23 -  oop* jobj = (oop*)jmid;
    1.24 -  *jobj = obj();
    1.25 -}
    1.26 -
    1.27  
    1.28  void JNIHandles::destroy_global(jobject handle) {
    1.29    if (handle != NULL) {
    1.30 @@ -140,10 +127,6 @@
    1.31    }
    1.32  }
    1.33  
    1.34 -void JNIHandles::destroy_jmethod_id(jmethodID mid) {
    1.35 -  destroy_weak_global((jobject)mid);
    1.36 -}
    1.37 -
    1.38  
    1.39  void JNIHandles::oops_do(OopClosure* f) {
    1.40    f->do_oop(&_deleted_handle);
    1.41 @@ -162,8 +145,8 @@
    1.42    EXCEPTION_MARK;
    1.43    // We will never reach the CATCH below since Exceptions::_throw will cause
    1.44    // the VM to exit if an exception is thrown during initialization
    1.45 -  klassOop k      = SystemDictionary::Object_klass();
    1.46 -  _deleted_handle = instanceKlass::cast(k)->allocate_permanent_instance(CATCH);
    1.47 +  Klass* k      = SystemDictionary::Object_klass();
    1.48 +  _deleted_handle = InstanceKlass::cast(k)->allocate_instance(CATCH);
    1.49  }
    1.50  
    1.51  

mercurial