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

Unified Diff: src/js/v8natives.js

Issue 1701273003: [builtins] Migrate the leftover Boolean setup to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/builtins.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/v8natives.js
diff --git a/src/js/v8natives.js b/src/js/v8natives.js
index 21cc9b7db22a41671a8f27556eef5acc90af3624..78e7a6ae876b6da189b81782966994307fcb728b 100644
--- a/src/js/v8natives.js
+++ b/src/js/v8natives.js
@@ -10,7 +10,6 @@
// Imports
var GlobalArray = global.Array;
-var GlobalBoolean = global.Boolean;
var GlobalNumber = global.Number;
var GlobalObject = global.Object;
var InternalArray = utils.InternalArray;
@@ -878,44 +877,6 @@ utils.InstallFunctions(GlobalObject, DONT_ENUM, [
]);
-// ----------------------------------------------------------------------------
-// Boolean
-
-function BooleanToString() {
- // NOTE: Both Boolean objects and values can enter here as
- // 'this'. This is not as dictated by ECMA-262.
- var b = this;
- if (!IS_BOOLEAN(b)) {
- if (!IS_BOOLEAN_WRAPPER(b)) {
- throw MakeTypeError(kNotGeneric, 'Boolean.prototype.toString');
- }
- b = %_ValueOf(b);
- }
- return b ? 'true' : 'false';
-}
-
-
-function BooleanValueOf() {
- // NOTE: Both Boolean objects and values can enter here as
- // 'this'. This is not as dictated by ECMA-262.
- if (!IS_BOOLEAN(this) && !IS_BOOLEAN_WRAPPER(this)) {
- throw MakeTypeError(kNotGeneric, 'Boolean.prototype.valueOf');
- }
- return %_ValueOf(this);
-}
-
-
-// ----------------------------------------------------------------------------
-
-%FunctionSetPrototype(GlobalBoolean, new GlobalBoolean(false));
-%AddNamedProperty(GlobalBoolean.prototype, "constructor", GlobalBoolean,
- DONT_ENUM);
-
-utils.InstallFunctions(GlobalBoolean.prototype, DONT_ENUM, [
- "toString", BooleanToString,
- "valueOf", BooleanValueOf
-]);
-
// ----------------------------------------------------------------------------
// Number
« no previous file with comments | « src/builtins.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698