mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-19 10:53:11 +09:00
parent
3b34f87a5b
commit
748c69d7fd
30 changed files with 750 additions and 81 deletions
|
|
@ -2095,7 +2095,7 @@ DefinePropertyById(JSContext* cx, HandleObject obj, HandleId id, HandleValue val
|
|||
getter != JS_PropertyStub && setter != JS_StrictPropertyStub)
|
||||
{
|
||||
if (getter && !(attrs & JSPROP_GETTER)) {
|
||||
RootedAtom atom(cx, IdToFunctionName(cx, id, "get"));
|
||||
RootedAtom atom(cx, IdToFunctionName(cx, id, FunctionPrefixKind::Get));
|
||||
if (!atom)
|
||||
return false;
|
||||
JSFunction* getobj = NewNativeFunction(cx, (Native) getter, 0, atom);
|
||||
|
|
@ -2111,7 +2111,7 @@ DefinePropertyById(JSContext* cx, HandleObject obj, HandleId id, HandleValue val
|
|||
if (setter && !(attrs & JSPROP_SETTER)) {
|
||||
// Root just the getter, since the setter is not yet a JSObject.
|
||||
AutoRooterGetterSetter getRoot(cx, JSPROP_GETTER, &getter, nullptr);
|
||||
RootedAtom atom(cx, IdToFunctionName(cx, id, "set"));
|
||||
RootedAtom atom(cx, IdToFunctionName(cx, id, FunctionPrefixKind::Set));
|
||||
if (!atom)
|
||||
return false;
|
||||
JSFunction* setobj = NewNativeFunction(cx, (Native) setter, 1, atom);
|
||||
|
|
@ -3615,7 +3615,7 @@ JS_GetFunctionObject(JSFunction* fun)
|
|||
JS_PUBLIC_API(JSString*)
|
||||
JS_GetFunctionId(JSFunction* fun)
|
||||
{
|
||||
return fun->name();
|
||||
return fun->explicitName();
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(JSString*)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue