mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 920322 - Support encoding/decoding singletons. r=luke
This commit is contained in:
parent
a8b3fdf7d0
commit
63b76e46c1
@ -414,7 +414,8 @@ js::XDRScript(XDRState<mode> *xdr, HandleObject enclosingScope, HandleScript enc
|
||||
OwnSource,
|
||||
ExplicitUseStrict,
|
||||
SelfHosted,
|
||||
IsCompileAndGo
|
||||
IsCompileAndGo,
|
||||
HasSingleton
|
||||
};
|
||||
|
||||
uint32_t length, lineno, nslots;
|
||||
@ -510,7 +511,8 @@ js::XDRScript(XDRState<mode> *xdr, HandleObject enclosingScope, HandleScript enc
|
||||
scriptBits |= (1 << IsStarGenerator);
|
||||
if (script->compileAndGo())
|
||||
scriptBits |= (1 << IsCompileAndGo);
|
||||
JS_ASSERT(!script->hasSingletons());
|
||||
if (script->hasSingletons())
|
||||
scriptBits |= (1 << HasSingleton);
|
||||
}
|
||||
|
||||
if (!xdr->codeUint32(&prologLength))
|
||||
@ -619,6 +621,8 @@ js::XDRScript(XDRState<mode> *xdr, HandleObject enclosingScope, HandleScript enc
|
||||
script->isGeneratorExp_ = true;
|
||||
if (scriptBits & (1 << IsCompileAndGo))
|
||||
script->compileAndGo_ = true;
|
||||
if (scriptBits & (1 << HasSingleton))
|
||||
script->hasSingletons_ = true;
|
||||
|
||||
if (scriptBits & (1 << IsLegacyGenerator)) {
|
||||
JS_ASSERT(!(scriptBits & (1 << IsStarGenerator)));
|
||||
|
Loading…
Reference in New Issue
Block a user