Bug 1587638: Add testcase to check GC barriers during XDR encoding/decoding r=tcampbell

Depends on D48782

Differential Revision: https://phabricator.services.mozilla.com/D48783

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Iain Ireland 2019-10-31 21:12:51 +00:00
parent 65c313ae8e
commit e084acf2f4

View File

@ -0,0 +1,12 @@
gczeal(4);
evalWithCache(`
var obj = { a: 1, b: 2 };
obj.a++;
assertEq(obj.a, 2);
`);
function evalWithCache(code) {
code = cacheEntry(code);
ctx_save = Object.create({}, { saveIncrementalBytecode: { value: true } });
var res1 = evaluate(code, ctx_save);
var res2 = evaluate(code, Object.create(ctx_save, {}));
}