equal
deleted
inserted
replaced
2118 |
2118 |
2119 void Method::change_method_associated_with_jmethod_id(jmethodID jmid, Method* new_method) { |
2119 void Method::change_method_associated_with_jmethod_id(jmethodID jmid, Method* new_method) { |
2120 // Can't assert the method_holder is the same because the new method has the |
2120 // Can't assert the method_holder is the same because the new method has the |
2121 // scratch method holder. |
2121 // scratch method holder. |
2122 assert(resolve_jmethod_id(jmid)->method_holder()->class_loader() |
2122 assert(resolve_jmethod_id(jmid)->method_holder()->class_loader() |
2123 == new_method->method_holder()->class_loader(), |
2123 == new_method->method_holder()->class_loader() || |
|
2124 new_method->method_holder()->class_loader() == NULL, // allow Unsafe substitution |
2124 "changing to a different class loader"); |
2125 "changing to a different class loader"); |
2125 // Just change the method in place, jmethodID pointer doesn't change. |
2126 // Just change the method in place, jmethodID pointer doesn't change. |
2126 *((Method**)jmid) = new_method; |
2127 *((Method**)jmid) = new_method; |
2127 } |
2128 } |
2128 |
2129 |