hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp
changeset 44093 e22e0d071bf9
parent 44088 fb5421685295
child 44406 a46a6c4d1dd9
--- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp	Mon Feb 27 17:36:36 2017 +0100
+++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp	Thu Mar 02 17:46:59 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, 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
@@ -2579,11 +2579,14 @@
 
   __ reset_last_Java_frame(false);
 
-  // Unbox oop result, e.g. JNIHandles::resolve value.
+  // Unpack oop result
   if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
-    __ resolve_jobject(rax /* value */,
-                       r15_thread /* thread */,
-                       rcx /* tmp */);
+      Label L;
+      __ testptr(rax, rax);
+      __ jcc(Assembler::zero, L);
+      __ movptr(rax, Address(rax, 0));
+      __ bind(L);
+      __ verify_oop(rax);
   }
 
   if (CheckJNICalls) {