Bug 1715029 - Add some assertions, r=necko-reviewers,valentin

Differential Revision: https://phabricator.services.mozilla.com/D117631
This commit is contained in:
Kershaw Chang 2021-06-15 18:59:45 +00:00
Родитель 1b1f307613
Коммит 636c8d247e
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -465,7 +465,7 @@ nsresult nsHttpTransaction::Init(
static inline void CreateAndStartTimer(nsCOMPtr<nsITimer>& aTimer,
nsITimerCallback* aCallback,
uint32_t aTimeout) {
MOZ_ASSERT(OnSocketThread(), "not on socket thread");
MOZ_DIAGNOSTIC_ASSERT(OnSocketThread(), "not on socket thread");
MOZ_ASSERT(!aTimer);
if (!aTimeout) {
@ -3192,6 +3192,8 @@ uint32_t nsHttpTransaction::HTTPSSVCReceivedStage() {
}
void nsHttpTransaction::MaybeCancelFallbackTimer() {
MOZ_DIAGNOSTIC_ASSERT(OnSocketThread(), "not on socket thread");
if (mFastFallbackTimer) {
mFastFallbackTimer->Cancel();
mFastFallbackTimer = nullptr;
@ -3360,7 +3362,7 @@ void nsHttpTransaction::HandleFallback(
NS_IMETHODIMP
nsHttpTransaction::Notify(nsITimer* aTimer) {
MOZ_ASSERT(OnSocketThread(), "not on socket thread");
MOZ_DIAGNOSTIC_ASSERT(OnSocketThread(), "not on socket thread");
if (!gHttpHandler || !gHttpHandler->ConnMgr()) {
return NS_OK;