Commit 4ce4e295 authored by Andrea Marchesini's avatar Andrea Marchesini
Browse files

Bug 1421772 - Updating comments for nsInputStreamPump::OnStateStop, r=valentin

This patch removes also the assertion that makes OnStateStop to be executed on
main-thread only.
parent 524b31d2
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -660,12 +660,8 @@ nsInputStreamPump::OnStateStop()
    mMutex.AssertCurrentThreadIn();

    if (!NS_IsMainThread()) {
        // Hopefully temporary hack: OnStateStop should only run on the main
        // thread, but we're seeing some rare off-main-thread calls. For now
        // just redispatch to the main thread in release builds, and crash in
        // debug builds.
        MOZ_ASSERT(NS_IsMainThread(),
                   "OnStateStop should only be called on the main thread.");
        // This method can be called on a different thread if nsInputStreamPump
        // is used off the main-thread.
        nsresult rv = NS_DispatchToMainThread(
          NewRunnableMethod("nsInputStreamPump::CallOnStateStop",
                            this,