Bug 1503071: Handle JS_UNINITIALIZED_LEXICAL in FormatValue r=tcampbell

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Iain Ireland 2018-11-09 18:13:34 +00:00
parent 824da429cb
commit f81c230821
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,16 @@
// |jit-test| exitstatus: 6
var g = true
setInterruptCallback(function() {
print(getBacktrace({args: true}));
});
function foo(bt, x=3, y = eval("g")) {
if (g) {
g = false
interruptIf(true);
foo(false);
}
(function() { n = bt;});
}
foo(false);

View File

@ -840,7 +840,9 @@ js::DumpScript(JSContext* cx, JSScript* scriptArg)
static const char*
FormatValue(JSContext* cx, HandleValue v, UniqueChars& bytes)
{
if (v.isMagic(JS_OPTIMIZED_OUT)) {
if (v.isMagic()) {
MOZ_ASSERT(v.whyMagic() == JS_OPTIMIZED_OUT ||
v.whyMagic() == JS_UNINITIALIZED_LEXICAL);
return "[unavailable]";
}