diff --git a/js/xpconnect/tests/unit/test_bug809652.js b/js/xpconnect/tests/unit/test_bug809652.js index 3fef53786efc..65bfdf7c19ad 100644 --- a/js/xpconnect/tests/unit/test_bug809652.js +++ b/js/xpconnect/tests/unit/test_bug809652.js @@ -37,17 +37,11 @@ function run_test() { checkThrows("DataView.prototype.getInt8.call(dv, 0);", sb); /* Now that Date is on Xrays, these should all throw. */ - /* XXXbholley - We have to remove the old tests in this patch, because we're - removing the machinery that made them possible. But they won't fully behave - in an Xray-like way until the later patch where we turn on Xray-to-Date. So - we update the tests to the new behavior here but leave them commented out, - and uncomment them in the final patch. checkThrows("Date.prototype.getYear.call(d)", sb); checkThrows("Date.prototype.valueOf.call(d)", sb); checkThrows("d.valueOf()", sb); checkThrows("Date.prototype.toString.call(d)", sb); checkThrows("d.toString()", sb); - */ /* Typed arrays. */ function testForTypedArray(t) { diff --git a/js/xpconnect/wrappers/XrayWrapper.cpp b/js/xpconnect/wrappers/XrayWrapper.cpp index 08540bde81f3..802dacc1f9cc 100644 --- a/js/xpconnect/wrappers/XrayWrapper.cpp +++ b/js/xpconnect/wrappers/XrayWrapper.cpp @@ -42,7 +42,12 @@ using namespace XrayUtils; static bool IsJSXraySupported(JSProtoKey key) { - return false; + switch (key) { + case JSProto_Date: + return true; + default: + return false; + } } XrayType