Bug 1054929: Don't hand out stale fds from the TabChild cache. r=bent

This commit is contained in:
Kyle Huey 2014-08-27 12:15:30 -07:00
parent 031682e2b7
commit b2e7541e17
2 changed files with 8 additions and 1 deletions

View File

@ -1532,6 +1532,8 @@ TabChild::DestroyWindow()
runnable->Dispatch();
}
}
mCachedFileDescriptorInfos.Clear();
}
void

View File

@ -149,7 +149,12 @@ private:
FileDescriptor::PlatformHandleType handle =
FileDescriptor::PlatformHandleType(PR_FileDesc2NativeHandle(mFD));
mozilla::unused << tabParent->SendCacheFileDescriptor(mPath, FileDescriptor(handle));
// Our TabParent may have been destroyed already. If so, don't send any
// fds over, just go back to the IO thread and close them.
if (!tabParent->IsDestroyed()) {
mozilla::unused << tabParent->SendCacheFileDescriptor(mPath,
FileDescriptor(handle));
}
nsCOMPtr<nsIEventTarget> eventTarget;
mEventTarget.swap(eventTarget);