Index: test/mjsunit/undeletable-functions.js |
diff --git a/test/mjsunit/undeletable-functions.js b/test/mjsunit/undeletable-functions.js |
index 86a74263e3c44a7c7ae5c63a694f1653e76844a1..04fd06068d0b7b7616070b143ec4aa4b9c015a36 100644 |
--- a/test/mjsunit/undeletable-functions.js |
+++ b/test/mjsunit/undeletable-functions.js |
@@ -39,6 +39,13 @@ array = [ |
"every", "map", "indexOf", "lastIndexOf", "reduce", "reduceRight"]; |
CheckJSCSemantics(Array.prototype, array, "Array prototype"); |
+var old_Array_prototype = Array.prototype; |
+var new_Array_prototype = {}; |
+for (var i = 0; i < 7; i++) { |
+ Array.prototype = new_Array_prototype; |
+ assertEquals(old_Array_prototype, Array.prototype); |
+} |
+ |
array = [ |
"toString", "toDateString", "toTimeString", "toLocaleString", |
"toLocaleDateString", "toLocaleTimeString", "valueOf", "getTime", |
@@ -79,6 +86,13 @@ array = [ |
"__lookupGetter__", "__defineSetter__", "__lookupSetter__"]; |
CheckEcmaSemantics(Object.prototype, array, "Object prototype"); |
+var old_Object_prototype = Object.prototype; |
+var new_Object_prototype = {}; |
+for (var i = 0; i < 7; i++) { |
+ Object.prototype = new_Object_prototype; |
+ assertEquals(old_Object_prototype, Object.prototype); |
+} |
+ |
array = [ |
"toString", "valueOf", "toJSON"]; |
CheckEcmaSemantics(Boolean.prototype, array, "Boolean prototype"); |