mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 00:38:39 +09:00
903389 - Fix uses of ClassMethodIsNative.
This commit is contained in:
parent
ee1e2aba19
commit
2391e18681
8 changed files with 73 additions and 71 deletions
|
|
@ -7478,10 +7478,10 @@ HasPureCoercion(JSContext* cx, HandleValue v)
|
|||
// coercions are not observable and coercion via ToNumber/ToInt32
|
||||
// definitely produces NaN/0. We should remove this special case later once
|
||||
// most apps have been built with newer Emscripten.
|
||||
jsid toString = NameToId(cx->names().toString);
|
||||
if (v.toObject().is<JSFunction>() &&
|
||||
HasObjectValueOf(&v.toObject(), cx) &&
|
||||
ClassMethodIsNative(cx, &v.toObject().as<JSFunction>(), &JSFunction::class_, toString, fun_toString))
|
||||
HasNoToPrimitiveMethodPure(&v.toObject(), cx) &&
|
||||
HasNativeMethodPure(&v.toObject(), cx->names().valueOf, obj_valueOf, cx) &&
|
||||
HasNativeMethodPure(&v.toObject(), cx->names().toString, fun_toString, cx))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue