Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Unified Diff: src/objects.cc

Issue 24201002: Open new handle scope when deep copying. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
Michael Starzinger 2013/09/17 12:21:01 nit: You could move the handle scope down to right
Yang 2013/09/17 12:28:19 Done.
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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698