diff --git a/js/src/vm/Stack-inl.h b/js/src/vm/Stack-inl.h index dd2a87d6844b..7304799f2022 100644 --- a/js/src/vm/Stack-inl.h +++ b/js/src/vm/Stack-inl.h @@ -531,6 +531,8 @@ ContextStack::currentScript(jsbytecode **ppc) const if (fp->beginsIonActivation()) { JSScript *script = NULL; ion::GetPcScript(cx_, &script, ppc); + if (script->compartment() != cx_->compartment) + return NULL; return script; } #endif