summaryrefslogtreecommitdiffstats
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
commit8b88623463bf30ae7e5fcc64ef7d8d5fb62354c9 (patch)
treea29e4a650eb24035522b2126f9eeffd992b709eb /dom/bindings
parente0f0b34926b75c842a3228ea8d42b5bc44cacd9b (diff)
downloadUXP-8b88623463bf30ae7e5fcc64ef7d8d5fb62354c9.tar
UXP-8b88623463bf30ae7e5fcc64ef7d8d5fb62354c9.tar.gz
UXP-8b88623463bf30ae7e5fcc64ef7d8d5fb62354c9.tar.lz
UXP-8b88623463bf30ae7e5fcc64ef7d8d5fb62354c9.tar.xz
UXP-8b88623463bf30ae7e5fcc64ef7d8d5fb62354c9.zip
Issue #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;