Bug 1358073 - Handle destruction of scope data correctly r=shu a=abillings

This commit is contained in:
Jon Coppeard 2017-05-22 14:01:19 -04:00
parent fcf175b16a
commit acf1ca5525

View File

@ -565,7 +565,7 @@ LexicalScope::XDR(XDRState<mode>* xdr, ScopeKind kind, HandleScope enclosing,
{
auto deleteOnLeave = MakeScopeExit([&data]() {
if (mode == XDR_DECODE)
js_delete(data.get());
DeleteScopeData(data.get());
});
uint32_t firstFrameSlot;
@ -877,7 +877,7 @@ VarScope::XDR(XDRState<mode>* xdr, ScopeKind kind, HandleScope enclosing,
{
auto deleteOnLeave = MakeScopeExit([&data]() {
if (mode == XDR_DECODE)
js_delete(data.get());
DeleteScopeData(data.get());
});
uint8_t needsEnvironment;