This commit is contained in:
Andreas Gal 2008-11-16 13:53:02 -08:00
commit 78fbb9e673
3 changed files with 22 additions and 1 deletions

View File

@ -2579,7 +2579,10 @@ js_Interpret(JSContext *cx)
tr = TRACE_RECORDER(cx);
SET_TRACE_RECORDER(cx, NULL);
JS_TRACE_MONITOR(cx).onTrace = JS_FALSE;
tr->pushAbortStack();
if (tr->wasDeepAborted())
tr->removeFragmentoReferences();
else
tr->pushAbortStack();
}
#endif

View File

@ -1060,6 +1060,14 @@ TraceRecorder::~TraceRecorder()
{
JS_ASSERT(nextRecorderToAbort == NULL);
JS_ASSERT(treeInfo && (fragment || wasDeepAborted()));
#ifdef DEBUG
TraceRecorder* tr = JS_TRACE_MONITOR(cx).abortStack;
while (tr != NULL)
{
JS_ASSERT(this != tr);
tr = tr->nextRecorderToAbort;
}
#endif
if (fragment) {
if (wasRootFragment && !fragment->root->code()) {
JS_ASSERT(!fragment->root->vmprivate);

View File

@ -1866,6 +1866,16 @@ function testClosingRecursion() {
testClosingRecursion.expected = true;
test(testClosingRecursion);
// Test no assert or crash from outer recorders (bug 465145)
function testBug465145() {
this.__defineSetter__("x", function(){});
this.watch("x", function(){});
y = this;
for (var z = 0; z < 2; ++z) { x = y };
this.__defineSetter__("x", function(){});
for (var z = 0; z < 2; ++z) { x = y };
}
// BEGIN MANDELBROT STUFF
// XXXbz I would dearly like to wrap it up into a function to avoid polluting
// the global scope, but the function ends up heavyweight, and then we lose on