Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 6d86532db578f984a57a100b13371fef2d5a320c..452705744a66e51d43d040731cb7cb6ea8da174c 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -2840,6 +2840,11 @@ Object* JSObject::DefineGetterSetter(String* name, |
if (result.type() == CALLBACKS) { |
Object* obj = result.GetCallbackObject(); |
if (obj->IsFixedArray()) { |
+ // The object might be in fast mode even though it has |
+ // a getter/setter. |
+ Object* ok = NormalizeProperties(CLEAR_INOBJECT_PROPERTIES, 0); |
+ if (ok->IsFailure()) return ok; |
+ |
PropertyDetails details = PropertyDetails(attributes, CALLBACKS); |
SetNormalizedProperty(name, obj, details); |
return obj; |