Bug: error: member access into incomplete type 'nsIInputStream' Needs port of Bug 1614208
Status: RESOLVED
Priority: --
Resolution: FIXED
Created: 2020-02-11 17:40:08+00:00
Resolved: 2020-02-12 09:36:25+00:00

My error output:
2:14.90 z:/Mozilla/comm-central/netwerk/sctp/datachannel/DataChannel.cpp(2853,8): error: member access into incomplete type 'nsIInputStream'
 2:14.92   aBlob->Close();
 2:14.92        ^
 2:14.93 z:/Mozilla/TB/dist/include/nsIStreamListener.h(19,7): note: forward declaration of 'nsIInputStream'
 2:14.93 class nsIInputStream; /* forward declaration */
 2:14.93       ^
 2:15.74 In file included from z:/Mozilla/comm-central/netwerk/sctp/datachannel/DataChannel.cpp:33:
 2:15.78 In file included from z:/Mozilla/TB/dist/include/nsServiceManagerUtils.h:10:
 2:15.82 In file included from z:/Mozilla/TB/dist/include\nsCOMPtr.h:28:
 2:15.84 z:/Mozilla/TB/dist/include\mozilla/RefPtr.h(49,37): error: member access into incomplete type 'nsIInputStream'
 2:15.87   static void AddRef(U* aPtr) { aPtr->AddRef(); }
 2:15.88                                     ^
 2:15.88 z:/Mozilla/TB/dist/include\mozilla/RefPtr.h(378,61): note: in instantiation of member function 'mozilla::RefPtrTraits<nsIInputStream>::AddRef' requested here
 2:15.88     static void AddRef(U* aPtr) { mozilla::RefPtrTraits<U>::AddRef(aPtr); }
 2:15.88                                                             ^
 2:15.88 z:/Mozilla/TB/dist/include\mozilla/RefPtr.h(109,37): note: in instantiation of member function 'RefPtr<nsIInputStream>::ConstRemovingRefPtrTraits<nsIInputStream>::AddRef' requested here
 2:15.88       ConstRemovingRefPtrTraits<T>::AddRef(mRawPtr);
 2:15.88                                     ^
 2:15.88 z:/Mozilla/comm-central/netwerk/sctp/datachannel/DataChannel.cpp(2719,9): note: in instantiation of member function 'RefPtr<nsIInputStream>::RefPtr' requested here
 2:15.88         mBlob(aBlob) {}
 2:15.88         ^
 2:15.88 z:/Mozilla/TB/dist/include/nsIStreamListener.h(19,7): note: forward declaration of 'nsIInputStream'
 2:15.88 class nsIInputStream; /* forward declaration */
 2:15.88       ^
 2:15.88 In file included from z:/Mozilla/comm-central/netwerk/sctp/datachannel/DataChannel.cpp:33:
 2:15.88 In file included from z:/Mozilla/TB/dist/include/nsServiceManagerUtils.h:10:
 2:15.88 In file included from z:/Mozilla/TB/dist/include\nsCOMPtr.h:28:
 2:15.88 z:/Mozilla/TB/dist/include\mozilla/RefPtr.h(50,38): error: member access into incomplete type 'nsIInputStream'
 2:15.89   static void Release(U* aPtr) { aPtr->Release(); }
 2:15.89                                      ^
 2:15.89 z:/Mozilla/TB/dist/include\mozilla/RefPtr.h(379,62): note: in instantiation of member function 'mozilla::RefPtrTraits<nsIInputStream>::Release' requested here
 2:15.89     static void Release(U* aPtr) { mozilla::RefPtrTraits<U>::Release(aPtr); }
 2:15.89                                                              ^
 2:15.89 z:/Mozilla/TB/dist/include\mozilla/RefPtr.h(81,37): note: in instantiation of member function 'RefPtr<nsIInputStream>::ConstRemovingRefPtrTraits<nsIInputStream>::Release' requested here
 2:15.89       ConstRemovingRefPtrTraits<T>::Release(mRawPtr);
 2:15.89                                     ^
 2:15.89 z:/Mozilla/comm-central/netwerk/sctp/datachannel/DataChannel.cpp(2714,3): note: in instantiation of member function 'RefPtr<nsIInputStream>::~RefPtr' requested here
 2:15.89   ReadBlobRunnable(DataChannelConnection* aConnection, uint16_t aStream,
 2:15.89   ^
 2:15.89 z:/Mozilla/TB/dist/include/nsIStreamListener.h(19,7): note: forward declaration of 'nsIInputStream'
 2:15.89 class nsIInputStream; /* forward declaration */
 2:15.90       ^
 2:15.90 In file included from z:/Mozilla/comm-central/netwerk/sctp/datachannel/DataChannel.cpp:33:
 2:15.90 In file included from z:/Mozilla/TB/dist/include/nsServiceManagerUtils.h:10:
 2:15.90 z:/Mozilla/TB/dist/include\nsCOMPtr.h(425,5): error: static_assert failed due to requirement '1 < sizeof (TestForIID<nsIInputStream>(nullptr))' "nsCOMPtr only works for types with IIDs.  Either use RefPtr; add an IID to your type with NS_DECLARE_STATIC_IID_ACCESSOR/NS_DEFINE_STATIC_IID_ACCESSOR; or make the nsCOMPtr point to a base class with an IID."
 2:15.90     static_assert(1 < sizeof(TestForIID<T>(nullptr)),
 2:15.90     ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2:15.90 z:/Mozilla/TB/dist/include\nsCOMPtr.h(466,5): note: in instantiation of member function 'nsCOMPtr<nsIInputStream>::assert_validity' requested here
 2:15.90     assert_validity();
 2:15.90     ^
 2:15.90 z:/Mozilla/comm-central/netwerk/sctp/datachannel/DataChannel.cpp(3211,28): note: in instantiation of member function 'nsCOMPtr<nsIInputStream>::nsCOMPtr' requested here
 2:15.90   nsCOMPtr<nsIInputStream> msgStream;
 2:15.90                            ^
 2:15.90 In file included from z:/Mozilla/comm-central/netwerk/sctp/datachannel/DataChannel.cpp:33:
 2:15.90 In file included from z:/Mozilla/TB/dist/include/nsServiceManagerUtils.h:10:
 2:15.90 z:/Mozilla/TB/dist/include\nsCOMPtr.h(389,43): error: no matching function for call to 'ToSupports'
 2:15.91     nsCOMPtr_base::assign_assuming_AddRef(ToSupports(aNewPtr));
 2:15.91                                           ^~~~~~~~~~
 2:15.91 z:/Mozilla/TB/dist/include\nsCOMPtr.h(878,5): note: in instantiation of member function 'nsCOMPtr<nsIInputStream>::assign_assuming_AddRef' requested here
 2:15.91     assign_assuming_AddRef(nullptr);
 2:15.91     ^
 2:15.91 z:/Mozilla/TB/dist/include\nsCOMPtr.h(1319,43): note: in instantiation of member function 'nsCOMPtr<nsIInputStream>::StartAssignment' requested here
 2:15.91   operator T**() { return mTargetSmartPtr.StartAssignment(); }
 2:15.91                                           ^
 2:15.91 z:/Mozilla/comm-central/netwerk/sctp/datachannel/DataChannel.cpp(3212,27): note: in instantiation of member function 'nsGetterAddRefs<nsIInputStream>::operator nsIInputStream **' requested here
 2:15.91   aBlob.CreateInputStream(getter_AddRefs(msgStream), aRv);
 2:15.92                           ^
 2:15.92 z:/Mozilla/TB/dist/include\nsISupportsImpl.h(37,21): note: candidate function not viable: cannot convert argument of incomplete type 'nsIInputStream *' to 'decltype(nullptr)' (aka 'nullptr_t') for 1st argument
 2:15.92 inline nsISupports* ToSupports(decltype(nullptr)) { return nullptr; }
 2:15.92                     ^
 2:15.92 z:/Mozilla/TB/dist/include\nsISupportsImpl.h(39,21): note: candidate function not viable: cannot convert argument of incomplete type 'nsIInputStream *' to 'nsISupports *' for 1st argument
 2:15.92 inline nsISupports* ToSupports(nsISupports* aSupports) { return aSupports; }
 2:15.92                     ^
 2:15.92 z:/Mozilla/TB/dist/include\nsThreadUtils.h(647,21): note: candidate function not viable: cannot convert argument of incomplete type 'nsIInputStream *' to 'mozilla::Runnable *' for 1st argument
 2:15.92 inline nsISupports* ToSupports(mozilla::Runnable* p) {
 2:15.92                     ^
 2:15.92 z:/Mozilla/TB/dist/include/nsINode.h(2179,21): note: candidate function not viable: cannot convert argument of incomplete type 'nsIInputStream *' to 'nsINode *' for 1st argument
 2:15.92 inline nsISupports* ToSupports(nsINode* aPointer) { return aPointer; }
 2:15.92                     ^
 2:15.92 z:/Mozilla/TB/dist/include/mozilla/dom/Document.h(5197,21): note: candidate function not viable: cannot convert argument of incomplete type 'nsIInputStream *' to 'mozilla::dom::Document *' for 1st argument
 2:15.93 inline nsISupports* ToSupports(mozilla::dom::Document* aDoc) {
 2:15.93                     ^
 2:15.93 z:/Mozilla/TB/dist/include\mozilla/dom/Blob.h(155,21): note: candidate function not viable: cannot convert argument of incomplete type 'nsIInputStream *' to 'mozilla::dom::Blob *' for 1st argument
 2:15.93 inline nsISupports* ToSupports(mozilla::dom::Blob* aBlob) {
 2:15.93                     ^
 2:15.93 z:/Mozilla/TB/dist/include/nsCycleCollectionNoteChild.h(44,14): note: candidate template ignored: substitution failure [with T = nsIInputStream]: incomplete type 'nsIInputStream' named in nested name specifier
 2:15.93 nsISupports* ToSupports(
 2:15.93              ^