Index: src/v8natives.js |
diff --git a/src/v8natives.js b/src/v8natives.js |
index 8e057037e4cf08c9ef5f46ef9a225b44d9064b88..4a1fd35cb9f20bf35628b05baf1442955a731be0 100644 |
--- a/src/v8natives.js |
+++ b/src/v8natives.js |
@@ -909,19 +909,13 @@ function BooleanValueOf() { |
} |
-function BooleanToJSON(key) { |
- return CheckJSONPrimitive(this.valueOf()); |
-} |
- |
- |
// ---------------------------------------------------------------------------- |
function SetupBoolean() { |
InstallFunctions($Boolean.prototype, DONT_ENUM, $Array( |
"toString", BooleanToString, |
- "valueOf", BooleanValueOf, |
- "toJSON", BooleanToJSON |
+ "valueOf", BooleanValueOf |
)); |
} |
@@ -1021,18 +1015,6 @@ function NumberToPrecision(precision) { |
} |
-function CheckJSONPrimitive(val) { |
- if (!IsPrimitive(val)) |
- throw MakeTypeError('result_not_primitive', ['toJSON', val]); |
- return val; |
-} |
- |
- |
-function NumberToJSON(key) { |
- return CheckJSONPrimitive(this.valueOf()); |
-} |
- |
- |
// ---------------------------------------------------------------------------- |
function SetupNumber() { |
@@ -1073,15 +1055,13 @@ function SetupNumber() { |
"valueOf", NumberValueOf, |
"toFixed", NumberToFixed, |
"toExponential", NumberToExponential, |
- "toPrecision", NumberToPrecision, |
- "toJSON", NumberToJSON |
+ "toPrecision", NumberToPrecision |
)); |
} |
SetupNumber(); |
- |
// ---------------------------------------------------------------------------- |
// Function |