< prev index next >

src/cpu/ppc/vm/frame_ppc.cpp

Print this page
rev 12692 : 8176100: [REDO][REDO] G1 Needs pre barrier on dereference of weak JNI handles
Reviewed-by:

@@ -1,8 +1,8 @@
 /*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2015 SAP SE. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017 SAP SE. 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -169,14 +169,11 @@
     address fresult = (address)&(get_ijava_state()->fresult);
 
     switch (method->result_type()) {
       case T_OBJECT:
       case T_ARRAY: {
-        oop* obj_p = *(oop**)lresult;
-        oop obj = (obj_p == NULL) ? (oop)NULL : *obj_p;
-        assert(obj == NULL || Universe::heap()->is_in(obj), "sanity check");
-        *oop_result = obj;
+        *oop_result = JNIHandles::resolve(*(jobject*)lresult);
         break;
       }
       // We use std/stfd to store the values.
       case T_BOOLEAN : value_result->z = (jboolean) *(unsigned long*)lresult; break;
       case T_INT     : value_result->i = (jint)     *(long*)lresult;          break;
< prev index next >