equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
682 if (method != NULL) { |
682 if (method != NULL) { |
683 methodHandle m(THREAD, method); |
683 methodHandle m(THREAD, method); |
684 // This can safepoint and redefine method, so need both new_obj and method |
684 // This can safepoint and redefine method, so need both new_obj and method |
685 // in a handle, for two different reasons. new_obj can move, method can be |
685 // in a handle, for two different reasons. new_obj can move, method can be |
686 // deleted if nothing is using it on the stack. |
686 // deleted if nothing is using it on the stack. |
687 m->method_holder()->add_member_name(new_obj()); |
687 m->method_holder()->add_member_name(new_obj(), false); |
688 } |
688 } |
689 } |
689 } |
690 |
690 |
691 // Caution: this involves a java upcall, so the clone should be |
691 // Caution: this involves a java upcall, so the clone should be |
692 // "gc-robust" by this stage. |
692 // "gc-robust" by this stage. |