| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 9e62e3fe0d212c88959986c9fb262836b6ec1161..883231ca6ce6444ba661126dd200576711287b0e 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -2607,6 +2607,9 @@ void JSProxy::Fix() {
|
| HandleScope scope(isolate);
|
| Handle<JSProxy> self(this);
|
|
|
| + // Save identity hash.
|
| + MaybeObject* maybe_hash = GetIdentityHash(OMIT_CREATION);
|
| +
|
| if (IsJSFunctionProxy()) {
|
| isolate->factory()->BecomeJSFunction(self);
|
| // Code will be set on the JavaScript side.
|
| @@ -2614,6 +2617,13 @@ void JSProxy::Fix() {
|
| isolate->factory()->BecomeJSObject(self);
|
| }
|
| ASSERT(self->IsJSObject());
|
| +
|
| + // Inherit identity, if it was present.
|
| + Object* hash;
|
| + if (maybe_hash->To<Object>(&hash) && hash->IsSmi()) {
|
| + Handle<JSObject> new_self(JSObject::cast(*self));
|
| + isolate->factory()->SetIdentityHash(new_self, hash);
|
| + }
|
| }
|
|
|
|
|
|
|