Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 5a1daa2fc201301b311fc25f3ae28bcbf5784075..f43f76d9225f7b535401a013492a1bb32d9b7364 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -5824,10 +5824,22 @@ void JSObject::SetObserved(Handle<JSObject> object) { |
} |
+Handle<JSObject> JSObject::Copy(Handle<JSObject> object, |
+ Handle<AllocationSite> site) { |
+ Isolate* isolate = object->GetIsolate(); |
+ CALL_HEAP_FUNCTION(isolate, |
+ isolate->heap()->CopyJSObject( |
+ *object, |
+ site.is_null() ? NULL : *site), |
+ JSObject); |
+} |
+ |
+ |
Handle<JSObject> JSObject::Copy(Handle<JSObject> object) { |
Isolate* isolate = object->GetIsolate(); |
CALL_HEAP_FUNCTION(isolate, |
- isolate->heap()->CopyJSObject(*object), JSObject); |
+ isolate->heap()->CopyJSObject(*object, NULL), |
+ JSObject); |
} |
@@ -5898,14 +5910,7 @@ Handle<JSObject> JSObjectWalkVisitor<ContextObject>::StructureWalk( |
if (site_context()->ShouldCreateMemento(object)) { |
site_to_pass = site_context()->current(); |
} |
- CALL_AND_RETRY_OR_DIE(isolate, |
- isolate->heap()->CopyJSObject(*object, |
- site_to_pass.is_null() ? NULL : *site_to_pass), |
- { copy = Handle<JSObject>(JSObject::cast(__object__), |
- isolate); |
- break; |
- }, |
- return Handle<JSObject>()); |
+ copy = JSObject::Copy(object, site_to_pass); |
} else { |
copy = object; |
} |