Bug 987442 - Correctly clear compile-time tracking frame for SPS when emitting OOL code. r=sstangl

This commit is contained in:
Kannan Vijayan 2014-03-26 13:06:04 -04:00
parent f71cba5543
commit de35048eca

View File

@ -291,6 +291,13 @@ class SPSInstrumentation
Vector<FrameState, 1, SystemAllocPolicy> frames;
FrameState *frame;
static void clearFrame(FrameState *frame) {
frame->script = nullptr;
frame->pc = nullptr;
frame->skipNext = false;
frame->left = 0;
}
public:
/*
* Creates instrumentation which writes information out the the specified
@ -333,10 +340,7 @@ class SPSInstrumentation
if (!frames.growBy(1))
return false;
frame = &frames[frames.length() - 1];
frame->script = nullptr;
frame->pc = nullptr;
frame->skipNext = false;
frame->left = 0;
clearFrame(frame);
return true;
}
@ -360,6 +364,7 @@ class SPSInstrumentation
}
frames[0].pc = frames[0].script->code();
frame = &frames[1];
clearFrame(frame);
return true;
}
void finishOOL() {