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 458946 8f6fc796dca278262341cbf33174c65823f84b55
parent 458945 b1b031c761f5594550e4331755008a1e1c96f080
child 458947 57206fca017df883b2580c6c5e0eb109cd926c27
push id78119
push useramccreight@mozilla.com
push dateWed, 13 Feb 2019 17:35:06 +0000
treeherderautoland@56f7fee6d139 [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;