/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
if (!mStreamList || !mStreamList->ShouldOpenStreamFor(aId)) {
aResolver(nullptr); return;
}
// Make sure to add ourself as a Listener even thought we are using // a separate resolver function to signal the completion of the // operation. The Manager uses the existence of the Listener to ensure // that its safe to complete the operation.
mStreamList->GetManager().ExecuteOpenStream(this, std::move(aResolver), aId);
}
void CacheStreamControlParent::LostIPCCleanup(
SafeRefPtr<StreamList> aStreamList) {
NS_ASSERT_OWNINGTHREAD(CacheStreamControlParent);
CloseAllReadStreamsWithoutReporting(); // If the initial SendPStreamControlConstructor() fails we will // be called before mStreamList is set. if (!aStreamList) { return;
}
aStreamList->GetManager().RemoveListener(this); #ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
aStreamList->GetManager().RecordHaveDeletedCSCP(Id()); #endif
aStreamList->RemoveStreamControl(this);
aStreamList->NoteClosedAll();
mStreamList = nullptr;
}
void CacheStreamControlParent::AssertWillDelete() { #ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED // If we cannot send, Send__delete__ will not do any cleanup. // But if we are still unfreed, that might be wrong. if (mStreamList && !CanSend()) {
MOZ_ASSERT(false, "Attempt to delete blocking CSCP that cannot send.");
mStreamList->GetManager().RecordMayNotDeleteCSCP(Id());
} #endif
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.