From 9fa48abd2c2d12fecba1a181f74a5ad4d67a2753 Mon Sep 17 00:00:00 2001 From: "verwaest@chromium.org" Date: Thu, 12 Jun 2014 09:56:54 +0000 Subject: [PATCH] Remove duplicate code in SetPropertyPostInterceptor BUG= R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/314673002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/objects.cc | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/objects.cc b/src/objects.cc index 91d90a2..bdfa23c 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -2009,22 +2009,8 @@ MaybeHandle JSObject::SetPropertyPostInterceptor( if (!result.IsFound()) { object->map()->LookupTransition(*object, *name, &result); } - if (result.IsFound()) { - // An existing property or a map transition was found. Use set property to - // handle all these cases. - return SetPropertyForResult(object, &result, name, value, attributes, - strict_mode, MAY_BE_STORE_FROM_KEYED); - } - bool done = false; - Handle result_object; - ASSIGN_RETURN_ON_EXCEPTION( - isolate, result_object, - SetPropertyViaPrototypes( - object, name, value, attributes, strict_mode, &done), - Object); - if (done) return result_object; - // Add a new real property. - return AddProperty(object, name, value, attributes, strict_mode); + return SetPropertyForResult(object, &result, name, value, attributes, + strict_mode, MAY_BE_STORE_FROM_KEYED); } -- 2.7.4