| Index: src/bootstrapper.cc
|
| ===================================================================
|
| --- src/bootstrapper.cc (revision 1865)
|
| +++ src/bootstrapper.cc (working copy)
|
| @@ -1473,11 +1473,15 @@
|
| Handle<JSFunction> function =
|
| Handle<JSFunction>(
|
| JSFunction::cast(global->GetProperty(Heap::Array_symbol())));
|
| - Handle<JSObject> prototype =
|
| + Handle<JSObject> hidden_prototype =
|
| Handle<JSObject>(JSObject::cast(function->prototype()));
|
| - AddSpecialFunction(prototype, "pop",
|
| + ASSERT(hidden_prototype->map()->is_hidden_prototype());
|
| + // Remember to skip the hidden prototype:
|
| + Handle<JSObject> real_prototype =
|
| + Handle<JSObject>(JSObject::cast(hidden_prototype->GetPrototype()));
|
| + AddSpecialFunction(real_prototype, "pop",
|
| Handle<Code>(Builtins::builtin(Builtins::ArrayPop)));
|
| - AddSpecialFunction(prototype, "push",
|
| + AddSpecialFunction(real_prototype, "push",
|
| Handle<Code>(Builtins::builtin(Builtins::ArrayPush)));
|
| }
|
|
|
|
|