Bug 975042 - Remove the special COW support for Date. r=peterv

As soon as Date is on Xrays, this stuff won't work anyway. Henceforth, content
access to chrome Date objects is forbidden, and APIs should use something like
|new contentWindow.Date()| for any Date object they wish to expose to content.
This commit is contained in:
Bobby Holley
2014-03-23 11:02:12 -03:00
parent e67815e22d
commit d987f5a41f
4 changed files with 13 additions and 28 deletions

View File

@@ -3179,19 +3179,3 @@ static const NativeImpl sReadOnlyDateMethods[] = {
date_toString_impl,
date_valueOf_impl
};
JS_FRIEND_API(bool)
js::IsReadOnlyDateMethod(IsAcceptableThis test, NativeImpl method)
{
/* Avoid a linear search in the common case by checking the |this| test. */
if (test != IsDate)
return false;
/* Linear search, comparing function pointers. */
unsigned max = sizeof(sReadOnlyDateMethods) / sizeof(sReadOnlyDateMethods[0]);
for (unsigned i = 0; i < max; ++i) {
if (method == sReadOnlyDateMethods[i])
return true;
}
return false;
}