| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index 10de6f9e5ec001c595a0b86632599f9be9a22074..f1d6915168b4ce58e6290979a85adbcfe112bb32 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -500,7 +500,10 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateObjectLiteral) {
|
| // Update the functions literal and return the boilerplate.
|
| literals->set(literals_index, *boilerplate);
|
| }
|
| - return JSObject::cast(*boilerplate)->DeepCopy(isolate);
|
| +
|
| + Handle<Object> copy = JSObject::DeepCopy(Handle<JSObject>::cast(boilerplate));
|
| + RETURN_IF_EMPTY_HANDLE(isolate, copy);
|
| + return *copy;
|
| }
|
|
|
|
|
| @@ -565,8 +568,10 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateArrayLiteral) {
|
| literals_index, elements);
|
| RETURN_IF_EMPTY_HANDLE(isolate, site);
|
|
|
| - JSObject* boilerplate = JSObject::cast(site->transition_info());
|
| - return boilerplate->DeepCopy(isolate);
|
| + Handle<JSObject> boilerplate(JSObject::cast(site->transition_info()));
|
| + Handle<JSObject> copy = JSObject::DeepCopy(boilerplate);
|
| + RETURN_IF_EMPTY_HANDLE(isolate, copy);
|
| + return *copy;
|
| }
|
|
|
|
|
|
|