Bug 1690530 - Part 7: Remove XDRState::codeFunction. r=tcampbell

Differential Revision: https://phabricator.services.mozilla.com/D103927
This commit is contained in:
Tooru Fujisawa 2021-02-08 13:08:33 +00:00
parent 2664ed54da
commit 13d6ec9e46
3 changed files with 0 additions and 33 deletions

View File

@ -46,9 +46,7 @@ class JSLinearString;
_(BytecodeFoldConstants) \
_(BytecodeNameFunctions) \
_(DecodeScript) \
_(DecodeFunction) \
_(EncodeScript) \
_(EncodeFunction) \
_(Scripts) \
_(VM) \
_(CompressSource) \

View File

@ -350,35 +350,6 @@ static XDRResult XDRChunkCount(XDRState<mode>* xdr, uint32_t* sliceCount) {
return xdr->codeUint32(sliceCount);
}
template <XDRMode mode>
XDRResult XDRState<mode>::codeFunction(MutableHandleFunction funp,
HandleScriptSourceObject sourceObject) {
TraceLoggerThread* logger = TraceLoggerForCurrentThread(cx());
TraceLoggerTextId event = mode == XDR_DECODE ? TraceLogger_DecodeFunction
: TraceLogger_EncodeFunction;
AutoTraceLog tl(logger, event);
#ifdef DEBUG
auto sanityCheck = mozilla::MakeScopeExit(
[&] { MOZ_ASSERT(validateResultCode(cx(), resultCode())); });
#endif
auto guard = mozilla::MakeScopeExit([&] { funp.set(nullptr); });
RootedScope scope(cx(), &cx()->global()->emptyGlobalScope());
if (mode == XDR_DECODE) {
MOZ_ASSERT(!sourceObject);
funp.set(nullptr);
} else {
MOZ_ASSERT(!sourceObject);
MOZ_ASSERT(funp->enclosingScope()->is<GlobalScope>());
}
MOZ_TRY(VersionCheck(this, XDRFormatType::JSScript));
MOZ_TRY(XDRInterpretedFunction(this, scope, sourceObject, funp));
guard.release();
return Ok();
}
template <XDRMode mode>
XDRResult XDRState<mode>::codeScript(MutableHandleScript scriptp) {
TraceLoggerThread* logger = TraceLoggerForCurrentThread(cx());

View File

@ -475,8 +475,6 @@ class XDRState : public XDRCoderBase {
XDRResult codeCharsZ(XDRTranscodeString<char16_t>& buffer);
XDRResult codeModuleObject(MutableHandleModuleObject modp);
XDRResult codeFunction(JS::MutableHandleFunction objp,
HandleScriptSourceObject sourceObject = nullptr);
XDRResult codeScript(MutableHandleScript scriptp);
XDRResult codeStencil(frontend::CompilationStencil& stencil);
XDRResult codeFunctionStencil(frontend::BaseCompilationStencil& stencil);