summaryrefslogtreecommitdiffstats
path: root/dom/bindings/CallbackObject.h
diff options
context:
space:
mode:
Diffstat (limited to 'dom/bindings/CallbackObject.h')
-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 e995d44..141e725 100644
--- a/dom/bindings/CallbackObject.h
+++ b/dom/bindings/CallbackObject.h
@@ -479,8 +479,9 @@ class CallbackObjectHolder : CallbackObjectHolderBase {
void UnlinkSelf() {
// 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;