1.1 --- a/src/share/vm/code/debugInfo.cpp Tue Mar 11 11:04:40 2008 -0700 1.2 +++ b/src/share/vm/code/debugInfo.cpp Tue Mar 11 11:25:13 2008 -0700 1.3 @@ -47,7 +47,8 @@ 1.4 } 1.5 #endif 1.6 ObjectValue* result = new ObjectValue(id); 1.7 - _obj_pool->append(result); 1.8 + // Cache the object since an object field could reference it. 1.9 + _obj_pool->push(result); 1.10 result->read_object(this); 1.11 return result; 1.12 } 1.13 @@ -56,9 +57,9 @@ 1.14 int id = read_int(); 1.15 assert(_obj_pool != NULL, "object pool does not exist"); 1.16 for (int i = _obj_pool->length() - 1; i >= 0; i--) { 1.17 - ObjectValue* sv = (ObjectValue*) _obj_pool->at(i); 1.18 - if (sv->id() == id) { 1.19 - return sv; 1.20 + ObjectValue* ov = (ObjectValue*) _obj_pool->at(i); 1.21 + if (ov->id() == id) { 1.22 + return ov; 1.23 } 1.24 } 1.25 ShouldNotReachHere();