void CacheStorageChild::ActorDestroy(ActorDestroyReason aReason) { NS_ASSERT_OWNINGTHREAD(CacheStorageChild); nsRefPtr<CacheStorage> listener = mListener; if (listener) { listener->DestroyInternal(this); // CacheStorage listener should call ClearListener() in DestroyInternal() MOZ_ASSERT(!mListener); } RemoveFeature(); }
void CachePushStreamChild::ActorDestroy(ActorDestroyReason aReason) { NS_ASSERT_OWNINGTHREAD(CachePushStreamChild); // If the parent side runs into a problem then the actor will be destroyed. // In this case we have not run OnEnd(), so still need to close the input // stream. if (!mClosed) { mStream->CloseWithStatus(NS_ERROR_ABORT); mClosed = true; } if (mCallback) { mCallback->ClearActor(); mCallback = nullptr; } RemoveFeature(); }