From 80d71c6406253aef9ea58088dacd5e4cc38acf3d Mon Sep 17 00:00:00 2001 From: "ricow@chromium.org" Date: Wed, 27 Jan 2010 13:53:19 +0000 Subject: [PATCH] Changed JSObject::DefineGetterSetter to also set the right attributes when an existing accessor is redefined (a configurable accessor can potentially be redefined as a non-configurable (i.e., DONT_DELETE)). Review URL: http://codereview.chromium.org/556040 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3719 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/objects.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/objects.cc b/src/objects.cc index 118c4891d3..c76fc83377 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -2839,7 +2839,11 @@ Object* JSObject::DefineGetterSetter(String* name, if (result.IsReadOnly()) return Heap::undefined_value(); if (result.type() == CALLBACKS) { Object* obj = result.GetCallbackObject(); - if (obj->IsFixedArray()) return obj; + if (obj->IsFixedArray()) { + PropertyDetails details = PropertyDetails(attributes, CALLBACKS); + SetNormalizedProperty(name, obj, details); + return obj; + } } } }