Index: src/v8natives.js |
diff --git a/src/v8natives.js b/src/v8natives.js |
index 92f377c4ef1b6ddf3766279d06ce6aecd585cd5a..7636b702c9128c5241429568b30e3320cc7290b2 100644 |
--- a/src/v8natives.js |
+++ b/src/v8natives.js |
@@ -215,8 +215,9 @@ SetUpGlobal(); |
// ---------------------------------------------------------------------------- |
// Object |
+var DefaultObjectToString = NoSideEffectsObjectToString; |
// ECMA-262 - 15.2.4.2 |
-function ObjectToString() { |
+function NoSideEffectsObjectToString() { |
if (IS_UNDEFINED(this) && !IS_UNDETECTABLE(this)) return "[object Undefined]"; |
if (IS_NULL(this)) return "[object Null]"; |
return "[object " + %_ClassOf(ToObject(this)) + "]"; |
@@ -1409,7 +1410,7 @@ function SetUpObject() { |
// Set up non-enumerable functions on the Object.prototype object. |
InstallFunctions($Object.prototype, DONT_ENUM, $Array( |
- "toString", ObjectToString, |
+ "toString", NoSideEffectsObjectToString, |
"toLocaleString", ObjectToLocaleString, |
"valueOf", ObjectValueOf, |
"hasOwnProperty", ObjectHasOwnProperty, |