Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: src/bootstrapper.cc

Issue 109004: Suggestion for 1717. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/array.js ('k') | src/date-delay.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)));
}
« no previous file with comments | « src/array.js ('k') | src/date-delay.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698