Bug 1517601, part 1 - Remove the unused WebSocketChannelChild::DispatchToTargetThread() method. r=mayhemer
authorAndrew McCreight <continuation@gmail.com>
Wed, 13 Feb 2019 16:49:26 +0000
changeset 458929 8f6fc796dca2
parent 458928 b1b031c761f5
child 458930 57206fca017d
push id35551
push usershindli@mozilla.com
push dateWed, 13 Feb 2019 21:34:09 +0000
treeherdermozilla-central@08f794a4928e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemer
bugs1517601
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1517601, part 1 - Remove the unused WebSocketChannelChild::DispatchToTargetThread() method. r=mayhemer Later patches change the WrappedChannelEvent ctor, so I'm removing this unused method to avoid having to fix it up. Differential Revision: https://phabricator.services.mozilla.com/D19585
netwerk/protocol/websocket/WebSocketChannelChild.cpp
netwerk/protocol/websocket/WebSocketChannelChild.h
--- a/netwerk/protocol/websocket/WebSocketChannelChild.cpp
+++ b/netwerk/protocol/websocket/WebSocketChannelChild.cpp
@@ -129,26 +129,16 @@ class WrappedChannelEvent : public Runna
     mChannelEvent->Run();
     return NS_OK;
   }
 
  private:
   nsAutoPtr<ChannelEvent> mChannelEvent;
 };
 
-void WebSocketChannelChild::DispatchToTargetThread(
-    ChannelEvent* aChannelEvent) {
-  MOZ_RELEASE_ASSERT(NS_IsMainThread());
-  MOZ_RELEASE_ASSERT(mTargetThread);
-  MOZ_RELEASE_ASSERT(aChannelEvent);
-
-  mTargetThread->Dispatch(new WrappedChannelEvent(aChannelEvent),
-                          NS_DISPATCH_NORMAL);
-}
-
 class EventTargetDispatcher : public ChannelEvent {
  public:
   EventTargetDispatcher(ChannelEvent* aChannelEvent,
                         nsIEventTarget* aEventTarget)
       : mChannelEvent(aChannelEvent), mEventTarget(aEventTarget) {}
 
   void Run() override {
     if (mEventTarget) {
--- a/netwerk/protocol/websocket/WebSocketChannelChild.h
+++ b/netwerk/protocol/websocket/WebSocketChannelChild.h
@@ -66,17 +66,16 @@ class WebSocketChannelChild final : publ
                const nsString& aEffectiveURL, const bool& aSecure);
   void OnStop(const nsresult& aStatusCode);
   void OnMessageAvailable(const nsCString& aMsg);
   void OnBinaryMessageAvailable(const nsCString& aMsg);
   void OnAcknowledge(const uint32_t& aSize);
   void OnServerClose(const uint16_t& aCode, const nsCString& aReason);
   void AsyncOpenFailed();
 
-  void DispatchToTargetThread(ChannelEvent* aChannelEvent);
   bool IsOnTargetThread();
 
   void MaybeReleaseIPCObject();
 
   // This function tries to get a labeled event target for |mNeckoTarget|.
   void SetupNeckoTarget();
 
   RefPtr<ChannelEventQueue> mEventQ;