8212605: Pure-Java implementation of AccessController.doPrivileged

Reviewed-by: dholmes, mullan, vlivanov, mchung, alanb, rriggs
This commit is contained in:
Dean Long 2018-11-06 16:04:50 -08:00
parent c8c41d1444
commit a9ae141836
24 changed files with 213 additions and 450 deletions

View file

@ -61,7 +61,6 @@
#include "prims/jvm_misc.hpp"
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiThreadState.hpp"
#include "prims/privilegedStack.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.hpp"
#include "runtime/biasedLocking.hpp"
@ -1558,7 +1557,6 @@ void JavaThread::initialize() {
_on_thread_list = false;
set_thread_state(_thread_new);
_terminated = _not_terminated;
_privileged_stack_top = NULL;
_array_for_gc = NULL;
_suspend_equivalent = false;
_in_deopt_handler = 0;
@ -1990,7 +1988,6 @@ void JavaThread::exit(bool destroy_vm, ExitType exit_type) {
// These things needs to be done while we are still a Java Thread. Make sure that thread
// is in a consistent state, in case GC happens
assert(_privileged_stack_top == NULL, "must be NULL when we get here");
if (active_handles() != NULL) {
JNIHandleBlock* block = active_handles();
@ -2840,11 +2837,6 @@ void JavaThread::oops_do(OopClosure* f, CodeBlobClosure* cf) {
// Record JavaThread to GC thread
RememberProcessedThread rpt(this);
// Traverse the privileged stack
if (_privileged_stack_top != NULL) {
_privileged_stack_top->oops_do(f);
}
// traverse the registered growable array
if (_array_for_gc != NULL) {
for (int index = 0; index < _array_for_gc->length(); index++) {