mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
Bug 1574180 - Part 4: Update comment for "name" property of TypeErrorThrower. r=khyperia
Depends on D42155 Differential Revision: https://phabricator.services.mozilla.com/D42156 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
2900da90f1
commit
6449cb3bd4
@ -500,10 +500,8 @@ JSObject* GlobalObject::getOrCreateThrowTypeError(
|
||||
}
|
||||
MOZ_ASSERT(lengthResult);
|
||||
|
||||
// Non-standard: Also change "name" to non-configurable. ECMAScript defines
|
||||
// %ThrowTypeError% as an anonymous function, i.e. it shouldn't actually
|
||||
// get an own "name" property. To be consistent with other built-in,
|
||||
// anonymous functions, we don't delete %ThrowTypeError%'s "name" property.
|
||||
// The "name" property of %ThrowTypeError% is non-configurable, adjust
|
||||
// the default property attributes accordingly.
|
||||
RootedId nameId(cx, NameToId(cx->names().name));
|
||||
ObjectOpResult nameResult;
|
||||
if (!NativeDefineProperty(cx, throwTypeError, nameId, nonConfigurableDesc,
|
||||
|
Loading…
Reference in New Issue
Block a user