Bug 1118535 - Don't let PBackgroundChild actors leak HANDLEs on Windows, r=mrbkap.

This commit is contained in:
Ben Turner 2015-01-06 20:20:27 -08:00
parent 2f67d9ecf5
commit 6ba66bae33

View File

@ -439,6 +439,11 @@ private:
threadLocalInfo->mActor->Close();
threadLocalInfo->mActor->AssertActorDestroyed();
ProcessHandle otherProcess = threadLocalInfo->mActor->OtherProcess();
if (otherProcess != kInvalidProcessHandle) {
base::CloseProcessHandle(otherProcess);
}
// Since the actor is created on the main thread it must only
// be released on the main thread as well.
if (!NS_IsMainThread()) {