Bug 1246318 - Remove the still disabled Reflect.enumerate code. r=efaust

This commit is contained in:
Tom Schuster 2016-02-11 22:23:13 +01:00
parent 4ea53b41cd
commit 9540aa67c8
4 changed files with 0 additions and 31 deletions

View File

@ -177,33 +177,6 @@ Reflect_deleteProperty(JSContext* cx, unsigned argc, Value* vp)
return true;
}
#if 0
/*
* ES6 26.1.5 Reflect.enumerate(target)
*
* TODO:
* - redefine enumeration in terms of iterators without losing performance
* - support iterators in Proxies
*/
static bool
Reflect_enumerate(JSContext* cx, unsigned argc, Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
// Step 1.
RootedObject obj(cx, NonNullObject(cx, args.get(0)));
if (!obj)
return false;
// Step 2.
RootedObject iterator(cx);
if (!Enumerate(cx, obj, &iterator))
return false;
args.rval().setObject(*iterator);
return true;
}
#endif
/* ES6 26.1.6 Reflect.get(target, propertyKey [, receiver]) */
static bool
Reflect_get(JSContext* cx, unsigned argc, Value* vp)
@ -380,7 +353,6 @@ static const JSFunctionSpec methods[] = {
JS_FN("construct", Reflect_construct, 2, 0),
JS_FN("defineProperty", Reflect_defineProperty, 3, 0),
JS_FN("deleteProperty", Reflect_deleteProperty, 2, 0),
// JS_FN("enumerate", Reflect_enumerate, 1, 0),
JS_FN("get", Reflect_get, 2, 0),
JS_FN("getOwnPropertyDescriptor", Reflect_getOwnPropertyDescriptor, 2, 0),
JS_FN("getPrototypeOf", Reflect_getPrototypeOf, 1, 0),

View File

@ -804,7 +804,6 @@ js::GetIterator(JSContext* cx, HandleObject obj, unsigned flags, MutableHandleOb
// We should only call the enumerate trap for "for-in".
// Or when we call GetIterator from the Proxy [[Enumerate]] hook.
// In the future also for Reflect.enumerate.
// JSITER_ENUMERATE is just an optimization and the same
// as flags == 0 otherwise.
if (flags == 0 || flags == JSITER_ENUMERATE) {

View File

@ -21,7 +21,6 @@ var methods = {
construct: 2,
defineProperty: 3,
deleteProperty: 2,
//enumerate: 1,
get: 2,
getOwnPropertyDescriptor: 2,
getPrototypeOf: 1,

View File

@ -10,7 +10,6 @@ var methodInfo = {
construct: [[]],
defineProperty: ["x", {}],
deleteProperty: ["x"],
//enumerate: [],
get: ["x", {}],
getOwnPropertyDescriptor: ["x"],
getPrototypeOf: [],