Commit 636c8d24 authored by Kershaw Chang's avatar Kershaw Chang
Browse files

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

parent 1b1f3076
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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;