netwerk/base/src/nsStreamListenerWrapper.cpp
author seabld
Tue, 10 Dec 2013 19:46:44 -0800
branchSEA_COMM260_20131210_RELBRANCH
changeset 162115 18f4223296d02d37b6a08e6455fc00be83d05e74
parent 150864 57ffaa460a6bb8f0507f119a4b5b62e0c430d99a
child 162982 07a7fefec7cb8fc9b429df879e322c54371338bc
permissions -rw-r--r--
Added tag SEAMONKEY_2_23_RELEASE for changeset c6bc408104a2. CLOSED TREE a=release

/* 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/. */

#include "nsStreamListenerWrapper.h"
#include "nsThreadUtils.h"

NS_IMPL_ISUPPORTS3(nsStreamListenerWrapper,
                   nsIStreamListener,
                   nsIRequestObserver,
                   nsIThreadRetargetableStreamListener)

NS_IMETHODIMP
nsStreamListenerWrapper::CheckListenerChain()
{
    NS_ASSERTION(NS_IsMainThread(), "Should be on main thread!");
    nsresult rv = NS_OK;
    nsCOMPtr<nsIThreadRetargetableStreamListener> retargetableListener =
        do_QueryInterface(mListener, &rv);
    if (retargetableListener) {
        rv = retargetableListener->CheckListenerChain();
    }
    return rv;
}