Back out bug 636063, bug 774988 and bug 784647 for busting all of Android.
authorMs2ger <ms2ger@gmail.com>
Sat, 25 Aug 2012 13:18:18 +0200
changeset 103431 941fff75a9e7ec1cee54538af443c1e7e16f1cf7
parent 103419 2bcda3ce2bc9013e6656337a15ccd257ac62b938
child 103432 3ee8dd0d4bd74f2a9cd211c0d491b1430bb8d1c7
push idunknown
push userunknown
push dateunknown
bugs636063, 774988, 784647
milestone17.0a1
Back out bug 636063, bug 774988 and bug 784647 for busting all of Android.
dom/ipc/PBrowser.ipdl
dom/ipc/TabChild.cpp
dom/ipc/TabChild.h
dom/ipc/TabParent.cpp
ipc/chromium/src/chrome/common/ipc_message.cc
ipc/chromium/src/chrome/common/ipc_message.h
ipc/glue/MessagePump.cpp
ipc/glue/RPCChannel.cpp
ipc/glue/RPCChannel.h
ipc/ipdl/ipdl/ast.py
ipc/ipdl/ipdl/lower.py
ipc/ipdl/ipdl/parser.py
ipc/ipdl/ipdl/type.py
ipc/ipdl/test/cxx/PTestLatency.ipdl
ipc/ipdl/test/cxx/TestLatency.cpp
ipc/ipdl/test/cxx/TestLatency.h
ipc/ipdl/test/ipdl/error/compressCtor.ipdl
ipc/ipdl/test/ipdl/error/compressCtorManagee.ipdl
ipc/ipdl/test/ipdl/error/rpcMessageCompress.ipdl
ipc/ipdl/test/ipdl/error/syncMessageCompress.ipdl
ipc/ipdl/test/ipdl/ok/messageCompress.ipdl
--- a/dom/ipc/PBrowser.ipdl
+++ b/dom/ipc/PBrowser.ipdl
@@ -308,19 +308,16 @@ child:
                int32_t aClickCount,
                int32_t aModifiers,
                bool aIgnoreRootScrollFrame);
 
     RealMouseEvent(nsMouseEvent event);
     RealKeyEvent(nsKeyEvent event);
     MouseWheelEvent(WheelEvent event);
     RealTouchEvent(nsTouchEvent event);
-   // We use a separate message for touchmove events only to apply
-    // compression to them.
-    RealTouchMoveEvent(nsTouchEvent event) compress;
 
     /**
      * @see nsIDOMWindowUtils sendKeyEvent.
      */
     KeyEvent(nsString aType,
              int32_t aKeyCode,
              int32_t aCharCode,
              int32_t aModifiers,
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -862,22 +862,16 @@ TabChild::RecvRealTouchEvent(const nsTou
         event.clickCount = 1;
     }
 
     DispatchWidgetEvent(event);
     return true;
 }
 
 bool
-TabChild::RecvRealTouchMoveEvent(const nsTouchEvent& aEvent)
-{
-    return RecvRealTouchEvent(aEvent);
-}
-
-bool
 TabChild::RecvRealKeyEvent(const nsKeyEvent& event)
 {
   nsKeyEvent localEvent(event);
   DispatchWidgetEvent(localEvent);
   return true;
 }
 
 bool
--- a/dom/ipc/TabChild.h
+++ b/dom/ipc/TabChild.h
@@ -185,17 +185,16 @@ public:
                                 const int32_t&  aButton,
                                 const int32_t&  aClickCount,
                                 const int32_t&  aModifiers,
                                 const bool&     aIgnoreRootScrollFrame);
     virtual bool RecvRealMouseEvent(const nsMouseEvent& event);
     virtual bool RecvRealKeyEvent(const nsKeyEvent& event);
     virtual bool RecvMouseWheelEvent(const mozilla::widget::WheelEvent& event);
     virtual bool RecvRealTouchEvent(const nsTouchEvent& event);
-    virtual bool RecvRealTouchMoveEvent(const nsTouchEvent& event);
     virtual bool RecvKeyEvent(const nsString& aType,
                               const int32_t&  aKeyCode,
                               const int32_t&  aCharCode,
                               const int32_t&  aModifiers,
                               const bool&     aPreventDefault);
     virtual bool RecvCompositionEvent(const nsCompositionEvent& event);
     virtual bool RecvTextEvent(const nsTextEvent& event);
     virtual bool RecvSelectionEvent(const nsSelectionEvent& event);
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -353,19 +353,17 @@ bool TabParent::SendRealKeyEvent(nsKeyEv
   MaybeForwardEventToRenderFrame(event, &e);
   return PBrowserParent::SendRealKeyEvent(e);
 }
 
 bool TabParent::SendRealTouchEvent(nsTouchEvent& event)
 {
   nsTouchEvent e(event);
   MaybeForwardEventToRenderFrame(event, &e);
-  return (e.message == NS_TOUCH_MOVE) ?
-    PBrowserParent::SendRealTouchMoveEvent(e) :
-    PBrowserParent::SendRealTouchEvent(e);
+  return PBrowserParent::SendRealTouchEvent(e);
 }
 
 bool
 TabParent::RecvSyncMessage(const nsString& aMessage,
                            const ClonedMessageData& aData,
                            InfallibleTArray<nsString>* aJSONRetVal)
 {
   const SerializedStructuredCloneBuffer& buffer = aData.data();
--- a/ipc/chromium/src/chrome/common/ipc_message.cc
+++ b/ipc/chromium/src/chrome/common/ipc_message.cc
@@ -23,23 +23,21 @@ Message::Message()
   header()->routing = header()->type = header()->flags = 0;
 #if defined(OS_POSIX)
   header()->num_fds = 0;
 #endif
   InitLoggingVariables();
 }
 
 Message::Message(int32 routing_id, msgid_t type, PriorityValue priority,
-                 MessageCompression compression, const char* const name)
+                 const char* const name)
     : Pickle(sizeof(Header)) {
   header()->routing = routing_id;
   header()->type = type;
   header()->flags = priority;
-  if (compression == COMPRESSION_ENABLED)
-    header()->flags |= COMPRESS_BIT;
 #if defined(OS_POSIX)
   header()->num_fds = 0;
 #endif
   header()->rpc_remote_stack_depth_guess = static_cast<uint32>(-1);
   header()->rpc_local_stack_depth = static_cast<uint32>(-1);
   header()->seqno = 0;
   InitLoggingVariables(name);
 }
--- a/ipc/chromium/src/chrome/common/ipc_message.h
+++ b/ipc/chromium/src/chrome/common/ipc_message.h
@@ -49,29 +49,23 @@ class Message : public Pickle {
   };
 
   enum PriorityValue {
     PRIORITY_LOW = 1,
     PRIORITY_NORMAL,
     PRIORITY_HIGH
   };
 
-  enum MessageCompression {
-    COMPRESSION_NONE,
-    COMPRESSION_ENABLED
-  };
-
   virtual ~Message();
 
   Message();
 
   // Initialize a message with a user-defined type, priority value, and
   // destination WebView ID.
   Message(int32 routing_id, msgid_t type, PriorityValue priority,
-          MessageCompression compression = COMPRESSION_NONE,
           const char* const name="???");
 
   // Initializes a message from a const block of data.  The data is not copied;
   // instead the data is merely referenced by this message.  Only const methods
   // should be used on the message when initialized this way.
   Message(const char* data, int data_len);
 
   Message(const Message& other);
@@ -86,21 +80,16 @@ class Message : public Pickle {
     return (header()->flags & SYNC_BIT) != 0;
   }
 
   // True if this is a synchronous message.
   bool is_rpc() const {
     return (header()->flags & RPC_BIT) != 0;
   }
 
-  // True if compression is enabled for this message.
-  bool compress() const {
-    return (header()->flags & COMPRESS_BIT) != 0;
-  }
-
   // Set this on a reply to a synchronous message.
   void set_reply() {
     header()->flags |= REPLY_BIT;
   }
 
   bool is_reply() const {
     return (header()->flags & REPLY_BIT) != 0;
   }
@@ -269,18 +258,17 @@ class Message : public Pickle {
   enum {
     PRIORITY_MASK   = 0x0003,
     SYNC_BIT        = 0x0004,
     REPLY_BIT       = 0x0008,
     REPLY_ERROR_BIT = 0x0010,
     UNBLOCK_BIT     = 0x0020,
     PUMPING_MSGS_BIT= 0x0040,
     HAS_SENT_TIME_BIT = 0x0080,
-    RPC_BIT         = 0x0100,
-    COMPRESS_BIT    = 0x0200
+    RPC_BIT        = 0x0100
   };
 
 #pragma pack(push, 2)
   struct Header : Pickle::Header {
     int32 routing;  // ID of the view that this message is destined for
     msgid_t type;   // specifies the user-defined message type
     uint32 flags;   // specifies control flags for the message
 #if defined(OS_POSIX)
--- a/ipc/glue/MessagePump.cpp
+++ b/ipc/glue/MessagePump.cpp
@@ -78,20 +78,19 @@ MessagePump::Run(MessagePump::Delegate* 
 
   for (;;) {
     autoReleasePool.Recycle();
 
     bool did_work = NS_ProcessNextEvent(mThread, false) ? true : false;
     if (!keep_running_)
       break;
 
-    // NB: it is crucial *not* to directly call |aDelegate->DoWork()|
-    // here.  To ensure that MessageLoop tasks and XPCOM events have
-    // equal priority, we sensitively rely on processing exactly one
-    // Task per DoWorkRunnable XPCOM event.
+    did_work |= aDelegate->DoWork();
+    if (!keep_running_)
+      break;
 
 #ifdef MOZ_WIDGET_ANDROID
     // This processes messages in the Android Looper. Note that we only
     // get here if the normal Gecko event loop has been awoken above.
     // Bug 750713
     AndroidBridge::Bridge()->PumpMessageLoop();
 #endif
 
@@ -203,30 +202,11 @@ MessagePumpForChildProcess::Run(MessageP
     gFirstDelegate = nullptr;
 #endif
     return;
   }
 
 #ifdef DEBUG
   NS_ASSERTION(aDelegate && aDelegate == gFirstDelegate, "Huh?!");
 #endif
-
-  // We can get to this point in startup with Tasks in our loop's
-  // incoming_queue_ or pending_queue_, but without a matching
-  // DoWorkRunnable().  In MessagePump::Run() above, we sensitively
-  // depend on *not* directly calling delegate->DoWork(), because that
-  // prioritizes Tasks above XPCOM events.  However, from this point
-  // forward, any Task posted to our loop is guaranteed to have a
-  // DoWorkRunnable enqueued for it.
-  //
-  // So we just flush the pending work here and move on.
-  MessageLoop* loop = MessageLoop::current();
-  bool nestableTasksAllowed = loop->NestableTasksAllowed();
-  loop->SetNestableTasksAllowed(true);
-
-  while (aDelegate->DoWork());
-
-  loop->SetNestableTasksAllowed(nestableTasksAllowed);
-
-
   // Really run.
   mozilla::ipc::MessagePump::Run(aDelegate);
 }
--- a/ipc/glue/RPCChannel.cpp
+++ b/ipc/glue/RPCChannel.cpp
@@ -190,17 +190,17 @@ RPCChannel::Call(Message* _msg, Message*
         if (!mOutOfTurnReplies.empty() &&
             ((it = mOutOfTurnReplies.find(mStack.top().seqno())) !=
             mOutOfTurnReplies.end())) {
             recvd = it->second;
             mOutOfTurnReplies.erase(it);
         }
         else if (!mPending.empty()) {
             recvd = mPending.front();
-            mPending.pop_front();
+            mPending.pop();
         }
         else {
             // because of subtleties with nested event loops, it's
             // possible that we got here and nothing happened.  or, we
             // might have a deferred in-call that needs to be
             // processed.  either way, we won't break the inner while
             // loop again until something new happens.
             continue;
@@ -305,17 +305,17 @@ RPCChannel::MaybeUndeferIncall()
     // maybe time to process this message
     Message call = mDeferred.top();
     mDeferred.pop();
 
     // fix up fudge factor we added to account for race
     RPC_ASSERT(0 < mRemoteStackDepthGuess, "fatal logic error");
     --mRemoteStackDepthGuess;
 
-    mPending.push_back(call);
+    mPending.push(call);
 }
 
 void
 RPCChannel::EnqueuePendingMessages()
 {
     AssertWorkerThread();
     mMonitor->AssertCurrentThreadOwns();
 
@@ -377,17 +377,17 @@ RPCChannel::OnMaybeDequeueOne()
 
         if (!mDeferred.empty())
             MaybeUndeferIncall();
 
         if (mPending.empty())
             return false;
 
         recvd = mPending.front();
-        mPending.pop_front();
+        mPending.pop();
     }
 
     if (IsOnCxxStack() && recvd.is_rpc() && recvd.is_reply()) {
         // We probably just received a reply in a nested loop for an
         // RPC call sent before entering that loop.
         mOutOfTurnReplies[recvd.seqno()] = recvd;
         return false;
     }
@@ -572,17 +572,17 @@ RPCChannel::BlockOnParent()
         if (!Connected()) {
             mBlockedOnParent = false;
             ReportConnectionError("RPCChannel");
             break;
         }
 
         if (!mPending.empty()) {
             Message recvd = mPending.front();
-            mPending.pop_front();
+            mPending.pop();
 
             MonitorAutoUnlock unlock(*mMonitor);
 
             CxxStackFrame f(*this, IN_MESSAGE, &recvd);
             if (recvd.is_rpc()) {
                 // stack depth must be 0 here
                 Incall(recvd, 0);
             }
@@ -645,17 +645,17 @@ RPCChannel::DebugAbort(const char* file,
             mPending.size());
 
     MessageQueue pending = mPending;
     while (!pending.empty()) {
         fprintf(stderr, "    [ %s%s ]\n",
                 pending.front().is_rpc() ? "rpc" :
                 (pending.front().is_sync() ? "sync" : "async"),
                 pending.front().is_reply() ? "reply" : "");
-        pending.pop_front();
+        pending.pop();
     }
 
     NS_RUNTIMEABORT(why);
 }
 
 void
 RPCChannel::DumpRPCStack(FILE* outfile, const char* const pfx) const
 {
@@ -696,36 +696,22 @@ RPCChannel::OnMessageReceivedFromLink(co
     // know that it needs to be immediately handled to unblock us.
     if (AwaitingSyncReply() && msg.is_sync()) {
         // wake up worker thread waiting at SyncChannel::Send
         mRecvd = msg;
         NotifyWorkerThread();
         return;
     }
 
-    bool compressMessage = (msg.compress() && !mPending.empty() &&
-                            mPending.back().type() == msg.type() &&
-                            mPending.back().routing_id() == msg.routing_id());
-    if (compressMessage) {
-        // This message type has compression enabled, and the back of
-        // the queue was the same message type and routed to the same
-        // destination.  Replace it with the newer message.
-        MOZ_ASSERT(mPending.back().compress());
-        mPending.pop_back();
-    }
-
-    mPending.push_back(msg);
+    mPending.push(msg);
 
     if (0 == StackDepth() && !mBlockedOnParent) {
         // the worker thread might be idle, make sure it wakes up
-        if (!compressMessage) {
-            // If we compressed away the previous message, we'll reuse
-            // its pending task.
-            mWorkerLoop->PostTask(FROM_HERE, new DequeueTask(mDequeueOneTask));
-        }
+        mWorkerLoop->PostTask(FROM_HERE,
+                                     new DequeueTask(mDequeueOneTask));
     }
     else if (!AwaitingSyncReply())
         NotifyWorkerThread();
 }
 
 
 void
 RPCChannel::OnChannelErrorFromLink()
--- a/ipc/glue/RPCChannel.h
+++ b/ipc/glue/RPCChannel.h
@@ -4,17 +4,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef ipc_glue_RPCChannel_h
 #define ipc_glue_RPCChannel_h 1
 
 #include <stdio.h>
 
-#include <deque>
+// FIXME/cjones probably shouldn't depend on STL
+#include <queue>
 #include <stack>
 #include <vector>
 
 #include "base/basictypes.h"
 
 #include "nsAtomicRefcnt.h"
 
 #include "mozilla/ipc/SyncChannel.h"
@@ -332,17 +333,17 @@ private:
     // |?{mStack.size() == 1}|, then other side "finished with us,"
     // and went back to its own business.  That business might have
     // included sending any number of async message |A<*| until
     // sending a blocking message |(S< | C<)|.  If we had more than
     // one RPC call on our stack, the other side *better* not have
     // sent us another blocking message, because it's blocked on a
     // reply from us.
     //
-    typedef std::deque<Message> MessageQueue;
+    typedef std::queue<Message> MessageQueue;
     MessageQueue mPending;
 
     // 
     // Stack of all the RPC out-calls on which this RPCChannel is
     // awaiting a response.
     //
     std::stack<Message> mStack;
 
--- a/ipc/ipdl/ipdl/ast.py
+++ b/ipc/ipdl/ipdl/ast.py
@@ -310,17 +310,16 @@ class ManagesStmt(Node):
 class MessageDecl(Node):
     def __init__(self, loc):
         Node.__init__(self, loc)
         self.name = None
         self.sendSemantics = ASYNC
         self.direction = None
         self.inParams = [ ]
         self.outParams = [ ]
-        self.compress = ''
 
     def addInParams(self, inParamsList):
         self.inParams += inParamsList
 
     def addOutParams(self, outParamsList):
         self.outParams += outParamsList
 
     def hasReply(self):
--- a/ipc/ipdl/ipdl/lower.py
+++ b/ipc/ipdl/ipdl/lower.py
@@ -1545,25 +1545,23 @@ class _GenerateProtocolCode(ipdl.ast.Vis
         tfDecl, tfDefn = _splitFuncDeclDefn(self.genTransitionFunc())
         ns.addstmts([ tfDecl, Whitespace.NL ])
         self.funcDefns.append(tfDefn)
 
         typedefs = self.protocol.decl.cxxtypedefs
         for md in p.messageDecls:
             ns.addstmts([
                 _generateMessageClass(md.msgClass(), md.msgId(),
-                                      typedefs, md.prettyMsgName(p.name+'::'),
-                                      md.decl.type.compress),
+                                      typedefs, md.prettyMsgName(p.name+'::')),
                 Whitespace.NL ])
             if md.hasReply():
                 ns.addstmts([
                     _generateMessageClass(
                         md.replyClass(), md.replyId(),
-                        typedefs, md.prettyReplyName(p.name+'::'),
-                        md.decl.type.compress),
+                        typedefs, md.prettyReplyName(p.name+'::')),
                     Whitespace.NL ])
 
         ns.addstmts([ Whitespace.NL, Whitespace.NL ])
 
 
     def genBridgeFunc(self, bridge):
         p = self.protocol
         parentHandleType = _cxxBareType(ActorType(bridge.parent.ptype),
@@ -1741,40 +1739,35 @@ class _GenerateProtocolCode(ipdl.ast.Vis
             # all --> Error transitions break to here
             StmtExpr(ExprAssn(ExprDeref(nextvar), _errorState())),
             StmtReturn(ExprLiteral.FALSE)
         ])
         return transitionfunc
 
 ##--------------------------------------------------
 
-def _generateMessageClass(clsname, msgid, typedefs, prettyName, compress):
+def _generateMessageClass(clsname, msgid, typedefs, prettyName):
     cls = Class(name=clsname, inherits=[ Inherit(Type('IPC::Message')) ])
     cls.addstmt(Label.PRIVATE)
     cls.addstmts(typedefs)
     cls.addstmt(Whitespace.NL)
 
     cls.addstmt(Label.PUBLIC)
 
     idenum = TypeEnum()
     idenum.addId('ID', msgid)
     cls.addstmt(StmtDecl(Decl(idenum, '')))
 
     # make the message constructor
-    if compress:
-        compression = ExprVar('COMPRESSION_ENABLED')
-    else:
-        compression = ExprVar('COMPRESSION_NONE')
     ctor = ConstructorDefn(
         ConstructorDecl(clsname),
         memberinits=[ ExprMemberInit(ExprVar('IPC::Message'),
                                      [ ExprVar('MSG_ROUTING_NONE'),
                                        ExprVar('ID'),
                                        ExprVar('PRIORITY_NORMAL'),
-                                       compression,
                                        ExprLiteral.String(prettyName) ]) ])
     cls.addstmts([ ctor, Whitespace.NL ])
 
     # generate a logging function
     # 'pfx' will be something like "[FooParent] sent"
     pfxvar = ExprVar('__pfx')
     outfvar = ExprVar('__outf')
     logger = MethodDefn(MethodDecl(
--- a/ipc/ipdl/ipdl/parser.py
+++ b/ipc/ipdl/ipdl/parser.py
@@ -116,17 +116,16 @@ def locFromTok(p, num):
 reserved = set((
         'answer',
         'as',
         'async',
         'both',
         'bridges',
         'call',
         'child',
-        'compress',
         '__delete__',
         'delete',                       # reserve 'delete' to prevent its use
         'goto',
         'include',
         'manager',
         'manages',
         'namespace',
         'nullable',
@@ -480,25 +479,23 @@ def p_MessageDecl(p):
 
     if Parser.current.direction is None:
         _error(msg.loc, 'missing message direction')
     msg.direction = Parser.current.direction
 
     p[0] = msg
 
 def p_MessageBody(p):
-    """MessageBody : MessageId MessageInParams MessageOutParams OptionalMessageCompress"""
+    """MessageBody : MessageId MessageInParams MessageOutParams"""
     # FIXME/cjones: need better loc info: use one of the quals
     loc, name = p[1]
     msg = MessageDecl(loc)
     msg.name = name
     msg.addInParams(p[2])
     msg.addOutParams(p[3])
-    msg.compress = p[4]
-
     p[0] = msg
 
 def p_MessageId(p):
     """MessageId : ID
                  | __DELETE__
                  | DELETE
                  | '~' ID"""
     loc = locFromTok(p, 1)
@@ -515,24 +512,16 @@ def p_MessageInParams(p):
 def p_MessageOutParams(p):
     """MessageOutParams : RETURNS '(' ParamList ')'
                         | """
     if 1 == len(p):
         p[0] = [ ]
     else:
         p[0] = p[3]
 
-def p_OptionalMessageCompress(p):
-    """OptionalMessageCompress : COMPRESS
-                               | """
-    if 1 == len(p):
-        p[0] = ''
-    else:
-        p[0] = 'compress'
-
 ##--------------------
 ## State machine
 
 def p_TransitionStmtsOpt(p):
     """TransitionStmtsOpt : TransitionStmt TransitionStmtsOpt
                           |"""
     if 1 == len(p):
         # we fill in |loc| in the Protocol rule
--- a/ipc/ipdl/ipdl/type.py
+++ b/ipc/ipdl/ipdl/type.py
@@ -223,28 +223,27 @@ class StateType(IPDLType):
     def isState(self): return True
     def name(self):
         return self.name
     def fullname(self):
         return self.name()
 
 class MessageType(IPDLType):
     def __init__(self, sendSemantics, direction,
-                 ctor=False, dtor=False, cdtype=None, compress=False):
+                 ctor=False, dtor=False, cdtype=None):
         assert not (ctor and dtor)
         assert not (ctor or dtor) or type is not None
 
         self.sendSemantics = sendSemantics
         self.direction = direction
         self.params = [ ]
         self.returns = [ ]
         self.ctor = ctor
         self.dtor = dtor
         self.cdtype = cdtype
-        self.compress = compress
     def isMessage(self): return True
 
     def isCtor(self): return self.ctor
     def isDtor(self): return self.dtor
     def constructedType(self):  return self.cdtype
 
     def isIn(self): return self.direction is IN
     def isOut(self): return self.direction is OUT
@@ -1064,18 +1063,17 @@ class GatherDecls(TcheckVisitor):
             isdtor = True
             cdtype = self.currentProtocolDecl.type
 
 
         # enter message scope
         self.symtab.enterScope(md)
 
         msgtype = MessageType(md.sendSemantics, md.direction,
-                              ctor=isctor, dtor=isdtor, cdtype=cdtype,
-                              compress=(md.compress == 'compress'))
+                              ctor=isctor, dtor=isdtor, cdtype=cdtype)
 
         # replace inparam Param nodes with proper Decls
         def paramToDecl(param):
             ptname = param.typespec.basename()
             ploc = param.typespec.loc
 
             ptdecl = self.symtab.lookup(ptname)
             if ptdecl is None:
@@ -1455,23 +1453,16 @@ class CheckTypes(TcheckVisitor):
                 mname, pname)
 
         if mtype.isAsync() and len(mtype.returns):
             # XXX/cjones could modify grammar to disallow this ...
             self.error(loc,
                        "asynchronous message `%s' declares return values",
                        mname)
 
-        if (mtype.compress and
-            (not mtype.isAsync() or mtype.isCtor() or mtype.isDtor())):
-            self.error(
-                loc,
-                "message `%s' in protocol `%s' requests compression but is not async or is special (ctor or dtor)",
-                mname[:-len('constructor')], pname)
-
         if mtype.isCtor() and not ptype.isManagerOf(mtype.constructedType()):
             self.error(
                 loc,
                 "ctor for protocol `%s', which is not managed by protocol `%s'", 
                 mname[:-len('constructor')], pname)
 
 
     def visitTransition(self, t):
--- a/ipc/ipdl/test/cxx/PTestLatency.ipdl
+++ b/ipc/ipdl/test/cxx/PTestLatency.ipdl
@@ -7,19 +7,16 @@ rpc protocol PTestLatency {
 
 child:
     __delete__();
     Ping();
     Ping5();
     rpc Rpc();
     Spam();
     rpc Synchro();
-    CompressedSpam(uint32_t seqno) compress;
-    rpc Synchro2() returns (uint32_t lastSeqno,
-                            uint32_t numMessagesDispatched);
 
 parent:
     Pong();
     Pong5();
 
 state START:
     // if the timing resolution is too low, abort the test
     send __delete__;
@@ -50,26 +47,19 @@ state PONG3: recv Pong5 goto PONG4;
 state PONG4: recv Pong5 goto PONG5;
 state PONG5: recv Pong5 goto PING5;
 
     // Trial 3: lotsa RPC
 state RPC:
     call Rpc goto RPC;
     send Spam goto SPAM;
 
-    // Trial 4: lots of sequential asyn messages, which tests pipelining
 state SPAM:
     send Spam goto SPAM;
-    call Synchro goto COMPRESSED_SPAM;
-
-    // Trial 5: lots of async spam, but compressed to cut down on
-    // dispatch overhead
-state COMPRESSED_SPAM:          // compressed spam, mmm
-    send CompressedSpam goto COMPRESSED_SPAM;
-    call Synchro2 goto DONE;
+    call Synchro goto DONE;
 
 state DONE:
     send __delete__;
 };
 
 
 } // namespace mozilla
 } // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/TestLatency.cpp
+++ b/ipc/ipdl/test/cxx/TestLatency.cpp
@@ -14,17 +14,17 @@ namespace _ipdltest {
 
 TestLatencyParent::TestLatencyParent() :
     mStart(),
     mPPTimeTotal(),
     mPP5TimeTotal(),
     mRpcTimeTotal(),
     mPPTrialsToGo(NR_TRIALS),
     mPP5TrialsToGo(NR_TRIALS),
-    mNumChildProcessedCompressedSpams(0)
+    mSpamsToGo(NR_TRIALS)
 {
     MOZ_COUNT_CTOR(TestLatencyParent);
 }
 
 TestLatencyParent::~TestLatencyParent()
 {
     MOZ_COUNT_DTOR(TestLatencyParent);
 }
@@ -137,57 +137,29 @@ TestLatencyParent::SpamTrial()
     // been processed.  This adds the overhead of a reply message from
     // child-->here, but should be insignificant compared to >>
     // NR_SPAMS.
     if (!CallSynchro())
         fail("calling Synchro()");
 
     mSpamTimeTotal = (TimeStamp::Now() - start);
 
-    CompressedSpamTrial();
-}
-
-void
-TestLatencyParent::CompressedSpamTrial()
-{
-    for (int i = 0; i < NR_SPAMS; ++i) {
-        if (!SendCompressedSpam(i + 1))
-            fail("sending CompressedSpam()");
-        if (0 == (i % 10000))
-            printf("  CompressedSpam trial %d\n", i);
-    }
-
-    uint32_t lastSeqno;
-    if (!CallSynchro2(&lastSeqno, &mNumChildProcessedCompressedSpams))
-        fail("calling Synchro2()");
-
-    if (lastSeqno != NR_SPAMS)
-        fail("last seqno was %u, expected %u", lastSeqno, NR_SPAMS);
-
-    // NB: since this is testing an optimization, it's somewhat bogus.
-    // Need to make a warning if it actually intermittently fails in
-    // practice, which is doubtful.
-    if (!(mNumChildProcessedCompressedSpams < NR_SPAMS))
-        fail("Didn't compress any messages?");
-
     Exit();
 }
 
 void
 TestLatencyParent::Exit()
 {
     Close();
 }
 
 //-----------------------------------------------------------------------------
 // child
 
 TestLatencyChild::TestLatencyChild()
-    : mLastSeqno(0)
-    , mNumProcessedCompressedSpams(0)
 {
     MOZ_COUNT_CTOR(TestLatencyChild);
 }
 
 TestLatencyChild::~TestLatencyChild()
 {
     MOZ_COUNT_DTOR(TestLatencyChild);
 }
@@ -229,30 +201,10 @@ TestLatencyChild::RecvSpam()
 }
 
 bool
 TestLatencyChild::AnswerSynchro()
 {
     return true;
 }
 
-bool
-TestLatencyChild::RecvCompressedSpam(const uint32_t& seqno)
-{
-    if (seqno <= mLastSeqno)
-        fail("compressed seqnos must monotonically increase");
-
-    mLastSeqno = seqno;
-    ++mNumProcessedCompressedSpams;
-    return true;
-}
-
-bool
-TestLatencyChild::AnswerSynchro2(uint32_t* lastSeqno,
-                                 uint32_t* numMessagesDispatched)
-{
-    *lastSeqno = mLastSeqno;
-    *numMessagesDispatched = mNumProcessedCompressedSpams;
-    return true;
-}
-
 } // namespace _ipdltest
 } // namespace mozilla
--- a/ipc/ipdl/test/cxx/TestLatency.h
+++ b/ipc/ipdl/test/cxx/TestLatency.h
@@ -4,17 +4,17 @@
 #include "mozilla/_ipdltest/IPDLUnitTests.h"
 
 #include "mozilla/_ipdltest/PTestLatencyParent.h"
 #include "mozilla/_ipdltest/PTestLatencyChild.h"
 
 #include "mozilla/TimeStamp.h"
 
 #define NR_TRIALS 10000
-#define NR_SPAMS  25000
+#define NR_SPAMS  50000
 
 namespace mozilla {
 namespace _ipdltest {
 
 class TestLatencyParent :
     public PTestLatencyParent
 {
 private:
@@ -38,74 +38,64 @@ protected:
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
 
         passed("\n"
                "  average #ping-pong/sec:        %g\n"
                "  average #ping5-pong5/sec:      %g\n"
                "  average #RPC call-answer/sec:  %g\n"
-               "  average #spams/sec:            %g\n"
-               "  pct. spams compressed away:    %g\n",
+               "  average #spams/sec:            %g\n",
                double(NR_TRIALS) / mPPTimeTotal.ToSecondsSigDigits(),
                double(NR_TRIALS) / mPP5TimeTotal.ToSecondsSigDigits(),
                double(NR_TRIALS) / mRpcTimeTotal.ToSecondsSigDigits(),
-               double(NR_SPAMS) / mSpamTimeTotal.ToSecondsSigDigits(),
-               100.0 * (double(NR_SPAMS - mNumChildProcessedCompressedSpams) /
-                        double(NR_SPAMS)));
+               double(NR_SPAMS) / mSpamTimeTotal.ToSecondsSigDigits());
 
         QuitParent();
     }
 
 private:
     void PingPongTrial();
     void Ping5Pong5Trial();
     void RpcTrials();
     void SpamTrial();
-    void CompressedSpamTrial();
     void Exit();
 
     TimeStamp mStart;
     TimeDuration mPPTimeTotal;
     TimeDuration mPP5TimeTotal;
     TimeDuration mRpcTimeTotal;
     TimeDuration mSpamTimeTotal;
 
     int mPPTrialsToGo;
     int mPP5TrialsToGo;
-    uint32_t mNumChildProcessedCompressedSpams;
+    int mSpamsToGo;
 };
 
 
 class TestLatencyChild :
     public PTestLatencyChild
 {
 public:
     TestLatencyChild();
     virtual ~TestLatencyChild();
 
 protected:
     virtual bool RecvPing() MOZ_OVERRIDE;
     virtual bool RecvPing5() MOZ_OVERRIDE;
     virtual bool AnswerRpc() MOZ_OVERRIDE;
     virtual bool RecvSpam() MOZ_OVERRIDE;
     virtual bool AnswerSynchro() MOZ_OVERRIDE;
-    virtual bool RecvCompressedSpam(const uint32_t& seqno) MOZ_OVERRIDE;
-    virtual bool AnswerSynchro2(uint32_t* lastSeqno,
-                                uint32_t* numMessagesDispatched) MOZ_OVERRIDE;
 
     virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
         QuitChild();
     }
-
-    uint32_t mLastSeqno;
-    uint32_t mNumProcessedCompressedSpams;
 };
 
 
 } // namespace _ipdltest
 } // namespace mozilla
 
 
 #endif // ifndef mozilla__ipdltest_TestLatency_h
deleted file mode 100644
--- a/ipc/ipdl/test/ipdl/error/compressCtor.ipdl
+++ /dev/null
@@ -1,8 +0,0 @@
-include protocol compressCtorManagee;
-
-rpc protocol compressCtor {
-    manages compressCtorManagee;
-
-parent:
-    async compressCtorManagee() compress;
-};
deleted file mode 100644
--- a/ipc/ipdl/test/ipdl/error/compressCtorManagee.ipdl
+++ /dev/null
@@ -1,8 +0,0 @@
-include protocol compressCtor;
-
-rpc protocol compressCtorManagee {
-    manager compressCtor;
-
-child:
-    async __delete__() compress;
-};
deleted file mode 100644
--- a/ipc/ipdl/test/ipdl/error/rpcMessageCompress.ipdl
+++ /dev/null
@@ -1,6 +0,0 @@
-rpc protocol rpcMessageCompress {
-parent:
-    rpc foo() compress;
-child:
-    rpc bar() compress;
-};
deleted file mode 100644
--- a/ipc/ipdl/test/ipdl/error/syncMessageCompress.ipdl
+++ /dev/null
@@ -1,4 +0,0 @@
-sync protocol syncMessageCompress {
-parent:
-    sync foo() compress;
-};
deleted file mode 100644
--- a/ipc/ipdl/test/ipdl/ok/messageCompress.ipdl
+++ /dev/null
@@ -1,4 +0,0 @@
-rpc protocol messageCompress {
-child:
-    async foo() compress;
-};