summaryrefslogtreecommitdiff
path: root/dom/bindings
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-12-23 01:21:32 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-12-23 01:21:32 +0100
commitfdb0ff681642e19bf4f65b9b3c23996fb95dfb96 (patch)
treea29e4a650eb24035522b2126f9eeffd992b709eb /dom/bindings
parent19e834e0e423459507a0c2f7504bda84d6fa3f02 (diff)
downloadaura-central-fdb0ff681642e19bf4f65b9b3c23996fb95dfb96.tar.gz
Issue mcp-graveyard/UXP%1118 - Part 9: Don't allow reuse of unlinked CallbackObjectHolder.
Diffstat (limited to 'dom/bindings')
-rw-r--r--dom/bindings/CallbackObject.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/dom/bindings/CallbackObject.h b/dom/bindings/CallbackObject.h
index 8a3d45dfc..5cc98fd5d 100644
--- a/dom/bindings/CallbackObject.h
+++ b/dom/bindings/CallbackObject.h
@@ -514,8 +514,9 @@ private:
{
// NS_IF_RELEASE because we might have been unlinked before
nsISupports* ptr = GetISupports();
- NS_IF_RELEASE(ptr);
+ // Clear mPtrBits before the release to prevent reentrance.
mPtrBits = 0;
+ NS_IF_RELEASE(ptr);
}
uintptr_t mPtrBits;