mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 09:54:42 +00:00
Bug 1704976
- Remove JSID_IS_ATOM from js/src/vm/JSFunction.cpp. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D112074
This commit is contained in:
parent
2e0083230a
commit
3c420bb194
@ -460,7 +460,7 @@ bool JSFunction::hasNonConfigurablePrototypeDataProperty() {
|
||||
}
|
||||
|
||||
static bool fun_mayResolve(const JSAtomState& names, jsid id, JSObject*) {
|
||||
if (!JSID_IS_ATOM(id)) {
|
||||
if (!id.isAtom()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -470,13 +470,13 @@ static bool fun_mayResolve(const JSAtomState& names, jsid id, JSObject*) {
|
||||
|
||||
static bool fun_resolve(JSContext* cx, HandleObject obj, HandleId id,
|
||||
bool* resolvedp) {
|
||||
if (!JSID_IS_ATOM(id)) {
|
||||
if (!id.isAtom()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
RootedFunction fun(cx, &obj->as<JSFunction>());
|
||||
|
||||
if (JSID_IS_ATOM(id, cx->names().prototype)) {
|
||||
if (id.isAtom(cx->names().prototype)) {
|
||||
if (!fun->needsPrototypeProperty()) {
|
||||
return true;
|
||||
}
|
||||
@ -489,8 +489,8 @@ static bool fun_resolve(JSContext* cx, HandleObject obj, HandleId id,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool isLength = JSID_IS_ATOM(id, cx->names().length);
|
||||
if (isLength || JSID_IS_ATOM(id, cx->names().name)) {
|
||||
bool isLength = id.isAtom(cx->names().length);
|
||||
if (isLength || id.isAtom(cx->names().name)) {
|
||||
MOZ_ASSERT(!IsInternalFunctionObject(*obj));
|
||||
|
||||
RootedValue v(cx);
|
||||
@ -2290,7 +2290,7 @@ JSAtom* js::IdToFunctionName(
|
||||
MOZ_ASSERT(JSID_IS_STRING(id) || JSID_IS_SYMBOL(id) || JSID_IS_INT(id));
|
||||
|
||||
// No prefix fastpath.
|
||||
if (JSID_IS_ATOM(id) && prefixKind == FunctionPrefixKind::None) {
|
||||
if (id.isAtom() && prefixKind == FunctionPrefixKind::None) {
|
||||
return JSID_TO_ATOM(id);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user