mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 14:28:39 +09:00
parent
3b34f87a5b
commit
748c69d7fd
30 changed files with 750 additions and 81 deletions
|
|
@ -1860,7 +1860,6 @@ CASE(EnableInterruptsPseudoOpcode)
|
|||
/* Various 1-byte no-ops. */
|
||||
CASE(JSOP_NOP)
|
||||
CASE(JSOP_NOP_DESTRUCTURING)
|
||||
CASE(JSOP_UNUSED182)
|
||||
CASE(JSOP_UNUSED183)
|
||||
CASE(JSOP_UNUSED187)
|
||||
CASE(JSOP_UNUSED192)
|
||||
|
|
@ -3482,6 +3481,19 @@ CASE(JSOP_TOASYNC)
|
|||
}
|
||||
END_CASE(JSOP_TOASYNC)
|
||||
|
||||
CASE(JSOP_SETFUNNAME)
|
||||
{
|
||||
MOZ_ASSERT(REGS.stackDepth() >= 2);
|
||||
FunctionPrefixKind prefixKind = FunctionPrefixKind(GET_UINT8(REGS.pc));
|
||||
ReservedRooted<Value> name(&rootValue0, REGS.sp[-1]);
|
||||
ReservedRooted<JSFunction*> fun(&rootFunction0, ®S.sp[-2].toObject().as<JSFunction>());
|
||||
if (!SetFunctionNameIfNoOwnName(cx, fun, name, prefixKind))
|
||||
goto error;
|
||||
|
||||
REGS.sp--;
|
||||
}
|
||||
END_CASE(JSOP_SETFUNNAME)
|
||||
|
||||
CASE(JSOP_CALLEE)
|
||||
MOZ_ASSERT(REGS.fp()->isFunctionFrame());
|
||||
PUSH_COPY(REGS.fp()->calleev());
|
||||
|
|
@ -4343,7 +4355,7 @@ js::DefFunOperation(JSContext* cx, HandleScript script, HandleObject envChain,
|
|||
parent = parent->enclosingEnvironment();
|
||||
|
||||
/* ES5 10.5 (NB: with subsequent errata). */
|
||||
RootedPropertyName name(cx, fun->name()->asPropertyName());
|
||||
RootedPropertyName name(cx, fun->explicitName()->asPropertyName());
|
||||
|
||||
RootedShape shape(cx);
|
||||
RootedObject pobj(cx);
|
||||
|
|
@ -4991,7 +5003,7 @@ js::ReportRuntimeLexicalError(JSContext* cx, unsigned errorNumber,
|
|||
RootedPropertyName name(cx);
|
||||
|
||||
if (op == JSOP_THROWSETCALLEE) {
|
||||
name = script->functionNonDelazifying()->name()->asPropertyName();
|
||||
name = script->functionNonDelazifying()->explicitName()->asPropertyName();
|
||||
} else if (IsLocalOp(op)) {
|
||||
name = FrameSlotName(script, pc)->asPropertyName();
|
||||
} else if (IsAtomOp(op)) {
|
||||
|
|
@ -5059,8 +5071,8 @@ js::ThrowUninitializedThis(JSContext* cx, AbstractFramePtr frame)
|
|||
if (fun->isDerivedClassConstructor()) {
|
||||
const char* name = "anonymous";
|
||||
JSAutoByteString str;
|
||||
if (fun->name()) {
|
||||
if (!AtomToPrintableString(cx, fun->name(), &str))
|
||||
if (fun->explicitName()) {
|
||||
if (!AtomToPrintableString(cx, fun->explicitName(), &str))
|
||||
return false;
|
||||
name = str.ptr();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue