153 ik->external_name(), ik->previous_versions()->length())); |
153 ik->external_name(), ik->previous_versions()->length())); |
154 |
154 |
155 for (int i = ik->previous_versions()->length() - 1; i >= 0; i--) { |
155 for (int i = ik->previous_versions()->length() - 1; i >= 0; i--) { |
156 // check the previous versions array for GC'ed weak refs |
156 // check the previous versions array for GC'ed weak refs |
157 PreviousVersionNode * pv_node = ik->previous_versions()->at(i); |
157 PreviousVersionNode * pv_node = ik->previous_versions()->at(i); |
158 jweak cp_ref = pv_node->prev_constant_pool(); |
158 jobject cp_ref = pv_node->prev_constant_pool(); |
159 assert(cp_ref != NULL, "weak cp ref was unexpectedly cleared"); |
159 assert(cp_ref != NULL, "cp ref was unexpectedly cleared"); |
160 if (cp_ref == NULL) { |
160 if (cp_ref == NULL) { |
161 delete pv_node; |
161 delete pv_node; |
162 ik->previous_versions()->remove_at(i); |
162 ik->previous_versions()->remove_at(i); |
163 // Since we are traversing the array backwards, we don't have to |
163 // Since we are traversing the array backwards, we don't have to |
164 // do anything special with the index. |
164 // do anything special with the index. |