зеркало из https://github.com/mozilla/gecko-dev.git
Bug 975042 - Enable JS Xray for the Date object. r=peterv
This commit is contained in:
Родитель
838db9bb08
Коммит
1973d9aa6a
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче