forked from mirrors/gecko-dev
Backed out 6 changesets (bug 1851992) for DT failure on browser_net_image_cache.js . CLOSED TREE
Backed out changeset 3ceaf46f8f55 (bug 1851992) Backed out changeset c9d322362e22 (bug 1851992) Backed out changeset 673df3f83249 (bug 1851992) Backed out changeset 46e18c56dd39 (bug 1851992) Backed out changeset f9f9143ac713 (bug 1851992) Backed out changeset 38c40d735ab7 (bug 1851992)
This commit is contained in:
parent
2f546f078f
commit
722f6a1679
73 changed files with 81 additions and 544 deletions
|
|
@ -73,6 +73,7 @@ static LazyLogModule gEventSourceLog("EventSource");
|
|||
PR_IntervalToMilliseconds(DELAY_INTERVAL_LIMIT)
|
||||
|
||||
class EventSourceImpl final : public nsIObserver,
|
||||
public nsIStreamListener,
|
||||
public nsIChannelEventSink,
|
||||
public nsIInterfaceRequestor,
|
||||
public nsSupportsWeakReference,
|
||||
|
|
@ -1949,10 +1950,6 @@ EventSourceImpl::CheckListenerChain() {
|
|||
MOZ_ASSERT(NS_IsMainThread(), "Should be on the main thread!");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
EventSourceImpl::OnDataFinished(nsresult) { return NS_OK; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// EventSource
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -99,7 +99,8 @@ bool ShouldCheckSRI(const InternalRequest& aRequest,
|
|||
// AlternativeDataStreamListener
|
||||
//-----------------------------------------------------------------------------
|
||||
class AlternativeDataStreamListener final
|
||||
: public nsIThreadRetargetableStreamListener {
|
||||
: public nsIStreamListener,
|
||||
public nsIThreadRetargetableStreamListener {
|
||||
public:
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSIREQUESTOBSERVER
|
||||
|
|
@ -317,12 +318,6 @@ AlternativeDataStreamListener::OnStopRequest(nsIRequest* aRequest,
|
|||
|
||||
NS_IMETHODIMP
|
||||
AlternativeDataStreamListener::CheckListenerChain() { return NS_OK; }
|
||||
|
||||
NS_IMETHODIMP
|
||||
AlternativeDataStreamListener::OnDataFinished(nsresult aStatus) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// FetchDriver
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -1665,9 +1660,6 @@ FetchDriver::AsyncOnChannelRedirect(nsIChannel* aOldChannel,
|
|||
NS_IMETHODIMP
|
||||
FetchDriver::CheckListenerChain() { return NS_OK; }
|
||||
|
||||
NS_IMETHODIMP
|
||||
FetchDriver::OnDataFinished(nsresult) { return NS_OK; }
|
||||
|
||||
NS_IMETHODIMP
|
||||
FetchDriver::GetInterface(const nsIID& aIID, void** aResult) {
|
||||
if (aIID.Equals(NS_GET_IID(nsIChannelEventSink))) {
|
||||
|
|
|
|||
|
|
@ -94,7 +94,8 @@ class FetchDriverObserver {
|
|||
|
||||
class AlternativeDataStreamListener;
|
||||
|
||||
class FetchDriver final : public nsIChannelEventSink,
|
||||
class FetchDriver final : public nsIStreamListener,
|
||||
public nsIChannelEventSink,
|
||||
public nsIInterfaceRequestor,
|
||||
public nsINetworkInterceptController,
|
||||
public nsIThreadRetargetableStreamListener,
|
||||
|
|
|
|||
|
|
@ -99,7 +99,4 @@ nsresult MutableBlobStreamListener::WriteSegmentFun(
|
|||
NS_IMETHODIMP
|
||||
MutableBlobStreamListener::CheckListenerChain() { return NS_OK; }
|
||||
|
||||
NS_IMETHODIMP
|
||||
MutableBlobStreamListener::OnDataFinished(nsresult) { return NS_OK; }
|
||||
|
||||
} // namespace mozilla::dom
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ class nsIEventTarget;
|
|||
namespace mozilla::dom {
|
||||
|
||||
class MutableBlobStreamListener final
|
||||
: public nsIThreadRetargetableStreamListener {
|
||||
: public nsIStreamListener,
|
||||
public nsIThreadRetargetableStreamListener {
|
||||
public:
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
|
|
|
|||
|
|
@ -1212,7 +1212,8 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
|||
* We break the reference cycle in OnStartRequest by clearing mElement.
|
||||
*/
|
||||
class HTMLMediaElement::MediaLoadListener final
|
||||
: public nsIChannelEventSink,
|
||||
: public nsIStreamListener,
|
||||
public nsIChannelEventSink,
|
||||
public nsIInterfaceRequestor,
|
||||
public nsIObserver,
|
||||
public nsIThreadRetargetableStreamListener {
|
||||
|
|
@ -1362,20 +1363,6 @@ HTMLMediaElement::MediaLoadListener::OnDataAvailable(nsIRequest* aRequest,
|
|||
return mNextListener->OnDataAvailable(aRequest, aStream, aOffset, aCount);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLMediaElement::MediaLoadListener::OnDataFinished(nsresult aStatus) {
|
||||
if (!mNextListener) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> retargetable =
|
||||
do_QueryInterface(mNextListener);
|
||||
if (retargetable) {
|
||||
return retargetable->OnDataFinished(aStatus);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLMediaElement::MediaLoadListener::AsyncOnChannelRedirect(
|
||||
nsIChannel* aOldChannel, nsIChannel* aNewChannel, uint32_t aFlags,
|
||||
|
|
|
|||
|
|
@ -88,20 +88,6 @@ MediaDocumentStreamListener::OnDataAvailable(nsIRequest* request,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
MediaDocumentStreamListener::OnDataFinished(nsresult aStatus) {
|
||||
if (!mNextStream) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> retargetable =
|
||||
do_QueryInterface(mNextStream);
|
||||
if (retargetable) {
|
||||
return retargetable->OnDataFinished(aStatus);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
MediaDocumentStreamListener::CheckListenerChain() {
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> retargetable =
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "nsHTMLDocument.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsIStringBundle.h"
|
||||
#include "nsIThreadRetargetableStreamListener.h"
|
||||
|
||||
|
|
@ -96,7 +95,8 @@ class MediaDocument : public nsHTMLDocument {
|
|||
bool mDidInitialDocumentSetup;
|
||||
};
|
||||
|
||||
class MediaDocumentStreamListener : public nsIThreadRetargetableStreamListener {
|
||||
class MediaDocumentStreamListener : public nsIStreamListener,
|
||||
public nsIThreadRetargetableStreamListener {
|
||||
protected:
|
||||
virtual ~MediaDocumentStreamListener();
|
||||
|
||||
|
|
|
|||
|
|
@ -104,9 +104,6 @@ nsresult ChannelMediaResource::Listener::AsyncOnChannelRedirect(
|
|||
|
||||
nsresult ChannelMediaResource::Listener::CheckListenerChain() { return NS_OK; }
|
||||
|
||||
NS_IMETHODIMP
|
||||
ChannelMediaResource::Listener::OnDataFinished(nsresult) { return NS_OK; }
|
||||
|
||||
nsresult ChannelMediaResource::Listener::GetInterface(const nsIID& aIID,
|
||||
void** aResult) {
|
||||
return QueryInterface(aIID, aResult);
|
||||
|
|
|
|||
|
|
@ -166,7 +166,8 @@ class ChannelMediaResource
|
|||
|
||||
void GetDebugInfo(dom::MediaResourceDebugInfo& aInfo) override;
|
||||
|
||||
class Listener final : public nsIInterfaceRequestor,
|
||||
class Listener final : public nsIStreamListener,
|
||||
public nsIInterfaceRequestor,
|
||||
public nsIChannelEventSink,
|
||||
public nsIThreadRetargetableStreamListener {
|
||||
~Listener() = default;
|
||||
|
|
|
|||
|
|
@ -1082,9 +1082,6 @@ nsWebBrowserPersist::OnDataAvailable(nsIRequest* request,
|
|||
|
||||
NS_IMETHODIMP nsWebBrowserPersist::CheckListenerChain() { return NS_OK; }
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebBrowserPersist::OnDataFinished(nsresult) { return NS_OK; }
|
||||
|
||||
//*****************************************************************************
|
||||
// nsWebBrowserPersist::nsIProgressEventSink
|
||||
//*****************************************************************************
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ using ClosePromise = mozilla::MozPromise<nsresult, nsresult, true>;
|
|||
|
||||
class nsWebBrowserPersist final : public nsIInterfaceRequestor,
|
||||
public nsIWebBrowserPersist,
|
||||
public nsIStreamListener,
|
||||
public nsIThreadRetargetableStreamListener,
|
||||
public nsIProgressEventSink,
|
||||
public nsSupportsWeakReference {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
// Undefine windows version of LoadImage because our code uses that name.
|
||||
#include "mozilla/ScopeExit.h"
|
||||
#include "nsIChildChannel.h"
|
||||
#include "nsIThreadRetargetableStreamListener.h"
|
||||
#undef LoadImage
|
||||
|
||||
#include "imgLoader.h"
|
||||
|
|
@ -1793,7 +1792,7 @@ bool imgLoader::ValidateRequestWithNewChannel(
|
|||
|
||||
// Casting needed here to get past multiple inheritance.
|
||||
nsCOMPtr<nsIStreamListener> listener =
|
||||
static_cast<nsIThreadRetargetableStreamListener*>(hvc);
|
||||
do_QueryInterface(static_cast<nsIThreadRetargetableStreamListener*>(hvc));
|
||||
NS_ENSURE_TRUE(listener, false);
|
||||
|
||||
// We must set the notification callbacks before setting up the
|
||||
|
|
@ -2980,20 +2979,6 @@ ProxyListener::OnDataAvailable(nsIRequest* aRequest, nsIInputStream* inStr,
|
|||
return mDestListener->OnDataAvailable(aRequest, inStr, sourceOffset, count);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ProxyListener::OnDataFinished(nsresult aStatus) {
|
||||
if (!mDestListener) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> retargetableListener =
|
||||
do_QueryInterface(mDestListener);
|
||||
if (retargetableListener) {
|
||||
return retargetableListener->OnDataFinished(aStatus);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** nsThreadRetargetableStreamListener methods **/
|
||||
NS_IMETHODIMP
|
||||
ProxyListener::CheckListenerChain() {
|
||||
|
|
@ -3228,20 +3213,6 @@ imgCacheValidator::OnDataAvailable(nsIRequest* aRequest, nsIInputStream* inStr,
|
|||
return mDestListener->OnDataAvailable(aRequest, inStr, sourceOffset, count);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
imgCacheValidator::OnDataFinished(nsresult aStatus) {
|
||||
if (!mDestListener) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> retargetableListener =
|
||||
do_QueryInterface(mDestListener);
|
||||
if (retargetableListener) {
|
||||
return retargetableListener->OnDataFinished(aStatus);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** nsIThreadRetargetableStreamListener methods **/
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
|||
|
|
@ -415,7 +415,8 @@ class imgLoader final : public imgILoader,
|
|||
#include "nsIStreamListener.h"
|
||||
#include "nsIThreadRetargetableStreamListener.h"
|
||||
|
||||
class ProxyListener : public nsIThreadRetargetableStreamListener {
|
||||
class ProxyListener : public nsIStreamListener,
|
||||
public nsIThreadRetargetableStreamListener {
|
||||
public:
|
||||
explicit ProxyListener(nsIStreamListener* dest);
|
||||
|
||||
|
|
@ -463,7 +464,8 @@ class nsProgressNotificationProxy final : public nsIProgressEventSink,
|
|||
|
||||
#include "nsCOMArray.h"
|
||||
|
||||
class imgCacheValidator : public nsIThreadRetargetableStreamListener,
|
||||
class imgCacheValidator : public nsIStreamListener,
|
||||
public nsIThreadRetargetableStreamListener,
|
||||
public nsIChannelEventSink,
|
||||
public nsIInterfaceRequestor,
|
||||
public nsIAsyncVerifyRedirectCallback {
|
||||
|
|
|
|||
|
|
@ -838,9 +838,6 @@ imgRequest::CheckListenerChain() {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
imgRequest::OnDataFinished(nsresult) { return NS_OK; }
|
||||
|
||||
/** nsIStreamListener methods **/
|
||||
|
||||
struct NewPartResult final {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ class ProgressTracker;
|
|||
|
||||
struct NewPartResult;
|
||||
|
||||
class imgRequest final : public nsIThreadRetargetableStreamListener,
|
||||
class imgRequest final : public nsIStreamListener,
|
||||
public nsIThreadRetargetableStreamListener,
|
||||
public nsIChannelEventSink,
|
||||
public nsIInterfaceRequestor,
|
||||
public nsIAsyncVerifyRedirectCallback {
|
||||
|
|
|
|||
|
|
@ -161,9 +161,6 @@ StreamLoader::OnDataAvailable(nsIRequest*, nsIInputStream* aInputStream,
|
|||
return aInputStream->ReadSegments(WriteSegmentFun, this, aCount, &dummy);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
StreamLoader::OnDataFinished(nsresult aStatus) { return NS_OK; }
|
||||
|
||||
void StreamLoader::HandleBOM() {
|
||||
MOZ_ASSERT(mEncodingFromBOM.isNothing());
|
||||
MOZ_ASSERT(mBytes.IsEmpty());
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ class nsIInputStream;
|
|||
|
||||
namespace mozilla::css {
|
||||
|
||||
class StreamLoader : public nsIThreadRetargetableStreamListener {
|
||||
class StreamLoader : public nsIStreamListener,
|
||||
public nsIThreadRetargetableStreamListener {
|
||||
public:
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSIREQUESTOBSERVER
|
||||
|
|
|
|||
|
|
@ -1363,14 +1363,3 @@ nsJARChannel::CheckListenerChain() {
|
|||
|
||||
return listener->CheckListenerChain();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsJARChannel::OnDataFinished(nsresult aStatus) {
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> listener =
|
||||
do_QueryInterface(mListener);
|
||||
if (listener) {
|
||||
return listener->OnDataFinished(aStatus);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ class nsInputStreamPump;
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
class nsJARChannel final : public nsIJARChannel,
|
||||
public nsIStreamListener,
|
||||
public nsIThreadRetargetableRequest,
|
||||
public nsIThreadRetargetableStreamListener,
|
||||
public nsHashPropertyBag {
|
||||
|
|
|
|||
|
|
@ -4,9 +4,7 @@
|
|||
*/
|
||||
|
||||
#include "StreamFunctions.h"
|
||||
#include "MainThreadUtils.h"
|
||||
#include "nsDeflateConverter.h"
|
||||
#include "nsIThreadRetargetableStreamListener.h"
|
||||
#include "nsStringStream.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsCRT.h"
|
||||
|
|
@ -24,7 +22,7 @@ using namespace mozilla;
|
|||
* method to the data.
|
||||
*/
|
||||
NS_IMPL_ISUPPORTS(nsDeflateConverter, nsIStreamConverter, nsIStreamListener,
|
||||
nsIThreadRetargetableStreamListener, nsIRequestObserver)
|
||||
nsIRequestObserver)
|
||||
|
||||
nsresult nsDeflateConverter::Init() {
|
||||
int zerr;
|
||||
|
|
@ -139,21 +137,6 @@ NS_IMETHODIMP nsDeflateConverter::OnStartRequest(nsIRequest* aRequest) {
|
|||
return mListener->OnStartRequest(aRequest);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDeflateConverter::OnDataFinished(nsresult aStatus) {
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> retargetable =
|
||||
do_QueryInterface(mListener);
|
||||
|
||||
if (retargetable) {
|
||||
return retargetable->OnDataFinished(aStatus);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDeflateConverter::CheckListenerChain() { return NS_ERROR_NO_INTERFACE; }
|
||||
|
||||
NS_IMETHODIMP nsDeflateConverter::OnStopRequest(nsIRequest* aRequest,
|
||||
nsresult aStatusCode) {
|
||||
if (!mListener) return NS_ERROR_NOT_INITIALIZED;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include "nsIStreamConverter.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIThreadRetargetableStreamListener.h"
|
||||
#include "zlib.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
|
|
@ -26,7 +25,6 @@ class nsDeflateConverter final : public nsIStreamConverter {
|
|||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIREQUESTOBSERVER
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
NS_DECL_NSITHREADRETARGETABLESTREAMLISTENER
|
||||
NS_DECL_NSISTREAMCONVERTER
|
||||
|
||||
nsDeflateConverter() : mWrapMode(WRAP_NONE), mOffset(0), mZstream() {
|
||||
|
|
|
|||
|
|
@ -11661,24 +11661,6 @@
|
|||
value: true
|
||||
mirror: always
|
||||
|
||||
# Whether we can send OnDataFinished to html5parser in content process directly
|
||||
- name: network.send_OnDataFinished.html5parser
|
||||
type: RelaxedAtomicBool
|
||||
value: @IS_NIGHTLY_BUILD@
|
||||
mirror: always
|
||||
|
||||
# Whether we can send OnDataFinished in the content process
|
||||
- name: network.send_OnDataFinished
|
||||
type: RelaxedAtomicBool
|
||||
value: @IS_NIGHTLY_BUILD@
|
||||
mirror: always
|
||||
|
||||
# Whether we can send OnDataAvailable to content process directly.
|
||||
- name: network.send_OnDataFinished.nsInputStreamPump
|
||||
type: RelaxedAtomicBool
|
||||
value: @IS_NIGHTLY_BUILD@
|
||||
mirror: always
|
||||
|
||||
# Perform all network access on the socket process.
|
||||
# The pref requires "network.process.enabled" to be true.
|
||||
# Changing these prefs requires a restart.
|
||||
|
|
|
|||
|
|
@ -942,25 +942,6 @@ nsBaseChannel::CheckListenerChain() {
|
|||
return listener->CheckListenerChain();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBaseChannel::OnDataFinished(nsresult aStatus) {
|
||||
if (!mListener) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
if (!mAllowThreadRetargeting) {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> listener =
|
||||
do_QueryInterface(mListener);
|
||||
if (listener) {
|
||||
return listener->OnDataFinished(aStatus);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsBaseChannel::GetCanceled(bool* aCanceled) {
|
||||
*aCanceled = mCanceled;
|
||||
return NS_OK;
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ class nsBaseChannel
|
|||
public nsIAsyncVerifyRedirectCallback,
|
||||
public mozilla::net::PrivateBrowsingChannel<nsBaseChannel>,
|
||||
public mozilla::net::NeckoTargetHolder,
|
||||
protected nsIStreamListener,
|
||||
protected nsIThreadRetargetableStreamListener {
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* 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 "nsIThreadRetargetableStreamListener.idl"
|
||||
#include "nsIStreamListener.idl"
|
||||
|
||||
interface nsIRequest;
|
||||
interface nsIIncrementalStreamLoader;
|
||||
|
|
@ -77,7 +77,7 @@ interface nsIIncrementalStreamLoaderObserver : nsISupports
|
|||
* XXX define behaviour for sizes >4 GB
|
||||
*/
|
||||
[scriptable, uuid(a023b060-ba23-431a-b449-2dd63e220554)]
|
||||
interface nsIIncrementalStreamLoader : nsIThreadRetargetableStreamListener
|
||||
interface nsIIncrementalStreamLoader : nsIStreamListener
|
||||
{
|
||||
/**
|
||||
* Initialize this stream loader, and start loading the data.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* 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 "nsIThreadRetargetableStreamListener.idl"
|
||||
#include "nsIStreamListener.idl"
|
||||
|
||||
interface nsIOutputStream;
|
||||
interface nsIRequestObserver;
|
||||
|
|
@ -13,7 +13,7 @@ interface nsIEventTarget;
|
|||
* and then forwarded to the real listener.
|
||||
*/
|
||||
[scriptable, uuid(62b27fc1-6e8c-4225-8ad0-b9d44252973a)]
|
||||
interface nsIStreamListenerTee : nsIThreadRetargetableStreamListener
|
||||
interface nsIStreamListenerTee : nsIStreamListener
|
||||
{
|
||||
/**
|
||||
* Initalize the tee.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* 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 "nsIThreadRetargetableStreamListener.idl"
|
||||
#include "nsIStreamListener.idl"
|
||||
|
||||
interface nsIRequest;
|
||||
interface nsIStreamLoader;
|
||||
|
|
@ -50,7 +50,7 @@ interface nsIStreamLoaderObserver : nsISupports
|
|||
* XXX define behaviour for sizes >4 GB
|
||||
*/
|
||||
[scriptable, uuid(323bcff1-7513-4e1f-a541-1c9213c2ed1b)]
|
||||
interface nsIStreamLoader : nsIThreadRetargetableStreamListener
|
||||
interface nsIStreamLoader : nsIStreamListener
|
||||
{
|
||||
/**
|
||||
* Initialize this stream loader, and start loading the data.
|
||||
|
|
|
|||
|
|
@ -5,15 +5,15 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIStreamListener.idl"
|
||||
|
||||
/**
|
||||
* nsIThreadRetargetableStreamListener
|
||||
*
|
||||
* To be used by classes which implement nsIStreamListener and whose
|
||||
* OnDataAvailable callback may be retargeted for delivery off the main thread.
|
||||
*/
|
||||
[scriptable, uuid(fb2304b8-f82f-4433-af68-d874a2ebbdc1)]
|
||||
interface nsIThreadRetargetableStreamListener : nsIStreamListener
|
||||
[uuid(fb2304b8-f82f-4433-af68-d874a2ebbdc1)]
|
||||
interface nsIThreadRetargetableStreamListener : nsISupports
|
||||
{
|
||||
/**
|
||||
* Checks this listener and any next listeners it may have to verify that
|
||||
|
|
@ -29,11 +29,4 @@ interface nsIThreadRetargetableStreamListener : nsIStreamListener
|
|||
* fails.
|
||||
*/
|
||||
void checkListenerChain();
|
||||
|
||||
/**
|
||||
* Used for sending OMT notifications to listeners to notify them about data stop.
|
||||
* After this notification, the listeners could potentially start processing the data OMT.
|
||||
*/
|
||||
|
||||
void onDataFinished(in nsresult aStatusCode);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -183,6 +183,3 @@ void nsIncrementalStreamLoader::ReleaseData() { mData.clearAndFree(); }
|
|||
|
||||
NS_IMETHODIMP
|
||||
nsIncrementalStreamLoader::CheckListenerChain() { return NS_OK; }
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsIncrementalStreamLoader::OnDataFinished(nsresult aStatus) { return NS_OK; }
|
||||
|
|
|
|||
|
|
@ -14,7 +14,9 @@
|
|||
|
||||
class nsIRequest;
|
||||
|
||||
class nsIncrementalStreamLoader final : public nsIIncrementalStreamLoader {
|
||||
class nsIncrementalStreamLoader final
|
||||
: public nsIIncrementalStreamLoader,
|
||||
public nsIThreadRetargetableStreamListener {
|
||||
public:
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSIINCREMENTALSTREAMLOADER
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
#include "mozilla/NonBlockingAsyncInputStream.h"
|
||||
#include "mozilla/ProfilerLabels.h"
|
||||
#include "mozilla/SlicedInputStream.h"
|
||||
#include "mozilla/StaticPrefs_network.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsILoadGroup.h"
|
||||
#include "nsNetCID.h"
|
||||
|
|
@ -651,14 +650,6 @@ uint32_t nsInputStreamPump::OnStateStop() {
|
|||
if (!NS_IsMainThread() && !mOffMainThread) {
|
||||
// This method can be called on a different thread if nsInputStreamPump
|
||||
// is used off the main-thread.
|
||||
if (NS_SUCCEEDED(mStatus) && mListener &&
|
||||
mozilla::StaticPrefs::network_send_OnDataFinished_nsInputStreamPump()) {
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> retargetableListener =
|
||||
do_QueryInterface(mListener);
|
||||
if (retargetableListener) {
|
||||
retargetableListener->OnDataFinished(mStatus);
|
||||
}
|
||||
}
|
||||
nsresult rv = mLabeledMainThreadTarget->Dispatch(
|
||||
mozilla::NewRunnableMethod("nsInputStreamPump::CallOnStateStop", this,
|
||||
&nsInputStreamPump::CallOnStateStop));
|
||||
|
|
|
|||
|
|
@ -139,27 +139,6 @@ nsStreamListenerTee::CheckListenerChain() {
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsStreamListenerTee::OnDataFinished(nsresult aStatus) {
|
||||
nsresult rv = NS_OK;
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> retargetableListener =
|
||||
do_QueryInterface(mListener, &rv);
|
||||
if (retargetableListener) {
|
||||
rv = retargetableListener->OnDataFinished(aStatus);
|
||||
}
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
if (!mObserver) {
|
||||
return rv;
|
||||
}
|
||||
retargetableListener = do_QueryInterface(mObserver, &rv);
|
||||
if (retargetableListener) {
|
||||
rv = retargetableListener->OnDataFinished(aStatus);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsStreamListenerTee::Init(nsIStreamListener* listener, nsIOutputStream* sink,
|
||||
nsIRequestObserver* requestObserver) {
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ namespace mozilla {
|
|||
namespace net {
|
||||
|
||||
class nsStreamListenerTee : public nsIStreamListenerTee,
|
||||
public nsIThreadRetargetableStreamListener,
|
||||
public nsIMultiPartChannelListener {
|
||||
public:
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
|
|
|||
|
|
@ -41,15 +41,5 @@ nsStreamListenerWrapper::CheckListenerChain() {
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsStreamListenerWrapper::OnDataFinished(nsresult aStatus) {
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> retargetableListener =
|
||||
do_QueryInterface(mListener);
|
||||
if (retargetableListener) {
|
||||
return retargetableListener->OnDataFinished(aStatus);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
} // namespace net
|
||||
} // namespace mozilla
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ namespace net {
|
|||
// Wrapper class to make replacement of nsHttpChannel's listener
|
||||
// from JavaScript possible. It is workaround for bug 433711 and 682305.
|
||||
class nsStreamListenerWrapper final
|
||||
: public nsIMultiPartChannelListener,
|
||||
: public nsIStreamListener,
|
||||
public nsIMultiPartChannelListener,
|
||||
public nsIThreadRetargetableStreamListener {
|
||||
public:
|
||||
explicit nsStreamListenerWrapper(nsIStreamListener* listener)
|
||||
|
|
|
|||
|
|
@ -133,8 +133,5 @@ void nsStreamLoader::ReleaseData() { mData.clearAndFree(); }
|
|||
NS_IMETHODIMP
|
||||
nsStreamLoader::CheckListenerChain() { return NS_OK; }
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsStreamLoader::OnDataFinished(nsresult) { return NS_OK; }
|
||||
|
||||
} // namespace net
|
||||
} // namespace mozilla
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ class nsIRequest;
|
|||
namespace mozilla {
|
||||
namespace net {
|
||||
|
||||
class nsStreamLoader final : public nsIStreamLoader {
|
||||
class nsStreamLoader final : public nsIStreamLoader,
|
||||
public nsIThreadRetargetableStreamListener {
|
||||
public:
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSISTREAMLOADER
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
#include "mozilla/ConsoleReportCollector.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/InputStreamLengthHelper.h"
|
||||
#include "mozilla/Mutex.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozilla/PermissionManager.h"
|
||||
#include "mozilla/Components.h"
|
||||
|
|
@ -1768,7 +1767,6 @@ HttpBaseChannel::GetThirdPartyClassificationFlags(uint32_t* aFlags) {
|
|||
|
||||
NS_IMETHODIMP
|
||||
HttpBaseChannel::GetTransferSize(uint64_t* aTransferSize) {
|
||||
MutexAutoLock lock(mOnDataFinishedMutex);
|
||||
*aTransferSize = mTransferSize;
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
@ -1787,7 +1785,6 @@ HttpBaseChannel::GetDecodedBodySize(uint64_t* aDecodedBodySize) {
|
|||
|
||||
NS_IMETHODIMP
|
||||
HttpBaseChannel::GetEncodedBodySize(uint64_t* aEncodedBodySize) {
|
||||
MutexAutoLock lock(mOnDataFinishedMutex);
|
||||
*aEncodedBodySize = mEncodedBodySize;
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -829,10 +829,6 @@ class HttpBaseChannel : public nsHashPropertyBag,
|
|||
Atomic<uint32_t, ReleaseAcquire> mFirstPartyClassificationFlags;
|
||||
Atomic<uint32_t, ReleaseAcquire> mThirdPartyClassificationFlags;
|
||||
|
||||
// mutex to guard members accessed during OnDataFinished in
|
||||
// HttpChannelChild.cpp
|
||||
Mutex mOnDataFinishedMutex{"HttpChannelChild::OnDataFinishedMutex"};
|
||||
|
||||
UniquePtr<ProfileChunkedBuffer> mSource;
|
||||
|
||||
uint32_t mLoadFlags;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@
|
|||
#include "nsCOMPtr.h"
|
||||
#include "nsContentPolicyUtils.h"
|
||||
#include "nsDOMNavigationTiming.h"
|
||||
#include "nsIThreadRetargetableStreamListener.h"
|
||||
#include "nsStringStream.h"
|
||||
#include "nsHttpChannel.h"
|
||||
#include "nsHttpHandler.h"
|
||||
|
|
@ -802,29 +801,6 @@ void HttpChannelChild::DoOnDataAvailable(nsIRequest* aRequest,
|
|||
}
|
||||
}
|
||||
|
||||
void HttpChannelChild::SendOnDataFinished(const nsresult& aChannelStatus) {
|
||||
LOG(("HttpChannelChild::SendOnDataFinished [this=%p]\n", this));
|
||||
if (mCanceled) return;
|
||||
|
||||
if (mListener) {
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> omtEventListener =
|
||||
do_QueryInterface(mListener);
|
||||
if (omtEventListener) {
|
||||
LOG(
|
||||
("HttpChannelChild::SendOnDataFinished sending data end "
|
||||
"notification[this=%p]\n",
|
||||
this));
|
||||
omtEventListener->OnDataFinished(aChannelStatus);
|
||||
} else {
|
||||
LOG(
|
||||
("HttpChannelChild::SendOnDataFinished missing "
|
||||
"nsIThreadRetargetableStreamListener "
|
||||
"implementation [this=%p]\n",
|
||||
this));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HttpChannelChild::ProcessOnStopRequest(
|
||||
const nsresult& aChannelStatus, const ResourceTimingStructArgs& aTiming,
|
||||
const nsHttpHeaderArray& aResponseTrailers,
|
||||
|
|
@ -835,21 +811,7 @@ void HttpChannelChild::ProcessOnStopRequest(
|
|||
"aFromSocketProcess=%d]\n",
|
||||
this, aFromSocketProcess));
|
||||
MOZ_ASSERT(OnSocketThread());
|
||||
{ // assign some of the members that would be accessed by the listeners
|
||||
// upon getting OnDataFinished notications
|
||||
MutexAutoLock lock(mOnDataFinishedMutex);
|
||||
mTransferSize = aTiming.transferSize();
|
||||
mEncodedBodySize = aTiming.encodedBodySize();
|
||||
}
|
||||
if (StaticPrefs::network_send_OnDataFinished()) {
|
||||
mEventQ->RunOrEnqueue(new ChannelFunctionEvent(
|
||||
[self = UnsafePtr<HttpChannelChild>(this)]() {
|
||||
return self->GetODATarget();
|
||||
},
|
||||
[self = UnsafePtr<HttpChannelChild>(this), status = aChannelStatus]() {
|
||||
self->SendOnDataFinished(status);
|
||||
}));
|
||||
}
|
||||
|
||||
mEventQ->RunOrEnqueue(new NeckoTargetChannelFunctionEvent(
|
||||
this, [self = UnsafePtr<HttpChannelChild>(this), aChannelStatus, aTiming,
|
||||
aResponseTrailers,
|
||||
|
|
@ -963,9 +925,8 @@ void HttpChannelChild::OnStopRequest(
|
|||
|
||||
mRedirectStartTimeStamp = aTiming.redirectStart();
|
||||
mRedirectEndTimeStamp = aTiming.redirectEnd();
|
||||
// mTransferSize and mEncodedBodySize are set in ProcessOnStopRequest
|
||||
// TODO: check if we need to move assignments of other members to
|
||||
// ProcessOnStopRequest
|
||||
mTransferSize = aTiming.transferSize();
|
||||
mEncodedBodySize = aTiming.encodedBodySize();
|
||||
|
||||
mCacheReadStart = aTiming.cacheReadStart();
|
||||
mCacheReadEnd = aTiming.cacheReadEnd();
|
||||
|
|
@ -2894,6 +2855,7 @@ NS_IMETHODIMP
|
|||
HttpChannelChild::RetargetDeliveryTo(nsISerialEventTarget* aNewTarget) {
|
||||
LOG(("HttpChannelChild::RetargetDeliveryTo [this=%p, aNewTarget=%p]", this,
|
||||
aNewTarget));
|
||||
|
||||
MOZ_ASSERT(NS_IsMainThread(), "Should be called on main thread only");
|
||||
MOZ_ASSERT(aNewTarget);
|
||||
|
||||
|
|
|
|||
|
|
@ -435,7 +435,6 @@ class HttpChannelChild final : public PHttpChannelChild,
|
|||
void OnAfterLastPart(const nsresult& aStatus);
|
||||
void MaybeConnectToSocketProcess();
|
||||
void OnDetachStreamFilters();
|
||||
void SendOnDataFinished(const nsresult& aChannelStatus);
|
||||
|
||||
// Create a a new channel to be used in a redirection, based on the provided
|
||||
// response headers.
|
||||
|
|
|
|||
|
|
@ -648,9 +648,6 @@ HttpTransactionChild::CheckListenerChain() {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HttpTransactionChild::OnDataFinished(nsresult aStatus) { return NS_OK; }
|
||||
|
||||
NS_IMETHODIMP
|
||||
HttpTransactionChild::EarlyHint(const nsACString& aValue,
|
||||
const nsACString& aReferrerPolicy,
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ class nsProxyInfo;
|
|||
// manages the real nsHttpTransaction and transaction pump.
|
||||
//-----------------------------------------------------------------------------
|
||||
class HttpTransactionChild final : public PHttpTransactionChild,
|
||||
public nsIStreamListener,
|
||||
public nsITransportEventSink,
|
||||
public nsIThrottledInputChannel,
|
||||
public nsIThreadRetargetableStreamListener,
|
||||
|
|
|
|||
|
|
@ -1194,20 +1194,6 @@ InterceptedHttpChannel::OnDataAvailable(nsIRequest* aRequest,
|
|||
return mListener->OnDataAvailable(this, aInputStream, aOffset, aCount);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
InterceptedHttpChannel::OnDataFinished(nsresult aStatus) {
|
||||
if (mCanceled || !mListener) {
|
||||
return aStatus;
|
||||
}
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> retargetableListener =
|
||||
do_QueryInterface(mListener);
|
||||
if (retargetableListener) {
|
||||
return retargetableListener->OnDataFinished(aStatus);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
InterceptedHttpChannel::RetargetDeliveryTo(nsISerialEventTarget* aNewTarget) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ class InterceptedHttpChannel final
|
|||
public nsIInterceptedChannel,
|
||||
public nsICacheInfoChannel,
|
||||
public nsIAsyncVerifyRedirectCallback,
|
||||
public nsIStreamListener,
|
||||
public nsIThreadRetargetableRequest,
|
||||
public nsIThreadRetargetableStreamListener {
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
#include "nsIHttpHeaderVisitor.h"
|
||||
#include "nsIPrompt.h"
|
||||
#include "nsISecureBrowserUI.h"
|
||||
#include "nsIThreadRetargetableStreamListener.h"
|
||||
#include "nsIWindowWatcher.h"
|
||||
#include "nsQueryObject.h"
|
||||
#include "nsIAuthPrompt.h"
|
||||
|
|
@ -117,20 +116,6 @@ ParentChannelListener::OnDataAvailable(nsIRequest* aRequest,
|
|||
aCount);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ParentChannelListener::OnDataFinished(nsresult aStatus) {
|
||||
if (!mNextListener) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> listener =
|
||||
do_QueryInterface(mNextListener);
|
||||
if (listener) {
|
||||
return listener->OnDataFinished(aStatus);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ParentChannelListener::nsIMultiPartChannelListener
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ namespace net {
|
|||
}
|
||||
|
||||
class ParentChannelListener final : public nsIInterfaceRequestor,
|
||||
public nsIStreamListener,
|
||||
public nsIMultiPartChannelListener,
|
||||
public nsINetworkInterceptController,
|
||||
public nsIThreadRetargetableStreamListener,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
* 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 "nsIThreadRetargetableStreamListener.h"
|
||||
#include "nsString.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/LinkedList.h"
|
||||
|
|
@ -707,25 +706,6 @@ nsCORSListenerProxy::OnDataAvailable(nsIRequest* aRequest,
|
|||
return listener->OnDataAvailable(aRequest, aInputStream, aOffset, aCount);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCORSListenerProxy::OnDataFinished(nsresult aStatus) {
|
||||
nsCOMPtr<nsIStreamListener> listener;
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
listener = mOuterListener;
|
||||
}
|
||||
if (!listener) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> retargetableListener =
|
||||
do_QueryInterface(listener);
|
||||
if (retargetableListener) {
|
||||
return retargetableListener->OnDataFinished(aStatus);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void nsCORSListenerProxy::SetInterceptController(
|
||||
nsINetworkInterceptController* aInterceptController) {
|
||||
mInterceptController = aInterceptController;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ enum class UpdateType {
|
|||
InternalOrHSTSRedirect
|
||||
};
|
||||
|
||||
class nsCORSListenerProxy final : public nsIInterfaceRequestor,
|
||||
class nsCORSListenerProxy final : public nsIStreamListener,
|
||||
public nsIInterfaceRequestor,
|
||||
public nsIChannelEventSink,
|
||||
public nsIThreadRetargetableStreamListener {
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -8416,18 +8416,6 @@ nsHttpChannel::CheckListenerChain() {
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHttpChannel::OnDataFinished(nsresult aStatus) {
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> listener =
|
||||
do_QueryInterface(mListener);
|
||||
|
||||
if (listener) {
|
||||
return listener->OnDataFinished(aStatus);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// nsHttpChannel::nsITransportEventSink
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ using DNSPromise = MozPromise<nsCOMPtr<nsIDNSRecord>, nsresult, false>;
|
|||
|
||||
class nsHttpChannel final : public HttpBaseChannel,
|
||||
public HttpAsyncAborter<nsHttpChannel>,
|
||||
public nsIStreamListener,
|
||||
public nsICachingChannel,
|
||||
public nsICacheEntryOpenCallback,
|
||||
public nsITransportEventSink,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#include "mozTXTToHTMLConv.h"
|
||||
#include "mozilla/intl/Segmenter.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "nsIThreadRetargetableStreamListener.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsUnicodeProperties.h"
|
||||
|
|
@ -910,8 +909,7 @@ bool mozTXTToHTMLConv::GlyphHit(const char16_t* aInString, int32_t aInLength,
|
|||
****************************************************************************/
|
||||
|
||||
NS_IMPL_ISUPPORTS(mozTXTToHTMLConv, mozITXTToHTMLConv, nsIStreamConverter,
|
||||
nsIThreadRetargetableStreamListener, nsIStreamListener,
|
||||
nsIRequestObserver)
|
||||
nsIStreamListener, nsIRequestObserver)
|
||||
|
||||
int32_t mozTXTToHTMLConv::CiteLevelTXT(const char16_t* line,
|
||||
uint32_t& logLineStart) {
|
||||
|
|
@ -1258,14 +1256,6 @@ mozTXTToHTMLConv::OnDataAvailable(nsIRequest* request, nsIInputStream* inStr,
|
|||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
mozTXTToHTMLConv::OnDataFinished(nsresult aStatus) {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
mozTXTToHTMLConv::CheckListenerChain() { return NS_ERROR_NOT_IMPLEMENTED; }
|
||||
|
||||
NS_IMETHODIMP
|
||||
mozTXTToHTMLConv::OnStartRequest(nsIRequest* request) {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
#define _mozTXTToHTMLConv_h__
|
||||
|
||||
#include "mozITXTToHTMLConv.h"
|
||||
#include "nsIThreadRetargetableStreamListener.h"
|
||||
#include "nsString.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
|
|
@ -31,7 +30,6 @@ class mozTXTToHTMLConv : public mozITXTToHTMLConv {
|
|||
NS_DECL_MOZITXTTOHTMLCONV
|
||||
NS_DECL_NSIREQUESTOBSERVER
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
NS_DECL_NSITHREADRETARGETABLESTREAMLISTENER
|
||||
NS_DECL_NSISTREAMCONVERTER
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
#include "nsCOMPtr.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsError.h"
|
||||
#include "nsIThreadRetargetableStreamListener.h"
|
||||
#include "nsStreamUtils.h"
|
||||
#include "nsStringStream.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
|
|
@ -731,22 +730,6 @@ nsHTTPCompressConv::CheckListenerChain() {
|
|||
return listener->CheckListenerChain();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTTPCompressConv::OnDataFinished(nsresult aStatus) {
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> listener;
|
||||
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
listener = do_QueryInterface(mListener);
|
||||
}
|
||||
|
||||
if (listener) {
|
||||
return listener->OnDataFinished(aStatus);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
} // namespace net
|
||||
} // namespace mozilla
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ namespace net {
|
|||
class BrotliWrapper;
|
||||
|
||||
class nsHTTPCompressConv : public nsIStreamConverter,
|
||||
public nsICompressConvStats {
|
||||
public nsICompressConvStats,
|
||||
public nsIThreadRetargetableStreamListener {
|
||||
public:
|
||||
// nsISupports methods
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
#include "mozilla/Encoding.h"
|
||||
#include "mozilla/intl/AppDateTimeFormat.h"
|
||||
#include "mozilla/intl/LocaleService.h"
|
||||
#include "nsIThreadRetargetableStreamListener.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "netCore.h"
|
||||
#include "nsStringStream.h"
|
||||
|
|
@ -32,8 +31,7 @@ using mozilla::intl::LocaleService;
|
|||
using namespace mozilla;
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsIndexedToHTML, nsIDirIndexListener, nsIStreamConverter,
|
||||
nsIThreadRetargetableStreamListener, nsIRequestObserver,
|
||||
nsIStreamListener)
|
||||
nsIRequestObserver, nsIStreamListener)
|
||||
|
||||
static void AppendNonAsciiToNCR(const nsAString& in, nsCString& out) {
|
||||
nsAString::const_iterator start, end;
|
||||
|
|
@ -617,25 +615,6 @@ nsIndexedToHTML::OnDataAvailable(nsIRequest* aRequest, nsIInputStream* aInput,
|
|||
return mParser->OnDataAvailable(aRequest, aInput, aOffset, aCount);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsIndexedToHTML::OnDataFinished(nsresult aStatus) {
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> listener =
|
||||
do_QueryInterface(mListener);
|
||||
|
||||
if (listener) {
|
||||
return listener->OnDataFinished(aStatus);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsIndexedToHTML::CheckListenerChain() {
|
||||
// nsIndexedToHTML does not support OnDataAvailable to run OMT. This class
|
||||
// should only pass-through OnDataFinished notification.
|
||||
return NS_ERROR_NO_INTERFACE;
|
||||
}
|
||||
|
||||
static nsresult FormatTime(
|
||||
const mozilla::intl::DateTimeFormat::StyleBag& aStyleBag,
|
||||
const PRTime aPrTime, nsAString& aStringOut) {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#define ____nsindexedtohtml___h___
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIThreadRetargetableStreamListener.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIStreamConverter.h"
|
||||
#include "nsIDirIndexListener.h"
|
||||
|
|
@ -28,7 +27,6 @@ class nsIndexedToHTML : public nsIStreamConverter, public nsIDirIndexListener {
|
|||
NS_DECL_NSISTREAMCONVERTER
|
||||
NS_DECL_NSIREQUESTOBSERVER
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
NS_DECL_NSITHREADRETARGETABLESTREAMLISTENER
|
||||
NS_DECL_NSIDIRINDEXLISTENER
|
||||
|
||||
nsIndexedToHTML() = default;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#include "nsMultiMixedConv.h"
|
||||
#include "nsIHttpChannel.h"
|
||||
#include "nsIThreadRetargetableStreamListener.h"
|
||||
#include "nsNetCID.h"
|
||||
#include "nsMimeTypes.h"
|
||||
#include "nsIStringStream.h"
|
||||
|
|
@ -403,7 +402,7 @@ nsPartChannel::GetBaseChannel(nsIChannel** aReturn) {
|
|||
|
||||
// nsISupports implementation
|
||||
NS_IMPL_ISUPPORTS(nsMultiMixedConv, nsIStreamConverter, nsIStreamListener,
|
||||
nsIThreadRetargetableStreamListener, nsIRequestObserver)
|
||||
nsIRequestObserver)
|
||||
|
||||
// nsIStreamConverter implementation
|
||||
|
||||
|
|
@ -554,12 +553,6 @@ nsMultiMixedConv::OnDataAvailable(nsIRequest* request, nsIInputStream* inStr,
|
|||
return NS_FAILED(rv_send) ? rv_send : rv_feed;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMultiMixedConv::OnDataFinished(nsresult aStatus) { return NS_OK; }
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMultiMixedConv::CheckListenerChain() { return NS_ERROR_NOT_IMPLEMENTED; }
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMultiMixedConv::OnStopRequest(nsIRequest* request, nsresult aStatus) {
|
||||
nsresult rv;
|
||||
|
|
|
|||
|
|
@ -132,7 +132,6 @@ class nsMultiMixedConv : public nsIStreamConverter {
|
|||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSISTREAMCONVERTER
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
NS_DECL_NSITHREADRETARGETABLESTREAMLISTENER
|
||||
NS_DECL_NSIREQUESTOBSERVER
|
||||
|
||||
explicit nsMultiMixedConv();
|
||||
|
|
|
|||
|
|
@ -108,8 +108,7 @@ NS_INTERFACE_MAP_BEGIN(nsUnknownDecoder)
|
|||
NS_INTERFACE_MAP_ENTRY(nsIRequestObserver)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIContentSniffer)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIThreadRetargetableStreamListener)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports,
|
||||
nsIThreadRetargetableStreamListener)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIStreamListener)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
// ----
|
||||
|
|
@ -797,20 +796,6 @@ nsUnknownDecoder::CheckListenerChain() {
|
|||
return listener->CheckListenerChain();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsUnknownDecoder::OnDataFinished(nsresult aStatus) {
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> listener;
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
listener = do_QueryInterface(mNextListener);
|
||||
}
|
||||
if (listener) {
|
||||
return listener->OnDataFinished(aStatus);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void nsBinaryDetector::DetermineContentType(nsIRequest* aRequest) {
|
||||
nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aRequest);
|
||||
if (!httpChannel) {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@
|
|||
} \
|
||||
}
|
||||
|
||||
class nsUnknownDecoder : public nsIStreamConverter, public nsIContentSniffer {
|
||||
class nsUnknownDecoder : public nsIStreamConverter,
|
||||
public nsIContentSniffer,
|
||||
public nsIThreadRetargetableStreamListener {
|
||||
public:
|
||||
// nsISupports methods
|
||||
NS_DECL_ISUPPORTS
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* 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 "nsIThreadRetargetableStreamListener.idl"
|
||||
#include "nsIStreamListener.idl"
|
||||
|
||||
interface nsIChannel;
|
||||
interface nsIInputStream;
|
||||
|
|
@ -52,7 +52,7 @@ interface nsIInputStream;
|
|||
*/
|
||||
|
||||
[scriptable, uuid(0b6e2c69-5cf5-48b0-9dfd-c95950e2cc7b)]
|
||||
interface nsIStreamConverter : nsIThreadRetargetableStreamListener {
|
||||
interface nsIStreamConverter : nsIStreamListener {
|
||||
|
||||
/**
|
||||
* <b>SYNCRONOUS VERSION</b>
|
||||
|
|
|
|||
|
|
@ -75,8 +75,7 @@ nsHtml5StreamListener::OnStopRequest(nsIRequest* aRequest, nsresult aStatus) {
|
|||
if (MOZ_UNLIKELY(!mDelegate)) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
return ((nsHtml5StreamParser*)mDelegate)
|
||||
->OnStopRequest(aRequest, aStatus, autoEnter);
|
||||
return ((nsHtml5StreamParser*)mDelegate)->OnStopRequest(aRequest, aStatus);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
@ -91,15 +90,3 @@ nsHtml5StreamListener::OnDataAvailable(nsIRequest* aRequest,
|
|||
return ((nsHtml5StreamParser*)mDelegate)
|
||||
->OnDataAvailable(aRequest, aInStream, aSourceOffset, aLength);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHtml5StreamListener::OnDataFinished(nsresult aStatus) {
|
||||
mozilla::ReentrantMonitorAutoEnter autoEnter(mDelegateMonitor);
|
||||
|
||||
if (MOZ_UNLIKELY(!mDelegate)) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
return ((nsHtml5StreamParser*)mDelegate)
|
||||
->OnStopRequest(nullptr, aStatus, autoEnter);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@
|
|||
* threads, so there is no need to have a mutex around nsHtml5StreamParserPtr to
|
||||
* prevent it from double-releasing nsHtml5StreamParser.
|
||||
*/
|
||||
class nsHtml5StreamListener : public nsIThreadRetargetableStreamListener {
|
||||
class nsHtml5StreamListener : public nsIStreamListener,
|
||||
public nsIThreadRetargetableStreamListener {
|
||||
public:
|
||||
explicit nsHtml5StreamListener(nsHtml5StreamParser* aDelegate);
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
#include "mozilla/Services.h"
|
||||
#include "mozilla/StaticPrefs_html5.h"
|
||||
#include "mozilla/StaticPrefs_intl.h"
|
||||
#include "mozilla/StaticPrefs_network.h"
|
||||
#include "mozilla/TextUtils.h"
|
||||
|
||||
#include "mozilla/UniquePtrExtensions.h"
|
||||
|
|
@ -1390,39 +1389,14 @@ class nsHtml5RequestStopper : public Runnable {
|
|||
}
|
||||
};
|
||||
|
||||
nsresult nsHtml5StreamParser::OnStopRequest(
|
||||
nsIRequest* aRequest, nsresult status,
|
||||
const mozilla::ReentrantMonitorAutoEnter& aProofOfLock) {
|
||||
MOZ_ASSERT_IF(aRequest, mRequest == aRequest);
|
||||
if (mOnStopCalled) {
|
||||
return NS_OK;
|
||||
nsresult nsHtml5StreamParser::OnStopRequest(nsIRequest* aRequest,
|
||||
nsresult status) {
|
||||
MOZ_ASSERT(mRequest == aRequest, "Got Stop on wrong stream.");
|
||||
MOZ_ASSERT(NS_IsMainThread(), "Wrong thread!");
|
||||
nsCOMPtr<nsIRunnable> stopper = new nsHtml5RequestStopper(this);
|
||||
if (NS_FAILED(mEventTarget->Dispatch(stopper, nsIThread::DISPATCH_NORMAL))) {
|
||||
NS_WARNING("Dispatching StopRequest event failed.");
|
||||
}
|
||||
|
||||
mOnStopCalled = true;
|
||||
|
||||
if (MOZ_UNLIKELY(NS_IsMainThread())) {
|
||||
nsCOMPtr<nsIRunnable> stopper = new nsHtml5RequestStopper(this);
|
||||
if (NS_FAILED(
|
||||
mEventTarget->Dispatch(stopper, nsIThread::DISPATCH_NORMAL))) {
|
||||
NS_WARNING("Dispatching StopRequest event failed.");
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (!StaticPrefs::network_send_OnDataFinished_html5parser()) {
|
||||
// Let the MainThread event handle this, even though it will just
|
||||
// send it back to this thread, so we can accurately judge the impact
|
||||
// of this change. This should eventually be removed once the PoC is
|
||||
// complete
|
||||
mOnStopCalled = false;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(IsParserThread(), "Wrong thread!");
|
||||
|
||||
mozilla::MutexAutoLock autoLock(mTokenizerMutex);
|
||||
DoStopRequest();
|
||||
PostLoadFlusher();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,11 +11,9 @@
|
|||
#include "MainThreadUtils.h"
|
||||
#include "mozilla/AlreadyAddRefed.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/Atomics.h"
|
||||
#include "mozilla/Encoding.h"
|
||||
#include "mozilla/Mutex.h"
|
||||
#include "mozilla/NotNull.h"
|
||||
#include "mozilla/ReentrantMonitor.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "mozilla/Span.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
|
|
@ -207,14 +205,8 @@ class nsHtml5StreamParser final : public nsISupports {
|
|||
|
||||
nsresult OnDataAvailable(nsIRequest* aRequest, nsIInputStream* aInStream,
|
||||
uint64_t aSourceOffset, uint32_t aLength);
|
||||
/**
|
||||
* ReentrantMonitorAutoEnter is used for protecting access to
|
||||
* nsHtml5StreamParser::mOnStopCalled and should be obtained from
|
||||
* nsHtml5StreamListener::mDelegateMonitor
|
||||
*/
|
||||
nsresult OnStopRequest(
|
||||
nsIRequest* aRequest, nsresult status,
|
||||
const mozilla::ReentrantMonitorAutoEnter& aProofOfLock);
|
||||
|
||||
nsresult OnStopRequest(nsIRequest* aRequest, nsresult status);
|
||||
|
||||
// EncodingDeclarationHandler
|
||||
// https://hg.mozilla.org/projects/htmlparser/file/tip/src/nu/validator/htmlparser/common/EncodingDeclarationHandler.java
|
||||
|
|
@ -764,13 +756,6 @@ class nsHtml5StreamParser final : public nsISupports {
|
|||
* If content is being sent to the devtools, an encoded UUID for the parser.
|
||||
*/
|
||||
nsString mUUIDForDevtools;
|
||||
|
||||
/**
|
||||
* prevent multiple calls to OnStopRequest
|
||||
* This field can be called from multiple threads and is protected by
|
||||
* nsHtml5StreamListener::mDelegateMonitor passed in the OnStopRequest
|
||||
*/
|
||||
bool mOnStopCalled{false};
|
||||
};
|
||||
|
||||
#endif // nsHtml5StreamParser_h
|
||||
|
|
|
|||
|
|
@ -1197,18 +1197,6 @@ ChannelWrapper::RequestListener::CheckListenerChain() {
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ChannelWrapper::RequestListener::OnDataFinished(nsresult aStatus) {
|
||||
MOZ_ASSERT(mOrigStreamListener, "Should have mOrigStreamListener");
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> retargetableListener =
|
||||
do_QueryInterface(mOrigStreamListener);
|
||||
if (retargetableListener) {
|
||||
return retargetableListener->OnDataFinished(aStatus);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* Event dispatching
|
||||
*****************************************************************************/
|
||||
|
|
|
|||
|
|
@ -326,7 +326,8 @@ class ChannelWrapper final : public DOMEventTargetHelper,
|
|||
// when called for the first time and then cleared on the Resume method.
|
||||
nsCString mSuspendedMarkerText = VoidCString();
|
||||
|
||||
class RequestListener final : public nsIMultiPartChannelListener,
|
||||
class RequestListener final : public nsIStreamListener,
|
||||
public nsIMultiPartChannelListener,
|
||||
public nsIThreadRetargetableStreamListener {
|
||||
public:
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
|
|
|||
|
|
@ -233,29 +233,6 @@ StreamFilterParent::CheckListenerChain() {
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
StreamFilterParent::OnDataFinished(nsresult aStatus) {
|
||||
AssertIsIOThread();
|
||||
|
||||
// Forwarding onDataFinished to the mOriginListener when:
|
||||
// - the StreamFilter is already disconnected
|
||||
// - it does not have any buffered data which would still need
|
||||
// to be sent to the mOrigListener and we have
|
||||
// - we have not yet called mOrigListener OnStopRequest method.
|
||||
if (!mDisconnected || !mBufferedData.isEmpty() || mSentStop) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> listener =
|
||||
do_QueryInterface(mOrigListener);
|
||||
|
||||
if (listener) {
|
||||
return listener->OnDataFinished(aStatus);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* Error handling
|
||||
*****************************************************************************/
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ using namespace mozilla::dom;
|
|||
using mozilla::ipc::IPCResult;
|
||||
|
||||
class StreamFilterParent final : public PStreamFilterParent,
|
||||
public nsIStreamListener,
|
||||
public nsIThreadRetargetableStreamListener,
|
||||
public nsIRequest,
|
||||
public StreamFilterBase {
|
||||
|
|
|
|||
|
|
@ -204,20 +204,6 @@ nsDocumentOpenInfo::OnDataAvailable(nsIRequest* request, nsIInputStream* inStr,
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocumentOpenInfo::OnDataFinished(nsresult aStatus) {
|
||||
if (!m_targetStreamListener) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> retargetableListener =
|
||||
do_QueryInterface(m_targetStreamListener);
|
||||
if (retargetableListener) {
|
||||
return retargetableListener->OnDataFinished(aStatus);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocumentOpenInfo::OnStopRequest(nsIRequest* request,
|
||||
nsresult aStatus) {
|
||||
LOG(("[0x%p] nsDocumentOpenInfo::OnStopRequest", this));
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ class nsURILoader final : public nsIURILoader {
|
|||
* Each instance remains alive until its target URL has been loaded
|
||||
* (or aborted).
|
||||
*/
|
||||
class nsDocumentOpenInfo : public nsIThreadRetargetableStreamListener {
|
||||
class nsDocumentOpenInfo : public nsIStreamListener,
|
||||
public nsIThreadRetargetableStreamListener {
|
||||
public:
|
||||
// Real constructor
|
||||
// aFlags is a combination of the flags on nsIURILoader
|
||||
|
|
|
|||
Loading…
Reference in a new issue