Reviewers: Michael Starzinger,

Description:
Open new handle scope when deep copying.

[email protected]
BUG=292903

Please review this at https://codereview.chromium.org/24201002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+2, -1 lines):
  M src/objects.cc


Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 316b5839f4443c6e6122c5f1a875e39905d135be..513a821a6d2629051622839b3b08f6503acd7bd0 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -5623,6 +5623,7 @@ Handle<JSObject> JSObject::Copy(Handle<JSObject> object) {

 Handle<JSObject> JSObject::DeepCopy(Handle<JSObject> object) {
   Isolate* isolate = object->GetIsolate();
+  HandleScope handle_scope(isolate);
   StackLimitCheck check(isolate);
   if (check.HasOverflowed()) {
     isolate->StackOverflow();
@@ -5744,7 +5745,7 @@ Handle<JSObject> JSObject::DeepCopy(Handle<JSObject> object) {
       // No contained objects, nothing to do.
       break;
   }
-  return copy;
+  return handle_scope.CloseAndEscape(copy);
 }




--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to