Bug 877826 - Make GetPcScript handle rectifier frames appropriately. r=jandem

This commit is contained in:
Kannan Vijayan 2013-07-11 18:26:35 -04:00
parent bac8f07fe0
commit c40bbe1f39

View File

@ -1049,6 +1049,15 @@ GetPcScript(JSContext *cx, JSScript **scriptRes, jsbytecode **pcRes)
// Recover the return address.
IonFrameIterator it(rt->mainThread.ionTop);
// If the previous frame is a rectifier frame (maybe unwound),
// skip past it.
if (it.prevType() == IonFrame_Rectifier || it.prevType() == IonFrame_Unwound_Rectifier) {
++it;
JS_ASSERT(it.prevType() == IonFrame_BaselineStub ||
it.prevType() == IonFrame_BaselineJS ||
it.prevType() == IonFrame_OptimizedJS);
}
// If the previous frame is a stub frame, skip the exit frame so that
// returnAddress below gets the return address into the BaselineJS
// frame.