mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1644581 - Remove Iterator.prototype[@@toStringTag]. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D78983
This commit is contained in:
parent
2ae77fdd0a
commit
f294aa213c
@ -746,7 +746,6 @@ shell-option(--enable-iterator-helpers) script non262/Iterator/constructor.js
|
||||
shell-option(--enable-iterator-helpers) script non262/Iterator/constructor-subclassable.js
|
||||
shell-option(--enable-iterator-helpers) script non262/Iterator/constructor-throw-when-called-directly.js
|
||||
shell-option(--enable-iterator-helpers) script non262/Iterator/constructor-throw-without-new.js
|
||||
shell-option(--enable-iterator-helpers) script non262/Iterator/toStringTag.js
|
||||
shell-option(--enable-iterator-helpers) script non262/Iterator/from/call-from-with-different-this.js
|
||||
shell-option(--enable-iterator-helpers) script non262/Iterator/from/Iterator.from-descriptor.js
|
||||
shell-option(--enable-iterator-helpers) script non262/Iterator/from/Iterator.from-length.js
|
||||
|
@ -10,5 +10,8 @@ assertEq(propDesc.writable, false);
|
||||
assertEq(propDesc.enumerable, false);
|
||||
assertEq(propDesc.configurable, false);
|
||||
|
||||
// Make sure @@toStringTag hasn't been set.
|
||||
assertEq(Symbol.toStringTag in propDesc.value, false);
|
||||
|
||||
if (typeof reportCompare === 'function')
|
||||
reportCompare(0, 0);
|
||||
|
@ -1,12 +0,0 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty('Iterator')) -- Iterator is not enabled unconditionally
|
||||
const propDesc = Reflect.getOwnPropertyDescriptor(Iterator.prototype, Symbol.toStringTag);
|
||||
assertEq(propDesc.value, 'Iterator');
|
||||
assertEq(propDesc.writable, false);
|
||||
assertEq(propDesc.enumerable, false);
|
||||
assertEq(propDesc.configurable, true);
|
||||
|
||||
class TestIterator extends Iterator {}
|
||||
assertEq(new TestIterator().toString(), '[object Iterator]');
|
||||
|
||||
if (typeof reportCompare == 'function')
|
||||
reportCompare(0, 0);
|
@ -1523,11 +1523,6 @@ static const JSFunctionSpec iterator_methods_with_helpers[] = {
|
||||
JS_SELF_HOSTED_SYM_FN(iterator, "IteratorIdentity", 0, 0),
|
||||
JS_FS_END};
|
||||
|
||||
static const JSPropertySpec iterator_properties[] = {
|
||||
JS_STRING_SYM_PS(toStringTag, js_Iterator_str, JSPROP_READONLY),
|
||||
JS_PS_END,
|
||||
};
|
||||
|
||||
/* static */
|
||||
bool GlobalObject::initIteratorProto(JSContext* cx,
|
||||
Handle<GlobalObject*> global) {
|
||||
@ -1666,7 +1661,7 @@ static const ClassSpec IteratorObjectClassSpec = {
|
||||
iterator_static_methods,
|
||||
nullptr,
|
||||
iterator_methods_with_helpers,
|
||||
iterator_properties,
|
||||
nullptr,
|
||||
nullptr,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user