mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8198441: Replace native Runtime::runFinalization0 method with shared secrets
Reviewed-by: martin
This commit is contained in:
parent
d4c69026bf
commit
f42b8e4a00
5 changed files with 18 additions and 21 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -65,19 +65,6 @@ Java_java_lang_Runtime_gc(JNIEnv *env, jobject this)
|
|||
JVM_GC();
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_java_lang_Runtime_runFinalization0(JNIEnv *env, jobject this)
|
||||
{
|
||||
jclass cl;
|
||||
jmethodID mid;
|
||||
|
||||
if ((cl = (*env)->FindClass(env, "java/lang/ref/Finalizer"))
|
||||
&& (mid = (*env)->GetStaticMethodID(env, cl,
|
||||
"runFinalization", "()V"))) {
|
||||
(*env)->CallStaticVoidMethod(env, cl, mid);
|
||||
}
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_java_lang_Runtime_availableProcessors(JNIEnv *env, jobject this)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue