diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2019-06-08 21:10:15 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2019-07-18 22:38:24 -0400 |
commit | 93335c3120968fac165a95978ef0dbdffe7900b4 (patch) | |
tree | b5ce39ff2ef517de3c1f00eba6d7a810983d3aaf /js/src/jsapi.cpp | |
parent | 4d88f48fdb51a29fd66001e87a74e2d6a130fe1f (diff) | |
download | UXP-93335c3120968fac165a95978ef0dbdffe7900b4.tar UXP-93335c3120968fac165a95978ef0dbdffe7900b4.tar.gz UXP-93335c3120968fac165a95978ef0dbdffe7900b4.tar.lz UXP-93335c3120968fac165a95978ef0dbdffe7900b4.tar.xz UXP-93335c3120968fac165a95978ef0dbdffe7900b4.zip |
1320408 - Part 12: Change JSScript::sourceData to static method.
Diffstat (limited to 'js/src/jsapi.cpp')
-rw-r--r-- | js/src/jsapi.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index e2d572598..4e094adff 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -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*) |