mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1690530
- Part 7: Remove XDRState::codeFunction. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D103927
This commit is contained in:
parent
2664ed54da
commit
13d6ec9e46
@ -46,9 +46,7 @@ class JSLinearString;
|
||||
_(BytecodeFoldConstants) \
|
||||
_(BytecodeNameFunctions) \
|
||||
_(DecodeScript) \
|
||||
_(DecodeFunction) \
|
||||
_(EncodeScript) \
|
||||
_(EncodeFunction) \
|
||||
_(Scripts) \
|
||||
_(VM) \
|
||||
_(CompressSource) \
|
||||
|
@ -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());
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user