Index: src/runtime/runtime-object.cc |
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc |
index 524c88451dad3e773ab20065e03e083ed5c8a89b..b2a736d7a5bb41e07532366ac815da3693bcbace 100644 |
--- a/src/runtime/runtime-object.cc |
+++ b/src/runtime/runtime-object.cc |
@@ -1455,8 +1455,10 @@ RUNTIME_FUNCTION(Runtime_DefineAccessorPropertyUnchecked) { |
RUNTIME_ASSERT((unchecked & ~(READ_ONLY | DONT_ENUM | DONT_DELETE)) == 0); |
PropertyAttributes attr = static_cast<PropertyAttributes>(unchecked); |
+ bool fast = obj->HasFastProperties(); |
RETURN_FAILURE_ON_EXCEPTION( |
isolate, JSObject::DefineAccessor(obj, name, getter, setter, attr)); |
+ if (fast) JSObject::MigrateSlowToFast(obj, 0, "RuntimeDefineAccessor"); |
return isolate->heap()->undefined_value(); |
} |