8220352: Crash with assert(external_guard || result != __null) failed: Invalid JNI handle

Don't delete globalrefs that might still be referenced

Reviewed-by: gadams, jcbeyler, sspitsyn
This commit is contained in:
Chris Plummer 2019-03-13 19:42:23 -07:00
parent 687596a858
commit 6fd9b75e55
2 changed files with 2 additions and 10 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2019, 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
@ -147,10 +147,6 @@ static int clean() {
jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_MONITOR_WAIT, NULL)))
nsk_jvmti_setFailStatus();
/* dispose global references */
jni->DeleteGlobalRef(object);
jni->DeleteGlobalRef(thread);
return NSK_TRUE;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2019, 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
@ -148,10 +148,6 @@ static int clean() {
jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_MONITOR_WAITED, NULL)))
nsk_jvmti_setFailStatus();
/* dispose global references */
jni->DeleteGlobalRef(object);
jni->DeleteGlobalRef(thread);
return NSK_TRUE;
}