Issue #1118 - Part 9: Don't allow reuse of unlinked CallbackObjectHolder.

This commit is contained in:
wolfbeast 2019-12-23 01:21:32 +01:00 • committed by Roy Tam
commit 4103320dde

View file

@ -514,8 +514,9 @@ private:
{ {
// NS_IF_RELEASE because we might have been unlinked before // NS_IF_RELEASE because we might have been unlinked before
nsISupports* ptr = GetISupports(); nsISupports* ptr = GetISupports();
NS_IF_RELEASE(ptr); // Clear mPtrBits before the release to prevent reentrance.
mPtrBits = 0; mPtrBits = 0;
NS_IF_RELEASE(ptr);
} }
uintptr_t mPtrBits; uintptr_t mPtrBits;