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

Unified Diff: src/v8natives.js

Issue 1086673002: Revert "ES6: Number and Boolean prototype should be ordinary objects" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | test/mjsunit/es6/prototype-ordinary-objects.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index 9b0a76cc0e192bc2f3b733c89e183dac7debe6ee..6b0aa2058841ce49215fcc1cb51013cc10227a10 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -1513,7 +1513,7 @@ function SetUpBoolean () {
%CheckIsBootstrapping();
%SetCode($Boolean, BooleanConstructor);
- %FunctionSetPrototype($Boolean, new $Object());
+ %FunctionSetPrototype($Boolean, new $Boolean(false));
%AddNamedProperty($Boolean.prototype, "constructor", $Boolean, DONT_ENUM);
InstallFunctions($Boolean.prototype, DONT_ENUM, [
@@ -1692,7 +1692,7 @@ function SetUpNumber() {
%CheckIsBootstrapping();
%SetCode($Number, NumberConstructor);
- %FunctionSetPrototype($Number, new $Object());
+ %FunctionSetPrototype($Number, new $Number(0));
%OptimizeObjectForAddingMultipleProperties($Number.prototype, 8);
// Set up the constructor property on the Number prototype object.
« no previous file with comments | « no previous file | test/mjsunit/es6/prototype-ordinary-objects.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698