Chromium Code Reviews| Index: src/objects.cc |
| =================================================================== |
| --- src/objects.cc (revision 6673) |
| +++ src/objects.cc (working copy) |
| @@ -2779,6 +2779,13 @@ |
| MaybeObject* JSObject::PreventExtensions() { |
| + if (IsJSGlobalProxy()) { |
| + Object* proto = GetPrototype(); |
| + if (proto->IsNull()) return this; |
| + ASSERT(proto->IsJSGlobalObject()); |
| + return JSObject::cast(proto)->PreventExtensions(); |
| + } |
| + |
| // If there are fast elements we normalize. |
| if (HasFastElements()) { |
| Object* ok; |