Chromium Code Reviews| Index: src/runtime.cc |
| =================================================================== |
| --- src/runtime.cc (revision 6673) |
| +++ src/runtime.cc (working copy) |
| @@ -887,6 +887,12 @@ |
| static MaybeObject* Runtime_IsExtensible(Arguments args) { |
| ASSERT(args.length() == 1); |
| CONVERT_CHECKED(JSObject, obj, args[0]); |
| + if (obj->IsJSGlobalProxy()) { |
| + Object* proto = obj->GetPrototype(); |
| + if (proto->IsNull()) return obj; |
|
Mads Ager (chromium)
2011/02/08 13:04:22
Return false? Otherwise this will be interpreted a
Rico
2011/02/08 13:08:58
Done.
|
| + ASSERT(proto->IsJSGlobalObject()); |
| + obj = JSObject::cast(proto); |
| + } |
| return obj->map()->is_extensible() ? Heap::true_value() |
|
Mads Ager (chromium)
2011/02/08 13:04:22
Remove extra space.
Rico
2011/02/08 13:08:58
Done.
|
| : Heap::false_value(); |
| } |