1320408 - Change JSScript::sourceDataWithPrelude to static method

UXP Interdiff
This commit is contained in:
Gaming4JC 2019-06-08 21:29:59 -04:00 committed by Roy Tam
commit 68b04671cb
2 changed files with 5 additions and 5 deletions

View file

@ -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()

View file

@ -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);