From 5591616b20cff0928d54616eac4b45cbf704fe3f Mon Sep 17 00:00:00 2001 From: Brian Crowder Date: Wed, 15 Sep 2010 15:55:08 -0700 Subject: [PATCH] Bug 567267 - Move nsIEncodedChannel logic to base Http class, r=dwitte, blocking-fennec2.0b1=mfinkle --- netwerk/protocol/http/HttpBaseChannel.cpp | 178 +++++++++++++++++++- netwerk/protocol/http/HttpBaseChannel.h | 33 ++++ netwerk/protocol/http/HttpChannelChild.cpp | 24 --- netwerk/protocol/http/HttpChannelChild.h | 3 - netwerk/protocol/http/nsHttpChannel.cpp | 183 --------------------- netwerk/protocol/http/nsHttpChannel.h | 29 ---- xpcom/glue/nsISupportsImpl.h | 4 + 7 files changed, 213 insertions(+), 241 deletions(-) diff --git a/netwerk/protocol/http/HttpBaseChannel.cpp b/netwerk/protocol/http/HttpBaseChannel.cpp index 05c3edb926fb..1ccf7d4e4582 100644 --- a/netwerk/protocol/http/HttpBaseChannel.cpp +++ b/netwerk/protocol/http/HttpBaseChannel.cpp @@ -63,6 +63,7 @@ HttpBaseChannel::HttpBaseChannel() , mPriority(PRIORITY_NORMAL) , mCaps(0) , mRedirectionLimit(gHttpHandler->RedirectionLimit()) + , mApplyConversion(PR_TRUE) , mCanceled(PR_FALSE) , mIsPending(PR_FALSE) , mWasOpened(PR_FALSE) @@ -157,10 +158,11 @@ HttpBaseChannel::Init(nsIURI *aURI, // HttpBaseChannel::nsISupports //----------------------------------------------------------------------------- -NS_IMPL_ISUPPORTS_INHERITED7(HttpBaseChannel, +NS_IMPL_ISUPPORTS_INHERITED8(HttpBaseChannel, nsHashPropertyBag, nsIRequest, nsIChannel, + nsIEncodedChannel, nsIHttpChannel, nsIHttpChannelInternal, nsIUploadChannel, @@ -375,7 +377,7 @@ HttpBaseChannel::GetContentLength(PRInt32 *aContentLength) NS_IMETHODIMP HttpBaseChannel::SetContentLength(PRInt32 value) { - NS_NOTYETIMPLEMENTED("nsHttpChannel::SetContentLength"); + NS_NOTYETIMPLEMENTED("HttpBaseChannel::SetContentLength"); return NS_ERROR_NOT_IMPLEMENTED; } @@ -485,6 +487,178 @@ HttpBaseChannel::ExplicitSetUploadStream(nsIInputStream *aStream, return NS_OK; } +//----------------------------------------------------------------------------- +// HttpBaseChannel::nsIEncodedChannel +//----------------------------------------------------------------------------- + +NS_IMETHODIMP +HttpBaseChannel::GetApplyConversion(PRBool *value) +{ + *value = mApplyConversion; + return NS_OK; +} + +NS_IMETHODIMP +HttpBaseChannel::SetApplyConversion(PRBool value) +{ + LOG(("HttpBaseChannel::SetApplyConversion [this=%p value=%d]\n", this, value)); + mApplyConversion = value; + return NS_OK; +} + +NS_IMETHODIMP +HttpBaseChannel::GetContentEncodings(nsIUTF8StringEnumerator** aEncodings) +{ + if (!mResponseHead) { + *aEncodings = nsnull; + return NS_OK; + } + + const char *encoding = mResponseHead->PeekHeader(nsHttp::Content_Encoding); + if (!encoding) { + *aEncodings = nsnull; + return NS_OK; + } + nsContentEncodings* enumerator = new nsContentEncodings(this, encoding); + NS_ADDREF(*aEncodings = enumerator); + return NS_OK; +} + +//----------------------------------------------------------------------------- +// HttpBaseChannel::nsContentEncodings +//----------------------------------------------------------------------------- + +HttpBaseChannel::nsContentEncodings::nsContentEncodings(nsIHttpChannel* aChannel, + const char* aEncodingHeader) + : mEncodingHeader(aEncodingHeader) + , mChannel(aChannel) + , mReady(PR_FALSE) +{ + mCurEnd = aEncodingHeader + strlen(aEncodingHeader); + mCurStart = mCurEnd; +} + +HttpBaseChannel::nsContentEncodings::~nsContentEncodings() +{ +} + +//----------------------------------------------------------------------------- +// HttpBaseChannel::nsContentEncodings::nsISimpleEnumerator +//----------------------------------------------------------------------------- + +NS_IMETHODIMP +HttpBaseChannel::nsContentEncodings::HasMore(PRBool* aMoreEncodings) +{ + if (mReady) { + *aMoreEncodings = PR_TRUE; + return NS_OK; + } + + nsresult rv = PrepareForNext(); + *aMoreEncodings = NS_SUCCEEDED(rv); + return NS_OK; +} + +NS_IMETHODIMP +HttpBaseChannel::nsContentEncodings::GetNext(nsACString& aNextEncoding) +{ + aNextEncoding.Truncate(); + if (!mReady) { + nsresult rv = PrepareForNext(); + if (NS_FAILED(rv)) { + return NS_ERROR_FAILURE; + } + } + + const nsACString & encoding = Substring(mCurStart, mCurEnd); + + nsACString::const_iterator start, end; + encoding.BeginReading(start); + encoding.EndReading(end); + + PRBool haveType = PR_FALSE; + if (CaseInsensitiveFindInReadable(NS_LITERAL_CSTRING("gzip"), start, end)) { + aNextEncoding.AssignLiteral(APPLICATION_GZIP); + haveType = PR_TRUE; + } + + if (!haveType) { + encoding.BeginReading(start); + if (CaseInsensitiveFindInReadable(NS_LITERAL_CSTRING("compress"), start, end)) { + aNextEncoding.AssignLiteral(APPLICATION_COMPRESS); + haveType = PR_TRUE; + } + } + + if (!haveType) { + encoding.BeginReading(start); + if (CaseInsensitiveFindInReadable(NS_LITERAL_CSTRING("deflate"), start, end)) { + aNextEncoding.AssignLiteral(APPLICATION_ZIP); + haveType = PR_TRUE; + } + } + + // Prepare to fetch the next encoding + mCurEnd = mCurStart; + mReady = PR_FALSE; + + if (haveType) + return NS_OK; + + NS_WARNING("Unknown encoding type"); + return NS_ERROR_FAILURE; +} + +//----------------------------------------------------------------------------- +// HttpBaseChannel::nsContentEncodings::nsISupports +//----------------------------------------------------------------------------- + +NS_IMPL_ISUPPORTS1(HttpBaseChannel::nsContentEncodings, nsIUTF8StringEnumerator) + +//----------------------------------------------------------------------------- +// HttpBaseChannel::nsContentEncodings +//----------------------------------------------------------------------------- + +nsresult +HttpBaseChannel::nsContentEncodings::PrepareForNext(void) +{ + NS_ASSERTION(mCurStart == mCurEnd, "Indeterminate state"); + + // At this point both mCurStart and mCurEnd point to somewhere + // past the end of the next thing we want to return + + while (mCurEnd != mEncodingHeader) { + --mCurEnd; + if (*mCurEnd != ',' && !nsCRT::IsAsciiSpace(*mCurEnd)) + break; + } + if (mCurEnd == mEncodingHeader) + return NS_ERROR_NOT_AVAILABLE; // no more encodings + ++mCurEnd; + + // At this point mCurEnd points to the first char _after_ the + // header we want. Furthermore, mCurEnd - 1 != mEncodingHeader + + mCurStart = mCurEnd - 1; + while (mCurStart != mEncodingHeader && + *mCurStart != ',' && !nsCRT::IsAsciiSpace(*mCurStart)) + --mCurStart; + if (*mCurStart == ',' || nsCRT::IsAsciiSpace(*mCurStart)) + ++mCurStart; // we stopped because of a weird char, so move up one + + // At this point mCurStart and mCurEnd bracket the encoding string + // we want. Check that it's not "identity" + if (Substring(mCurStart, mCurEnd).Equals("identity", + nsCaseInsensitiveCStringComparator())) { + mCurEnd = mCurStart; + return PrepareForNext(); + } + + mReady = PR_TRUE; + return NS_OK; +} + + //----------------------------------------------------------------------------- // HttpBaseChannel::nsIHttpChannel //----------------------------------------------------------------------------- diff --git a/netwerk/protocol/http/HttpBaseChannel.h b/netwerk/protocol/http/HttpBaseChannel.h index ebb523f2a787..82c6101721f0 100644 --- a/netwerk/protocol/http/HttpBaseChannel.h +++ b/netwerk/protocol/http/HttpBaseChannel.h @@ -48,12 +48,14 @@ #include "nsHttpRequestHead.h" #include "nsHttpResponseHead.h" #include "nsHttpConnectionInfo.h" +#include "nsIEncodedChannel.h" #include "nsIHttpChannel.h" #include "nsIHttpChannelInternal.h" #include "nsIUploadChannel.h" #include "nsIUploadChannel2.h" #include "nsIProgressEventSink.h" #include "nsIURI.h" +#include "nsIStringEnumerator.h" #include "nsISupportsPriority.h" #include "nsIApplicationCache.h" #include "nsIResumableChannel.h" @@ -91,6 +93,7 @@ typedef enum { eUploadStream_null = -1, * the way to the HTTP channel. */ class HttpBaseChannel : public nsHashPropertyBag + , public nsIEncodedChannel , public nsIHttpChannel , public nsIHttpChannelInternal , public nsIUploadChannel @@ -133,6 +136,11 @@ public: NS_IMETHOD SetContentLength(PRInt32 aContentLength); NS_IMETHOD Open(nsIInputStream **aResult); + // nsIEncodedChannel + NS_IMETHOD GetApplyConversion(PRBool *value); + NS_IMETHOD SetApplyConversion(PRBool value); + NS_IMETHOD GetContentEncodings(nsIUTF8StringEnumerator** aEncodings); + // HttpBaseChannel::nsIHttpChannel NS_IMETHOD GetRequestMethod(nsACString& aMethod); NS_IMETHOD SetRequestMethod(const nsACString& aMethod); @@ -175,6 +183,30 @@ public: // nsIResumableChannel NS_IMETHOD GetEntityID(nsACString& aEntityID); + class nsContentEncodings : public nsIUTF8StringEnumerator + { + public: + NS_DECL_ISUPPORTS + NS_DECL_NSIUTF8STRINGENUMERATOR + + nsContentEncodings(nsIHttpChannel* aChannel, const char* aEncodingHeader); + virtual ~nsContentEncodings(); + + private: + nsresult PrepareForNext(void); + + // We do not own the buffer. The channel owns it. + const char* mEncodingHeader; + const char* mCurStart; // points to start of current header + const char* mCurEnd; // points to end of current header + + // Hold a ref to our channel so that it can't go away and take the + // header with it. + nsCOMPtr mChannel; + + PRPackedBool mReady; + }; + protected: void AddCookiesToRequest(); virtual nsresult SetupReplacementChannel(nsIURI *, @@ -222,6 +254,7 @@ protected: PRUint8 mCaps; PRUint8 mRedirectionLimit; + PRUint32 mApplyConversion : 1; PRUint32 mCanceled : 1; PRUint32 mIsPending : 1; PRUint32 mWasOpened : 1; diff --git a/netwerk/protocol/http/HttpChannelChild.cpp b/netwerk/protocol/http/HttpChannelChild.cpp index 2aff747553be..abc6eb32757f 100644 --- a/netwerk/protocol/http/HttpChannelChild.cpp +++ b/netwerk/protocol/http/HttpChannelChild.cpp @@ -139,7 +139,6 @@ NS_INTERFACE_MAP_BEGIN(HttpChannelChild) NS_INTERFACE_MAP_ENTRY(nsIHttpChannel) NS_INTERFACE_MAP_ENTRY(nsIHttpChannelInternal) NS_INTERFACE_MAP_ENTRY(nsICacheInfoChannel) - NS_INTERFACE_MAP_ENTRY(nsIEncodedChannel) NS_INTERFACE_MAP_ENTRY(nsIResumableChannel) NS_INTERFACE_MAP_ENTRY(nsISupportsPriority) NS_INTERFACE_MAP_ENTRY(nsIProxiedChannel) @@ -990,29 +989,6 @@ HttpChannelChild::IsFromCache(PRBool *value) return NS_OK; } -//----------------------------------------------------------------------------- -// HttpChannelChild::nsIEncodedChannel -//----------------------------------------------------------------------------- - -NS_IMETHODIMP -HttpChannelChild::GetContentEncodings(nsIUTF8StringEnumerator **result) -{ - DROP_DEAD(); -} - -/* attribute boolean applyConversion; */ -NS_IMETHODIMP -HttpChannelChild::GetApplyConversion(PRBool *aApplyConversion) -{ - DROP_DEAD(); -} - -NS_IMETHODIMP -HttpChannelChild::SetApplyConversion(PRBool aApplyConversion) -{ - DROP_DEAD(); -} - //----------------------------------------------------------------------------- // HttpChannelChild::nsIResumableChannel //----------------------------------------------------------------------------- diff --git a/netwerk/protocol/http/HttpChannelChild.h b/netwerk/protocol/http/HttpChannelChild.h index 3314b150c85e..c3a3bbed85b3 100644 --- a/netwerk/protocol/http/HttpChannelChild.h +++ b/netwerk/protocol/http/HttpChannelChild.h @@ -54,7 +54,6 @@ #include "nsICacheInfoChannel.h" #include "nsIApplicationCache.h" #include "nsIApplicationCacheChannel.h" -#include "nsIEncodedChannel.h" #include "nsIUploadChannel2.h" #include "nsIResumableChannel.h" #include "nsIProxiedChannel.h" @@ -70,7 +69,6 @@ class ChildChannelEvent; class HttpChannelChild : public PHttpChannelChild , public HttpBaseChannel , public nsICacheInfoChannel - , public nsIEncodedChannel , public nsIProxiedChannel , public nsITraceableChannel , public nsIApplicationCacheChannel @@ -80,7 +78,6 @@ class HttpChannelChild : public PHttpChannelChild public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_NSICACHEINFOCHANNEL - NS_DECL_NSIENCODEDCHANNEL NS_DECL_NSIPROXIEDCHANNEL NS_DECL_NSITRACEABLECHANNEL NS_DECL_NSIAPPLICATIONCACHECONTAINER diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp index 31175600fcb9..a6458c5caa1a 100644 --- a/netwerk/protocol/http/nsHttpChannel.cpp +++ b/netwerk/protocol/http/nsHttpChannel.cpp @@ -121,7 +121,6 @@ nsHttpChannel::nsHttpChannel() , mAsyncCacheOpen(PR_FALSE) , mPendingAsyncCallOnResume(nsnull) , mSuspendCount(0) - , mApplyConversion(PR_TRUE) , mCachedContentIsValid(PR_FALSE) , mCachedContentIsPartial(PR_FALSE) , mTransactionReplaced(PR_FALSE) @@ -3479,7 +3478,6 @@ NS_INTERFACE_MAP_BEGIN(nsHttpChannel) NS_INTERFACE_MAP_ENTRY(nsIUploadChannel) NS_INTERFACE_MAP_ENTRY(nsIUploadChannel2) NS_INTERFACE_MAP_ENTRY(nsICacheListener) - NS_INTERFACE_MAP_ENTRY(nsIEncodedChannel) NS_INTERFACE_MAP_ENTRY(nsIHttpChannelInternal) NS_INTERFACE_MAP_ENTRY(nsIResumableChannel) NS_INTERFACE_MAP_ENTRY(nsITransportEventSink) @@ -3696,48 +3694,6 @@ nsHttpChannel::SetServicingRemoteChannel(PRBool value) mRemoteChannel = value; return NS_OK; } -//----------------------------------------------------------------------------- -// nsHttpChannel::nsIEncodedChannel -//----------------------------------------------------------------------------- - -NS_IMETHODIMP -nsHttpChannel::GetApplyConversion(PRBool *value) -{ - NS_ENSURE_ARG_POINTER(value); - *value = mApplyConversion; - return NS_OK; -} - -NS_IMETHODIMP -nsHttpChannel::SetApplyConversion(PRBool value) -{ - LOG(("nsHttpChannel::SetApplyConversion [this=%p value=%d]\n", this, value)); - mApplyConversion = value; - return NS_OK; -} - -NS_IMETHODIMP -nsHttpChannel::GetContentEncodings(nsIUTF8StringEnumerator** aEncodings) -{ - NS_PRECONDITION(aEncodings, "Null out param"); - if (!mResponseHead) { - *aEncodings = nsnull; - return NS_OK; - } - - const char *encoding = mResponseHead->PeekHeader(nsHttp::Content_Encoding); - if (!encoding) { - *aEncodings = nsnull; - return NS_OK; - } - nsContentEncodings* enumerator = new nsContentEncodings(this, encoding); - if (!enumerator) - return NS_ERROR_OUT_OF_MEMORY; - - NS_ADDREF(*aEncodings = enumerator); - return NS_OK; -} - //----------------------------------------------------------------------------- // nsHttpChannel::nsISupportsPriority //----------------------------------------------------------------------------- @@ -4751,145 +4707,6 @@ nsHttpChannel::PopRedirectAsyncFunc(nsContinueRedirectionFunc func) mRedirectFuncStack.TruncateLength(mRedirectFuncStack.Length() - 1); } -//----------------------------------------------------------------------------- -// nsHttpChannel::nsContentEncodings -//----------------------------------------------------------------------------- - -nsHttpChannel::nsContentEncodings::nsContentEncodings(nsIHttpChannel* aChannel, - const char* aEncodingHeader) : - mEncodingHeader(aEncodingHeader), mChannel(aChannel), mReady(PR_FALSE) -{ - mCurEnd = aEncodingHeader + strlen(aEncodingHeader); - mCurStart = mCurEnd; -} - -nsHttpChannel::nsContentEncodings::~nsContentEncodings() -{ -} - -//----------------------------------------------------------------------------- -// nsHttpChannel::nsContentEncodings::nsISimpleEnumerator -//----------------------------------------------------------------------------- - -NS_IMETHODIMP -nsHttpChannel::nsContentEncodings::HasMore(PRBool* aMoreEncodings) -{ - if (mReady) { - *aMoreEncodings = PR_TRUE; - return NS_OK; - } - - nsresult rv = PrepareForNext(); - *aMoreEncodings = NS_SUCCEEDED(rv); - return NS_OK; -} - -NS_IMETHODIMP -nsHttpChannel::nsContentEncodings::GetNext(nsACString& aNextEncoding) -{ - aNextEncoding.Truncate(); - if (!mReady) { - nsresult rv = PrepareForNext(); - if (NS_FAILED(rv)) { - return NS_ERROR_FAILURE; - } - } - - const nsACString & encoding = Substring(mCurStart, mCurEnd); - - nsACString::const_iterator start, end; - encoding.BeginReading(start); - encoding.EndReading(end); - - PRBool haveType = PR_FALSE; - if (CaseInsensitiveFindInReadable(NS_LITERAL_CSTRING("gzip"), - start, - end)) { - aNextEncoding.AssignLiteral(APPLICATION_GZIP); - haveType = PR_TRUE; - } - - if (!haveType) { - encoding.BeginReading(start); - if (CaseInsensitiveFindInReadable(NS_LITERAL_CSTRING("compress"), - start, - end)) { - aNextEncoding.AssignLiteral(APPLICATION_COMPRESS); - - haveType = PR_TRUE; - } - } - - if (! haveType) { - encoding.BeginReading(start); - if (CaseInsensitiveFindInReadable(NS_LITERAL_CSTRING("deflate"), - start, - end)) { - aNextEncoding.AssignLiteral(APPLICATION_ZIP); - haveType = PR_TRUE; - } - } - - // Prepare to fetch the next encoding - mCurEnd = mCurStart; - mReady = PR_FALSE; - - if (haveType) - return NS_OK; - - NS_WARNING("Unknown encoding type"); - return NS_ERROR_FAILURE; -} - -//----------------------------------------------------------------------------- -// nsHttpChannel::nsContentEncodings::nsISupports -//----------------------------------------------------------------------------- - -NS_IMPL_ISUPPORTS1(nsHttpChannel::nsContentEncodings, nsIUTF8StringEnumerator) - -//----------------------------------------------------------------------------- -// nsHttpChannel::nsContentEncodings -//----------------------------------------------------------------------------- - -nsresult -nsHttpChannel::nsContentEncodings::PrepareForNext(void) -{ - NS_PRECONDITION(mCurStart == mCurEnd, "Indeterminate state"); - - // At this point both mCurStart and mCurEnd point to somewhere - // past the end of the next thing we want to return - - while (mCurEnd != mEncodingHeader) { - --mCurEnd; - if (*mCurEnd != ',' && !nsCRT::IsAsciiSpace(*mCurEnd)) - break; - } - if (mCurEnd == mEncodingHeader) - return NS_ERROR_NOT_AVAILABLE; // no more encodings - ++mCurEnd; - - // At this point mCurEnd points to the first char _after_ the - // header we want. Furthermore, mCurEnd - 1 != mEncodingHeader - - mCurStart = mCurEnd - 1; - while (mCurStart != mEncodingHeader && - *mCurStart != ',' && !nsCRT::IsAsciiSpace(*mCurStart)) - --mCurStart; - if (*mCurStart == ',' || nsCRT::IsAsciiSpace(*mCurStart)) - ++mCurStart; // we stopped because of a weird char, so move up one - - // At this point mCurStart and mCurEnd bracket the encoding string - // we want. Check that it's not "identity" - if (Substring(mCurStart, mCurEnd).Equals("identity", - nsCaseInsensitiveCStringComparator())) { - mCurEnd = mCurStart; - return PrepareForNext(); - } - - mReady = PR_TRUE; - return NS_OK; -} - //----------------------------------------------------------------------------- // nsStreamListenerWrapper //----------------------------------------------------------------------------- diff --git a/netwerk/protocol/http/nsHttpChannel.h b/netwerk/protocol/http/nsHttpChannel.h index eace23d05071..24734d6b13c1 100644 --- a/netwerk/protocol/http/nsHttpChannel.h +++ b/netwerk/protocol/http/nsHttpChannel.h @@ -55,8 +55,6 @@ #include "nsICacheEntryDescriptor.h" #include "nsICacheListener.h" #include "nsIApplicationCacheChannel.h" -#include "nsIEncodedChannel.h" -#include "nsIStringEnumerator.h" #include "nsIPrompt.h" #include "nsIResumableChannel.h" #include "nsIProtocolProxyCallback.h" @@ -79,7 +77,6 @@ class nsHttpChannel : public HttpBaseChannel , public nsIStreamListener , public nsICachingChannel , public nsICacheListener - , public nsIEncodedChannel , public nsITransportEventSink , public nsIProtocolProxyCallback , public nsIHttpAuthenticableChannel @@ -95,7 +92,6 @@ public: NS_DECL_NSICACHEINFOCHANNEL NS_DECL_NSICACHINGCHANNEL NS_DECL_NSICACHELISTENER - NS_DECL_NSIENCODEDCHANNEL NS_DECL_NSITRANSPORTEVENTSINK NS_DECL_NSIPROTOCOLPROXYCALLBACK NS_DECL_NSIPROXIEDCHANNEL @@ -323,7 +319,6 @@ private: PRUint32 mRedirectType; // state flags - PRUint32 mApplyConversion : 1; PRUint32 mCachedContentIsValid : 1; PRUint32 mCachedContentIsPartial : 1; PRUint32 mTransactionReplaced : 1; @@ -350,30 +345,6 @@ private: // the cache entry's expiration time. Otherwise, it is not(see bug 567360). PRUint32 mRequestTimeInitialized : 1; - class nsContentEncodings : public nsIUTF8StringEnumerator - { - public: - NS_DECL_ISUPPORTS - NS_DECL_NSIUTF8STRINGENUMERATOR - - nsContentEncodings(nsIHttpChannel* aChannel, const char* aEncodingHeader); - virtual ~nsContentEncodings(); - - private: - nsresult PrepareForNext(void); - - // We do not own the buffer. The channel owns it. - const char* mEncodingHeader; - const char* mCurStart; // points to start of current header - const char* mCurEnd; // points to end of current header - - // Hold a ref to our channel so that it can't go away and take the - // header with it. - nsCOMPtr mChannel; - - PRPackedBool mReady; - }; - nsTArray mRedirectFuncStack; nsresult WaitForRedirectCallback(); diff --git a/xpcom/glue/nsISupportsImpl.h b/xpcom/glue/nsISupportsImpl.h index f776ca9ce594..d9ef0d8ed279 100644 --- a/xpcom/glue/nsISupportsImpl.h +++ b/xpcom/glue/nsISupportsImpl.h @@ -1226,6 +1226,10 @@ NS_IMETHODIMP_(nsrefcnt) Class::Release(void) \ NS_IMPL_ADDREF_INHERITED(Class, Super) \ NS_IMPL_RELEASE_INHERITED(Class, Super) \ +#define NS_IMPL_ISUPPORTS_INHERITED8(Class, Super, i1, i2, i3, i4, i5, i6, i7, i8) \ + NS_IMPL_QUERY_INTERFACE_INHERITED8(Class, Super, i1, i2, i3, i4, i5, i6, i7, i8) \ + NS_IMPL_ADDREF_INHERITED(Class, Super) \ + NS_IMPL_RELEASE_INHERITED(Class, Super) \ /* * Macro to glue together a QI that starts with an interface table * and segues into an interface map (e.g. it uses singleton classinfo