Bug 1511468 - make OnChannelReceivedMessage unconditionally defined; r=froydnj
authorJan Varga <jan.varga@gmail.com>
Fri, 30 Nov 2018 22:23:30 +0100
changeset 505476 5502cb3314146b27956f85ff7baf1872d8b86558
parent 505475 2dbebc773ce7d8ad5634cc5fdc4735065bc0ebef
child 505477 3124848b93c461baa76da73df141e392cc0eea39
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1511468
milestone65.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 1511468 - make OnChannelReceivedMessage unconditionally defined; r=froydnj
ipc/glue/MessageChannel.cpp
ipc/glue/ProtocolUtils.h
--- a/ipc/glue/MessageChannel.cpp
+++ b/ipc/glue/MessageChannel.cpp
@@ -1159,19 +1159,17 @@ bool MessageChannel::ShouldDeferMessage(
 }
 
 void MessageChannel::OnMessageReceivedFromLink(Message&& aMsg) {
   AssertLinkThread();
   mMonitor->AssertCurrentThreadOwns();
 
   if (MaybeInterceptSpecialIOMessage(aMsg)) return;
 
-#ifdef EARLY_BETA_OR_EARLIER
   mListener->OnChannelReceivedMessage(aMsg);
-#endif
 
   // Regardless of the Interrupt stack, if we're awaiting a sync reply,
   // we know that it needs to be immediately handled to unblock us.
   if (aMsg.is_sync() && aMsg.is_reply()) {
     IPC_LOG("Received reply seqno=%d xid=%d", aMsg.seqno(),
             aMsg.transaction_id());
 
     if (aMsg.seqno() == mTimedOutMessageSeqno) {
--- a/ipc/glue/ProtocolUtils.h
+++ b/ipc/glue/ProtocolUtils.h
@@ -550,22 +550,17 @@ class IToplevelProtocol : public IProtoc
   // that a message might affect. This should be used only as a last resort
   // when it's difficult to determine an EventTarget ahead of time. See the
   // comment in nsILabelableRunnable.h for more information.
   virtual bool GetMessageSchedulerGroups(const Message& aMsg,
                                          SchedulerGroupSet& aGroups) {
     return false;
   }
 
-  // This method is only used for collecting telemetry bits in various places,
-  // and we shouldn't pay the overhead of having it in protocol vtables when
-  // it's not being used.
-#ifdef EARLY_BETA_OR_EARLIER
   virtual void OnChannelReceivedMessage(const Message& aMsg) {}
-#endif
 
   bool IsMainThreadProtocol() const { return mIsMainThreadProtocol; }
   void SetIsMainThreadProtocol() { mIsMainThreadProtocol = NS_IsMainThread(); }
 
   already_AddRefed<nsIEventTarget> GetMessageEventTarget(const Message& aMsg) {
     return DowncastState()->GetMessageEventTarget(aMsg);
   }