mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
Merge
This commit is contained in:
commit
9b7dfe0cbc
1 changed files with 10 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved.
|
* Copyright 1998-2010 Sun Microsystems, Inc. All Rights Reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -63,8 +63,14 @@ class JNIHandles : AllStatic {
|
||||||
// refers to NULL (as is the case for any weak reference).
|
// refers to NULL (as is the case for any weak reference).
|
||||||
static jmethodID make_jmethod_id(methodHandle mh);
|
static jmethodID make_jmethod_id(methodHandle mh);
|
||||||
static void destroy_jmethod_id(jmethodID mid);
|
static void destroy_jmethod_id(jmethodID mid);
|
||||||
|
// Use resolve_jmethod_id() in situations where the caller is expected
|
||||||
|
// to provide a valid jmethodID; the only sanity checks are in asserts;
|
||||||
|
// result guaranteed not to be NULL.
|
||||||
inline static methodOop resolve_jmethod_id(jmethodID mid);
|
inline static methodOop resolve_jmethod_id(jmethodID mid);
|
||||||
inline static methodOop checked_resolve_jmethod_id(jmethodID mid); // NULL on invalid jmethodID
|
// Use checked_resolve_jmethod_id() in situations where the caller
|
||||||
|
// should provide a valid jmethodID, but might not. NULL is returned
|
||||||
|
// when the jmethodID does not refer to a valid method.
|
||||||
|
inline static methodOop checked_resolve_jmethod_id(jmethodID mid);
|
||||||
static void change_method_associated_with_jmethod_id(jmethodID jmid, methodHandle mh);
|
static void change_method_associated_with_jmethod_id(jmethodID jmid, methodHandle mh);
|
||||||
|
|
||||||
// Sentinel marking deleted handles in block. Note that we cannot store NULL as
|
// Sentinel marking deleted handles in block. Note that we cannot store NULL as
|
||||||
|
@ -200,12 +206,8 @@ inline methodOop JNIHandles::resolve_jmethod_id(jmethodID mid) {
|
||||||
};
|
};
|
||||||
|
|
||||||
inline methodOop JNIHandles::checked_resolve_jmethod_id(jmethodID mid) {
|
inline methodOop JNIHandles::checked_resolve_jmethod_id(jmethodID mid) {
|
||||||
if (mid == NULL) {
|
oop o = resolve_external_guard((jobject) mid);
|
||||||
return (methodOop) NULL;
|
if (o == NULL || !o->is_method()) {
|
||||||
}
|
|
||||||
|
|
||||||
oop o = resolve_non_null((jobject) mid);
|
|
||||||
if (!o->is_method()) {
|
|
||||||
return (methodOop) NULL;
|
return (methodOop) NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue