From fcfaa4fbee917f821806a70b2000a91a97948c11 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sat, 8 Jun 2019 21:29:59 -0400 Subject: 1320408 - Change JSScript::sourceDataWithPrelude to static method UXP Interdiff --- js/src/jsscript.cpp | 8 ++++---- js/src/jsscript.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/src/jsscript.cpp b/js/src/jsscript.cpp index 36060e4c0e..ddc98ef3fc 100644 --- a/js/src/jsscript.cpp +++ b/js/src/jsscript.cpp @@ -1442,11 +1442,11 @@ JSScript::sourceData(JSContext* cx, HandleScript script) return script->scriptSource()->substring(cx, script->sourceStart(), script->sourceEnd()); } -JSFlatString* -JSScript::sourceDataWithPrelude(JSContext* cx) +/* static */ JSFlatString* +JSScript::sourceDataWithPrelude(JSContext* cx, HandleScript script) { - MOZ_ASSERT(scriptSource()->hasSourceData()); - return scriptSource()->substring(cx, preludeStart(), sourceEnd()); + MOZ_ASSERT(script->scriptSource()->hasSourceData()); + return script->scriptSource()->substring(cx, script->preludeStart(), script->sourceEnd()); } UncompressedSourceCache::AutoHoldEntry::AutoHoldEntry() diff --git a/js/src/jsscript.h b/js/src/jsscript.h index 74cefea07b..62502a3c7c 100644 --- a/js/src/jsscript.h +++ b/js/src/jsscript.h @@ -1519,7 +1519,7 @@ class JSScript : public js::gc::TenuredCell bool mayReadFrameArgsDirectly(); static JSFlatString* sourceData(JSContext* cx, JS::HandleScript script); - JSFlatString* sourceDataWithPrelude(JSContext* cx); + static JSFlatString* sourceDataWithPrelude(JSContext* cx, JS::HandleScript script); static bool loadSource(JSContext* cx, js::ScriptSource* ss, bool* worked); -- cgit v1.2.3