Bug 1501718 - Port Bug 1501404, part 7: Move XPCOM registration for nsSyncStreamListener to C-C common/. r=ehsan/valentin draft
authorJorg K <jorgk@jorgk.com>
Wed, 24 Oct 2018 19:31:59 +0200
changeset 1735936 365be2eda0e3e65a8aea3cfd8126cbd9676f19ca
parent 1735599 d94d73fcec772472f47a3b29f5bf6addd4315f39
child 1900703 608345ab593780f9607a18f3c209071f28879378
push id309401
push usermozilla@jorgk.com
push dateWed, 24 Oct 2018 17:37:56 +0000
treeherdertry@365be2eda0e3 [default view] [failures only]
reviewersehsan, valentin
bugs1501718, 1501404
milestone65.0a1
Bug 1501718 - Port Bug 1501404, part 7: Move XPCOM registration for nsSyncStreamListener to C-C common/. r=ehsan/valentin
netwerk/base/nsSyncStreamListener.h
--- a/netwerk/base/nsSyncStreamListener.h
+++ b/netwerk/base/nsSyncStreamListener.h
@@ -19,25 +19,25 @@ class nsSyncStreamListener final : publi
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIREQUESTOBSERVER
     NS_DECL_NSISTREAMLISTENER
     NS_DECL_NSISYNCSTREAMLISTENER
     NS_DECL_NSIINPUTSTREAM
 
     static already_AddRefed<nsISyncStreamListener> Create();
-
-private:
+    // The CTOR and Init() need to be public for the XPCOM registration in C-C common/.
     nsSyncStreamListener()
         : mStatus(NS_OK)
         , mKeepWaiting(false)
         , mDone(false) {}
-    ~nsSyncStreamListener() = default;
+    nsresult Init();
 
-    nsresult Init();
+private:
+    ~nsSyncStreamListener() = default;
 
     nsresult WaitForData();
 
     nsCOMPtr<nsIInputStream>    mPipeIn;
     nsCOMPtr<nsIOutputStream>   mPipeOut;
     nsresult                    mStatus;
     bool                        mKeepWaiting;
     bool                        mDone;