Chromium Code Reviews| Index: src/api.cc |
| diff --git a/src/api.cc b/src/api.cc |
| index c852b97964916c618094685e64220d3a243134ca..3515b7565bc27793d9ec339d68a092f496d1b96c 100644 |
| --- a/src/api.cc |
| +++ b/src/api.cc |
| @@ -3065,7 +3065,9 @@ bool Object::SetAccessor(Handle<String> name, |
| getter, setter, data, |
| settings, attributes); |
| i::Handle<i::Object> result = i::SetAccessor(Utils::OpenHandle(this), info); |
| - return !result.is_null() && !result->IsUndefined(); |
| + if (result.is_null() || result->IsUndefined()) return false; |
| + i::JSObject::TransformToFastProperties(Utils::OpenHandle(this), 0); |
|
Michael Starzinger
2012/03/21 12:33:08
It would be nice not to have this code duplicated
Sven Panne
2012/03/21 13:14:18
Well, C++'s abstraction capabilities are extremely
|
| + return true; |
| } |