Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/hotspot/share/prims/universalUpcallHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,21 +131,17 @@ void ProgrammableUpcallHandler::on_exit(OptimizedEntryBlob::FrameData* context)
// restore previous handle block
thread->set_active_handles(context->old_handles);

thread->frame_anchor()->zap();

debug_only(thread->dec_java_call_counter());

thread->frame_anchor()->copy(&context->jfa);

// Old thread-local info. has been restored. We are now back in native code.
ThreadStateTransition::transition_from_java(thread, _thread_in_native);

thread->frame_anchor()->copy(&context->jfa);

// Release handles after we are marked as being in native code again, since this
// operation might block
JNIHandleBlock::release_block(context->new_handles, thread);

assert(!thread->has_pending_exception(), "Upcall can not throw an exception");

if (context->should_detach) {
detach_current_thread();
}
Expand Down