Bug 1246122 - Don't crash in InvokeInterruptCallback if there are no JS scripts on the stack. r=shu

This commit is contained in:
Jan de Mooij 2016-02-08 13:01:04 +01:00
parent 8e4b9d2930
commit 48f722ad99

View File

@ -580,7 +580,7 @@ InvokeInterruptCallback(JSContext* cx)
// invoke the onStep handler.
if (cx->compartment()->isDebuggee()) {
ScriptFrameIter iter(cx);
if (iter.script()->stepModeEnabled()) {
if (!iter.done() && iter.script()->stepModeEnabled()) {
RootedValue rval(cx);
switch (Debugger::onSingleStep(cx, &rval)) {
case JSTRAP_ERROR: