Bug 1375446 - Check the return code of Sprinter::put in Disassemble1. r=nbp

This commit is contained in:
Tooru Fujisawa 2017-06-28 13:27:24 -07:00
Родитель c5545a71fe
Коммит 2715d11a70
2 изменённых файлов: 15 добавлений и 1 удалений

Просмотреть файл

@ -0,0 +1,13 @@
// |jit-test| allow-oom
if (!('oomTest' in this))
quit();
loadFile(`
disassemble(function() {
return assertDeepEq(x.concat(obj), [1, 2, 3, "hey"]);
})
`);
function loadFile(lfVarx) {
oomTest(new Function(lfVarx));
}

Просмотреть файл

@ -1615,7 +1615,8 @@ Disassemble1(JSContext* cx, HandleScript script, jsbytecode* pc,
if (!dumpStack())
return 0;
sp->put("\n");
if (!sp->put("\n"))
return 0;
return len;
}