Bug 975042 - Enable JS Xray for the Date object. r=peterv

This commit is contained in:
Bobby Holley 2014-03-23 11:02:14 -03:00
parent 37409460f3
commit 44c28bf386
2 changed files with 6 additions and 7 deletions

View File

@ -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) {

View File

@ -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