mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 11:26:09 +00:00
1559fd3d00
This fix is completely speculative, but I have strong reason to believe that we are having lifetime issues, and that refcount stabilization might be coming into play. The situation is this: Suppose we're aggregating an object, so we pass |this| as the outer IUnknown. The inner object might perform AddRef() and Release() on |this| during its initialization. But if we're in the process of creating the outer object, that refcount might not yet have been incremented by 1, so the inner object's invocation of the outer object's Release() could trigger a deletion. The way around this is to temporarily bump the refcount when aggregating another object. The key, though, is to not do this via AddRef() and Release(), but by direct maniuplation of the refcount variable, so that we don't trigger any of the self-deletion stuff. MozReview-Commit-ID: 3WA2AJvb6jY --HG-- extra : rebase_source : ab05a52760541a4ab11f1245a5ddeae938998047 |
||
---|---|---|
.. | ||
oop | ||
ActivationContext.cpp | ||
ActivationContext.h | ||
Aggregation.h | ||
AgileReference.cpp | ||
AgileReference.h | ||
AsyncInvoker.h | ||
COMApartmentRegion.h | ||
COMPtrHolder.h | ||
DispatchForwarder.cpp | ||
DispatchForwarder.h | ||
DynamicallyLinkedFunctionPtr.h | ||
EnsureMTA.cpp | ||
EnsureMTA.h | ||
FastMarshaler.cpp | ||
FastMarshaler.h | ||
IHandlerProvider.h | ||
Interceptor.cpp | ||
Interceptor.h | ||
InterceptorLog.cpp | ||
InterceptorLog.h | ||
MainThreadClientInfo.cpp | ||
MainThreadClientInfo.h | ||
MainThreadHandoff.cpp | ||
MainThreadHandoff.h | ||
MainThreadInvoker.cpp | ||
MainThreadInvoker.h | ||
MainThreadRuntime.cpp | ||
MainThreadRuntime.h | ||
moz.build | ||
Objref.cpp | ||
Objref.h | ||
PassthruProxy.cpp | ||
PassthruProxy.h | ||
ProxyStream.cpp | ||
ProxyStream.h | ||
Ptr.h | ||
Registration.cpp | ||
Registration.h | ||
RegistrationAnnotator.cpp | ||
RegistrationAnnotator.h | ||
SpinEvent.cpp | ||
SpinEvent.h | ||
StructStream.cpp | ||
StructStream.h | ||
Utils.cpp | ||
Utils.h | ||
VTableBuilder.c | ||
VTableBuilder.h | ||
WeakRef.cpp | ||
WeakRef.h |