641 if (method != NULL) { |
641 if (method != NULL) { |
642 methodHandle m(THREAD, method); |
642 methodHandle m(THREAD, method); |
643 // This can safepoint and redefine method, so need both new_obj and method |
643 // This can safepoint and redefine method, so need both new_obj and method |
644 // in a handle, for two different reasons. new_obj can move, method can be |
644 // in a handle, for two different reasons. new_obj can move, method can be |
645 // deleted if nothing is using it on the stack. |
645 // deleted if nothing is using it on the stack. |
646 m->method_holder()->add_member_name(new_obj()); |
646 m->method_holder()->add_member_name(new_obj(), false); |
647 } |
647 } |
648 } |
648 } |
649 |
649 |
650 // Caution: this involves a java upcall, so the clone should be |
650 // Caution: this involves a java upcall, so the clone should be |
651 // "gc-robust" by this stage. |
651 // "gc-robust" by this stage. |