Bug 1174796 - Make sure ReleaseNow releases everything. r=smaug

This commit is contained in:
Andrew McCreight 2015-06-16 14:19:07 -07:00
parent 980fa2f4e0
commit a76f4f6119
2 changed files with 5 additions and 4 deletions

View File

@ -1113,7 +1113,7 @@ IncrementalFinalizeRunnable::ReleaseNow(bool aLimited)
break;
}
} else {
function.run(UINT32_MAX, function.data);
while (!function.run(UINT32_MAX, function.data));
++mFinalizeFunctionToRun;
}
} while (mFinalizeFunctionToRun < mDeferredFinalizeFunctions.Length());

View File

@ -16,9 +16,10 @@ namespace mozilla {
// the array.
typedef void* (*DeferredFinalizeAppendFunction)(void* aPointers, void* aThing);
// Called to finalize a number of objects. Slice is the number of objects
// to finalize, or if it's UINT32_MAX, all objects should be finalized.
// Return value indicates whether it finalized all objects in the buffer.
// Called to finalize a number of objects. Slice is the number of objects to
// finalize. The return value indicates whether it finalized all objects in the
// buffer. If it returns true, the function will not be called again, so the
// function should free aData.
typedef bool (*DeferredFinalizeFunction)(uint32_t aSlice, void* aData);
void DeferredFinalize(DeferredFinalizeAppendFunction aAppendFunc,