mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-02 13:58:40 +09:00
1320408 - Part 12: Change JSScript::sourceData to static method.
This commit is contained in:
parent
56a4517a1f
commit
d208cccd10
9 changed files with 16 additions and 15 deletions
|
|
@ -4405,14 +4405,15 @@ JS_DecompileScript(JSContext* cx, HandleScript script, const char* name, unsigne
|
|||
|
||||
AssertHeapIsIdle(cx);
|
||||
CHECK_REQUEST(cx);
|
||||
script->ensureNonLazyCanonicalFunction(cx);
|
||||
script->ensureNonLazyCanonicalFunction();
|
||||
RootedFunction fun(cx, script->functionNonDelazifying());
|
||||
if (fun)
|
||||
return JS_DecompileFunction(cx, fun, indent);
|
||||
bool haveSource = script->scriptSource()->hasSourceData();
|
||||
if (!haveSource && !JSScript::loadSource(cx, script->scriptSource(), &haveSource))
|
||||
return nullptr;
|
||||
return haveSource ? script->sourceData(cx) : NewStringCopyZ<CanGC>(cx, "[no source]");
|
||||
return haveSource ? JSScript::sourceData(cx, script)
|
||||
: NewStringCopyZ<CanGC>(cx, "[no source]");
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(JSString*)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue