summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/self-hosting/object-lookup-hazard.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/self-hosting/object-lookup-hazard.js')
-rw-r--r--js/src/jit-test/tests/self-hosting/object-lookup-hazard.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/self-hosting/object-lookup-hazard.js b/js/src/jit-test/tests/self-hosting/object-lookup-hazard.js
new file mode 100644
index 000000000..5197a9113
--- /dev/null
+++ b/js/src/jit-test/tests/self-hosting/object-lookup-hazard.js
@@ -0,0 +1,8 @@
+// We shouldn't do the wrong thing in the face of an evil Object.prototype
+
+Object.prototype.get = function() {};
+assertEq(({a: 1}).__lookupGetter__("a"), undefined);
+delete Object.prototype.get;
+
+Object.prototype.set = function() {};
+assertEq(({a: 1}).__lookupSetter__("a"), undefined);