Bug 1548939 - Devirtualize BrowserChild IPDL methods. r=nika
authorRyan Hunt <rhunt@eqrion.net>
Mon, 06 May 2019 14:29:29 -0500
changeset 534765 bc84c39a78f231be563403e2d370cc32beac2f63
parent 534764 c620d5893b60882304ee79f614965beb3d667376
child 534766 ddb24aab9b6e30e74c7f8495d61f1b7c69df7a95
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika
bugs1548939
milestone68.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 1548939 - Devirtualize BrowserChild IPDL methods. r=nika Differential Revision: https://phabricator.services.mozilla.com/D30150
dom/ipc/BrowserChild.h
ipc/ipdl/ipdl/direct_call.py
js/src/proxy/Proxy.cpp
--- a/dom/ipc/BrowserChild.h
+++ b/dom/ipc/BrowserChild.h
@@ -296,164 +296,163 @@ class BrowserChild final : public Browse
                                       StructuredCloneData& aData,
                                       JS::Handle<JSObject*> aCpows,
                                       nsIPrincipal* aPrincipal) override;
 
   virtual bool DoUpdateZoomConstraints(
       const uint32_t& aPresShellId, const ViewID& aViewId,
       const Maybe<ZoomConstraints>& aConstraints) override;
 
-  virtual mozilla::ipc::IPCResult RecvLoadURL(const nsCString& aURI,
-                                              const ShowInfo& aInfo) override;
+  mozilla::ipc::IPCResult RecvLoadURL(const nsCString& aURI,
+                                      const ShowInfo& aInfo);
 
-  virtual mozilla::ipc::IPCResult RecvResumeLoad(
-      const uint64_t& aPendingSwitchID, const ShowInfo& aInfo) override;
+  mozilla::ipc::IPCResult RecvResumeLoad(const uint64_t& aPendingSwitchID,
+                                         const ShowInfo& aInfo);
 
-  virtual mozilla::ipc::IPCResult RecvShow(
-      const ScreenIntSize& aSize, const ShowInfo& aInfo,
-      const bool& aParentIsActive, const nsSizeMode& aSizeMode) override;
+  mozilla::ipc::IPCResult RecvShow(const ScreenIntSize& aSize,
+                                   const ShowInfo& aInfo,
+                                   const bool& aParentIsActive,
+                                   const nsSizeMode& aSizeMode);
 
-  virtual mozilla::ipc::IPCResult RecvInitRendering(
+  mozilla::ipc::IPCResult RecvInitRendering(
       const TextureFactoryIdentifier& aTextureFactoryIdentifier,
       const layers::LayersId& aLayersId,
       const mozilla::layers::CompositorOptions& aCompositorOptions,
-      const bool& aLayersConnected) override;
+      const bool& aLayersConnected);
 
-  virtual mozilla::ipc::IPCResult RecvUpdateDimensions(
-      const mozilla::dom::DimensionInfo& aDimensionInfo) override;
-  virtual mozilla::ipc::IPCResult RecvSizeModeChanged(
-      const nsSizeMode& aSizeMode) override;
+  mozilla::ipc::IPCResult RecvUpdateDimensions(
+      const mozilla::dom::DimensionInfo& aDimensionInfo);
+  mozilla::ipc::IPCResult RecvSizeModeChanged(const nsSizeMode& aSizeMode);
 
-  virtual mozilla::ipc::IPCResult RecvChildToParentMatrix(
-      const mozilla::gfx::Matrix4x4& aMatrix) override;
+  mozilla::ipc::IPCResult RecvChildToParentMatrix(
+      const mozilla::gfx::Matrix4x4& aMatrix);
 
   mozilla::ipc::IPCResult RecvActivate();
 
   mozilla::ipc::IPCResult RecvDeactivate();
 
   MOZ_CAN_RUN_SCRIPT_BOUNDARY
-  virtual mozilla::ipc::IPCResult RecvMouseEvent(
-      const nsString& aType, const float& aX, const float& aY,
-      const int32_t& aButton, const int32_t& aClickCount,
-      const int32_t& aModifiers, const bool& aIgnoreRootScrollFrame) override;
-
-  virtual mozilla::ipc::IPCResult RecvRealMouseMoveEvent(
-      const mozilla::WidgetMouseEvent& aEvent, const ScrollableLayerGuid& aGuid,
-      const uint64_t& aInputBlockId) override;
+  mozilla::ipc::IPCResult RecvMouseEvent(const nsString& aType, const float& aX,
+                                         const float& aY,
+                                         const int32_t& aButton,
+                                         const int32_t& aClickCount,
+                                         const int32_t& aModifiers,
+                                         const bool& aIgnoreRootScrollFrame);
 
-  virtual mozilla::ipc::IPCResult RecvNormalPriorityRealMouseMoveEvent(
+  mozilla::ipc::IPCResult RecvRealMouseMoveEvent(
       const mozilla::WidgetMouseEvent& aEvent, const ScrollableLayerGuid& aGuid,
-      const uint64_t& aInputBlockId) override;
+      const uint64_t& aInputBlockId);
 
-  virtual mozilla::ipc::IPCResult RecvSynthMouseMoveEvent(
+  mozilla::ipc::IPCResult RecvNormalPriorityRealMouseMoveEvent(
       const mozilla::WidgetMouseEvent& aEvent, const ScrollableLayerGuid& aGuid,
-      const uint64_t& aInputBlockId) override;
-  virtual mozilla::ipc::IPCResult RecvNormalPrioritySynthMouseMoveEvent(
-      const mozilla::WidgetMouseEvent& aEvent, const ScrollableLayerGuid& aGuid,
-      const uint64_t& aInputBlockId) override;
+      const uint64_t& aInputBlockId);
 
-  virtual mozilla::ipc::IPCResult RecvRealMouseButtonEvent(
-      const mozilla::WidgetMouseEvent& aEvent, const ScrollableLayerGuid& aGuid,
-      const uint64_t& aInputBlockId) override;
-  virtual mozilla::ipc::IPCResult RecvNormalPriorityRealMouseButtonEvent(
+  mozilla::ipc::IPCResult RecvSynthMouseMoveEvent(
       const mozilla::WidgetMouseEvent& aEvent, const ScrollableLayerGuid& aGuid,
-      const uint64_t& aInputBlockId) override;
-
-  virtual mozilla::ipc::IPCResult RecvRealDragEvent(
-      const WidgetDragEvent& aEvent, const uint32_t& aDragAction,
-      const uint32_t& aDropEffect, nsIPrincipal* aPrincipal) override;
+      const uint64_t& aInputBlockId);
+  mozilla::ipc::IPCResult RecvNormalPrioritySynthMouseMoveEvent(
+      const mozilla::WidgetMouseEvent& aEvent, const ScrollableLayerGuid& aGuid,
+      const uint64_t& aInputBlockId);
 
-  virtual mozilla::ipc::IPCResult RecvRealKeyEvent(
-      const mozilla::WidgetKeyboardEvent& aEvent) override;
-
-  virtual mozilla::ipc::IPCResult RecvNormalPriorityRealKeyEvent(
-      const mozilla::WidgetKeyboardEvent& aEvent) override;
+  mozilla::ipc::IPCResult RecvRealMouseButtonEvent(
+      const mozilla::WidgetMouseEvent& aEvent, const ScrollableLayerGuid& aGuid,
+      const uint64_t& aInputBlockId);
+  mozilla::ipc::IPCResult RecvNormalPriorityRealMouseButtonEvent(
+      const mozilla::WidgetMouseEvent& aEvent, const ScrollableLayerGuid& aGuid,
+      const uint64_t& aInputBlockId);
 
-  virtual mozilla::ipc::IPCResult RecvMouseWheelEvent(
-      const mozilla::WidgetWheelEvent& aEvent, const ScrollableLayerGuid& aGuid,
-      const uint64_t& aInputBlockId) override;
+  mozilla::ipc::IPCResult RecvRealDragEvent(const WidgetDragEvent& aEvent,
+                                            const uint32_t& aDragAction,
+                                            const uint32_t& aDropEffect,
+                                            nsIPrincipal* aPrincipal);
 
-  virtual mozilla::ipc::IPCResult RecvNormalPriorityMouseWheelEvent(
+  mozilla::ipc::IPCResult RecvRealKeyEvent(
+      const mozilla::WidgetKeyboardEvent& aEvent);
+
+  mozilla::ipc::IPCResult RecvNormalPriorityRealKeyEvent(
+      const mozilla::WidgetKeyboardEvent& aEvent);
+
+  mozilla::ipc::IPCResult RecvMouseWheelEvent(
       const mozilla::WidgetWheelEvent& aEvent, const ScrollableLayerGuid& aGuid,
-      const uint64_t& aInputBlockId) override;
+      const uint64_t& aInputBlockId);
+
+  mozilla::ipc::IPCResult RecvNormalPriorityMouseWheelEvent(
+      const mozilla::WidgetWheelEvent& aEvent, const ScrollableLayerGuid& aGuid,
+      const uint64_t& aInputBlockId);
 
-  virtual mozilla::ipc::IPCResult RecvRealTouchEvent(
-      const WidgetTouchEvent& aEvent, const ScrollableLayerGuid& aGuid,
-      const uint64_t& aInputBlockId,
-      const nsEventStatus& aApzResponse) override;
+  mozilla::ipc::IPCResult RecvRealTouchEvent(const WidgetTouchEvent& aEvent,
+                                             const ScrollableLayerGuid& aGuid,
+                                             const uint64_t& aInputBlockId,
+                                             const nsEventStatus& aApzResponse);
 
-  virtual mozilla::ipc::IPCResult RecvNormalPriorityRealTouchEvent(
+  mozilla::ipc::IPCResult RecvNormalPriorityRealTouchEvent(
       const WidgetTouchEvent& aEvent, const ScrollableLayerGuid& aGuid,
-      const uint64_t& aInputBlockId,
-      const nsEventStatus& aApzResponse) override;
+      const uint64_t& aInputBlockId, const nsEventStatus& aApzResponse);
 
-  virtual mozilla::ipc::IPCResult RecvRealTouchMoveEvent(
+  mozilla::ipc::IPCResult RecvRealTouchMoveEvent(
       const WidgetTouchEvent& aEvent, const ScrollableLayerGuid& aGuid,
-      const uint64_t& aInputBlockId,
-      const nsEventStatus& aApzResponse) override;
+      const uint64_t& aInputBlockId, const nsEventStatus& aApzResponse);
 
-  virtual mozilla::ipc::IPCResult RecvNormalPriorityRealTouchMoveEvent(
+  mozilla::ipc::IPCResult RecvNormalPriorityRealTouchMoveEvent(
       const WidgetTouchEvent& aEvent, const ScrollableLayerGuid& aGuid,
-      const uint64_t& aInputBlockId,
-      const nsEventStatus& aApzResponse) override;
+      const uint64_t& aInputBlockId, const nsEventStatus& aApzResponse);
 
-  virtual mozilla::ipc::IPCResult RecvNativeSynthesisResponse(
-      const uint64_t& aObserverId, const nsCString& aResponse) override;
+  mozilla::ipc::IPCResult RecvFlushTabState(const uint32_t& aFlushId);
 
-  virtual mozilla::ipc::IPCResult RecvFlushTabState(
-      const uint32_t& aFlushId) override;
+  mozilla::ipc::IPCResult RecvNativeSynthesisResponse(
+      const uint64_t& aObserverId, const nsCString& aResponse);
 
-  virtual mozilla::ipc::IPCResult RecvPluginEvent(
-      const WidgetPluginEvent& aEvent) override;
+  mozilla::ipc::IPCResult RecvPluginEvent(const WidgetPluginEvent& aEvent);
 
-  virtual mozilla::ipc::IPCResult RecvCompositionEvent(
-      const mozilla::WidgetCompositionEvent& aEvent) override;
+  mozilla::ipc::IPCResult RecvCompositionEvent(
+      const mozilla::WidgetCompositionEvent& aEvent);
 
-  virtual mozilla::ipc::IPCResult RecvNormalPriorityCompositionEvent(
-      const mozilla::WidgetCompositionEvent& aEvent) override;
+  mozilla::ipc::IPCResult RecvNormalPriorityCompositionEvent(
+      const mozilla::WidgetCompositionEvent& aEvent);
 
-  virtual mozilla::ipc::IPCResult RecvSelectionEvent(
-      const mozilla::WidgetSelectionEvent& aEvent) override;
+  mozilla::ipc::IPCResult RecvSelectionEvent(
+      const mozilla::WidgetSelectionEvent& aEvent);
 
-  virtual mozilla::ipc::IPCResult RecvNormalPrioritySelectionEvent(
-      const mozilla::WidgetSelectionEvent& aEvent) override;
+  mozilla::ipc::IPCResult RecvNormalPrioritySelectionEvent(
+      const mozilla::WidgetSelectionEvent& aEvent);
 
   MOZ_CAN_RUN_SCRIPT_BOUNDARY
-  virtual mozilla::ipc::IPCResult RecvPasteTransferable(
+  mozilla::ipc::IPCResult RecvPasteTransferable(
       const IPCDataTransfer& aDataTransfer, const bool& aIsPrivateData,
-      nsIPrincipal* aRequestingPrincipal,
-      const uint32_t& aContentPolicyType) override;
+      nsIPrincipal* aRequestingPrincipal, const uint32_t& aContentPolicyType);
+
+  mozilla::ipc::IPCResult RecvActivateFrameEvent(const nsString& aType,
+                                                 const bool& aCapture);
 
-  virtual mozilla::ipc::IPCResult RecvActivateFrameEvent(
-      const nsString& aType, const bool& aCapture) override;
+  mozilla::ipc::IPCResult RecvLoadRemoteScript(const nsString& aURL,
+                                               const bool& aRunInGlobalScope);
 
-  virtual mozilla::ipc::IPCResult RecvLoadRemoteScript(
-      const nsString& aURL, const bool& aRunInGlobalScope) override;
+  mozilla::ipc::IPCResult RecvAsyncMessage(const nsString& aMessage,
+                                           InfallibleTArray<CpowEntry>&& aCpows,
+                                           nsIPrincipal* aPrincipal,
+                                           const ClonedMessageData& aData);
+  mozilla::ipc::IPCResult RecvSwappedWithOtherRemoteLoader(
+      const IPCTabContext& aContext);
 
-  virtual mozilla::ipc::IPCResult RecvAsyncMessage(
-      const nsString& aMessage, InfallibleTArray<CpowEntry>&& aCpows,
-      nsIPrincipal* aPrincipal, const ClonedMessageData& aData) override;
-  virtual mozilla::ipc::IPCResult RecvSwappedWithOtherRemoteLoader(
-      const IPCTabContext& aContext) override;
+  PDocAccessibleChild* AllocPDocAccessibleChild(PDocAccessibleChild*,
+                                                const uint64_t&,
+                                                const uint32_t&,
+                                                const IAccessibleHolder&);
 
-  virtual PDocAccessibleChild* AllocPDocAccessibleChild(
-      PDocAccessibleChild*, const uint64_t&, const uint32_t&,
-      const IAccessibleHolder&) override;
+  bool DeallocPDocAccessibleChild(PDocAccessibleChild*);
 
-  virtual bool DeallocPDocAccessibleChild(PDocAccessibleChild*) override;
+  PColorPickerChild* AllocPColorPickerChild(const nsString& aTitle,
+                                            const nsString& aInitialColor);
 
-  virtual PColorPickerChild* AllocPColorPickerChild(
-      const nsString& aTitle, const nsString& aInitialColor) override;
+  bool DeallocPColorPickerChild(PColorPickerChild* aActor);
 
-  virtual bool DeallocPColorPickerChild(PColorPickerChild* aActor) override;
+  PFilePickerChild* AllocPFilePickerChild(const nsString& aTitle,
+                                          const int16_t& aMode);
 
-  virtual PFilePickerChild* AllocPFilePickerChild(
-      const nsString& aTitle, const int16_t& aMode) override;
-
-  virtual bool DeallocPFilePickerChild(PFilePickerChild* aActor) override;
+  bool DeallocPFilePickerChild(PFilePickerChild* aActor);
 
   virtual nsIWebNavigation* WebNavigation() const override { return mWebNav; }
 
   virtual PuppetWidget* WebWidget() override { return mPuppetWidget; }
 
   bool IsTransparent() const { return mIsTransparent; }
 
   void GetMaxTouchPoints(uint32_t* aTouchPoints) {
@@ -526,55 +525,51 @@ class BrowserChild final : public Browse
   void ReinitRenderingForDeviceReset();
 
   static inline BrowserChild* GetFrom(nsIDOMWindow* aWindow) {
     nsCOMPtr<nsIWebNavigation> webNav = do_GetInterface(aWindow);
     nsCOMPtr<nsIDocShell> docShell = do_QueryInterface(webNav);
     return GetFrom(docShell);
   }
 
-  virtual mozilla::ipc::IPCResult RecvUIResolutionChanged(
-      const float& aDpi, const int32_t& aRounding,
-      const double& aScale) override;
+  mozilla::ipc::IPCResult RecvUIResolutionChanged(const float& aDpi,
+                                                  const int32_t& aRounding,
+                                                  const double& aScale);
 
-  virtual mozilla::ipc::IPCResult RecvThemeChanged(
-      nsTArray<LookAndFeelInt>&& aLookAndFeelIntCache) override;
+  mozilla::ipc::IPCResult RecvThemeChanged(
+      nsTArray<LookAndFeelInt>&& aLookAndFeelIntCache);
 
-  virtual mozilla::ipc::IPCResult RecvHandleAccessKey(
-      const WidgetKeyboardEvent& aEvent,
-      nsTArray<uint32_t>&& aCharCodes) override;
+  mozilla::ipc::IPCResult RecvHandleAccessKey(const WidgetKeyboardEvent& aEvent,
+                                              nsTArray<uint32_t>&& aCharCodes);
 
-  virtual mozilla::ipc::IPCResult RecvSetUseGlobalHistory(
-      const bool& aUse) override;
+  mozilla::ipc::IPCResult RecvSetUseGlobalHistory(const bool& aUse);
+
+  mozilla::ipc::IPCResult RecvHandledWindowedPluginKeyEvent(
+      const mozilla::NativeEventData& aKeyEventData, const bool& aIsConsumed);
 
-  virtual mozilla::ipc::IPCResult RecvHandledWindowedPluginKeyEvent(
-      const mozilla::NativeEventData& aKeyEventData,
-      const bool& aIsConsumed) override;
+  mozilla::ipc::IPCResult RecvPrint(const uint64_t& aOuterWindowID,
+                                    const PrintData& aPrintData);
 
-  virtual mozilla::ipc::IPCResult RecvPrint(
-      const uint64_t& aOuterWindowID, const PrintData& aPrintData) override;
-
-  virtual mozilla::ipc::IPCResult RecvUpdateNativeWindowHandle(
-      const uintptr_t& aNewHandle) override;
+  mozilla::ipc::IPCResult RecvUpdateNativeWindowHandle(
+      const uintptr_t& aNewHandle);
 
   /**
    * Native widget remoting protocol for use with windowed plugins with e10s.
    */
-  PPluginWidgetChild* AllocPPluginWidgetChild() override;
+  PPluginWidgetChild* AllocPPluginWidgetChild();
 
-  bool DeallocPPluginWidgetChild(PPluginWidgetChild* aActor) override;
+  bool DeallocPPluginWidgetChild(PPluginWidgetChild* aActor);
 
 #ifdef XP_WIN
   nsresult CreatePluginWidget(nsIWidget* aParent, nsIWidget** aOut);
 #endif
 
-  virtual PPaymentRequestChild* AllocPPaymentRequestChild() override;
+  PPaymentRequestChild* AllocPPaymentRequestChild();
 
-  virtual bool DeallocPPaymentRequestChild(
-      PPaymentRequestChild* aActor) override;
+  bool DeallocPPaymentRequestChild(PPaymentRequestChild* aActor);
 
   LayoutDeviceIntPoint GetClientOffset() const { return mClientOffset; }
   LayoutDeviceIntPoint GetChromeOffset() const { return mChromeOffset; };
 
   bool IPCOpen() const { return mIPCOpen; }
 
   bool ParentIsActive() const { return mParentIsActive; }
 
@@ -590,23 +585,23 @@ class BrowserChild final : public Browse
                                  bool aPreventDefault) const;
   void SetTargetAPZC(
       uint64_t aInputBlockId,
       const nsTArray<layers::SLGuidAndRenderRoot>& aTargets) const;
   MOZ_CAN_RUN_SCRIPT_BOUNDARY
   mozilla::ipc::IPCResult RecvHandleTap(
       const layers::GeckoContentController::TapType& aType,
       const LayoutDevicePoint& aPoint, const Modifiers& aModifiers,
-      const ScrollableLayerGuid& aGuid, const uint64_t& aInputBlockId) override;
+      const ScrollableLayerGuid& aGuid, const uint64_t& aInputBlockId);
 
   MOZ_CAN_RUN_SCRIPT_BOUNDARY
   mozilla::ipc::IPCResult RecvNormalPriorityHandleTap(
       const layers::GeckoContentController::TapType& aType,
       const LayoutDevicePoint& aPoint, const Modifiers& aModifiers,
-      const ScrollableLayerGuid& aGuid, const uint64_t& aInputBlockId) override;
+      const ScrollableLayerGuid& aGuid, const uint64_t& aInputBlockId);
 
   void SetAllowedTouchBehavior(
       uint64_t aInputBlockId, const nsTArray<TouchBehaviorFlags>& aFlags) const;
 
   bool UpdateFrame(const layers::RepaintRequest& aRequest);
   bool NotifyAPZStateChange(
       const ViewID& aViewId,
       const layers::GeckoContentController::APZStateChange& aChange,
@@ -690,78 +685,72 @@ class BrowserChild final : public Browse
     return *sVisibleTabs;
   }
 
   bool UpdateSessionStore(uint32_t aFlushId);
 
  protected:
   virtual ~BrowserChild();
 
-  virtual PWindowGlobalChild* AllocPWindowGlobalChild(
-      const WindowGlobalInit& aInit) override;
+  PWindowGlobalChild* AllocPWindowGlobalChild(const WindowGlobalInit& aInit);
 
-  virtual bool DeallocPWindowGlobalChild(PWindowGlobalChild* aActor) override;
+  bool DeallocPWindowGlobalChild(PWindowGlobalChild* aActor);
 
-  virtual PBrowserBridgeChild* AllocPBrowserBridgeChild(
+  PBrowserBridgeChild* AllocPBrowserBridgeChild(
       const nsString& aName, const nsString& aRemoteType,
-      BrowsingContext* aBrowsingContext, const uint32_t& aChromeFlags) override;
+      BrowsingContext* aBrowsingContext, const uint32_t& aChromeFlags);
 
-  virtual bool DeallocPBrowserBridgeChild(PBrowserBridgeChild* aActor) override;
+  bool DeallocPBrowserBridgeChild(PBrowserBridgeChild* aActor);
 
-  virtual mozilla::ipc::IPCResult RecvDestroy() override;
+  mozilla::ipc::IPCResult RecvDestroy();
 
-  virtual mozilla::ipc::IPCResult RecvSetDocShellIsActive(
-      const bool& aIsActive) override;
+  mozilla::ipc::IPCResult RecvSetDocShellIsActive(const bool& aIsActive);
 
   MOZ_CAN_RUN_SCRIPT_BOUNDARY
-  virtual mozilla::ipc::IPCResult RecvRenderLayers(
+  mozilla::ipc::IPCResult RecvRenderLayers(
       const bool& aEnabled, const bool& aForce,
-      const layers::LayersObserverEpoch& aEpoch) override;
+      const layers::LayersObserverEpoch& aEpoch);
 
-  virtual mozilla::ipc::IPCResult RecvRequestRootPaint(
+  mozilla::ipc::IPCResult RecvRequestRootPaint(
       const IntRect& aRect, const float& aScale,
-      const nscolor& aBackgroundColor,
-      RequestRootPaintResolver&& aResolve) override;
+      const nscolor& aBackgroundColor, RequestRootPaintResolver&& aResolve);
 
-  virtual mozilla::ipc::IPCResult RecvRequestSubPaint(
+  mozilla::ipc::IPCResult RecvRequestSubPaint(
       const float& aScale, const nscolor& aBackgroundColor,
-      RequestSubPaintResolver&& aResolve) override;
+      RequestSubPaintResolver&& aResolve);
 
-  virtual mozilla::ipc::IPCResult RecvNavigateByKey(
-      const bool& aForward, const bool& aForDocumentNavigation) override;
+  mozilla::ipc::IPCResult RecvNavigateByKey(const bool& aForward,
+                                            const bool& aForDocumentNavigation);
 
-  virtual mozilla::ipc::IPCResult RecvRequestNotifyAfterRemotePaint() override;
+  mozilla::ipc::IPCResult RecvRequestNotifyAfterRemotePaint();
 
-  virtual mozilla::ipc::IPCResult RecvSuppressDisplayport(
-      const bool& aEnabled) override;
+  mozilla::ipc::IPCResult RecvSuppressDisplayport(const bool& aEnabled);
+
+  mozilla::ipc::IPCResult RecvParentActivated(const bool& aActivated);
 
-  virtual mozilla::ipc::IPCResult RecvParentActivated(
-      const bool& aActivated) override;
-
-  virtual mozilla::ipc::IPCResult RecvSetKeyboardIndicators(
+  mozilla::ipc::IPCResult RecvSetKeyboardIndicators(
       const UIStateChangeType& aShowAccelerators,
-      const UIStateChangeType& aShowFocusRings) override;
+      const UIStateChangeType& aShowFocusRings);
+
+  mozilla::ipc::IPCResult RecvStopIMEStateManagement();
 
-  virtual mozilla::ipc::IPCResult RecvStopIMEStateManagement() override;
+  mozilla::ipc::IPCResult RecvAwaitLargeAlloc();
 
-  virtual mozilla::ipc::IPCResult RecvAwaitLargeAlloc() override;
+  mozilla::ipc::IPCResult RecvSetWindowName(const nsString& aName);
 
-  virtual mozilla::ipc::IPCResult RecvSetWindowName(
-      const nsString& aName) override;
+  mozilla::ipc::IPCResult RecvAllowScriptsToClose();
 
-  virtual mozilla::ipc::IPCResult RecvAllowScriptsToClose() override;
+  mozilla::ipc::IPCResult RecvSetOriginAttributes(
+      const OriginAttributes& aOriginAttributes);
 
-  virtual mozilla::ipc::IPCResult RecvSetOriginAttributes(
-      const OriginAttributes& aOriginAttributes) override;
+  mozilla::ipc::IPCResult RecvSetWidgetNativeData(
+      const WindowsHandle& aWidgetNativeData);
 
-  virtual mozilla::ipc::IPCResult RecvSetWidgetNativeData(
-      const WindowsHandle& aWidgetNativeData) override;
-
-  virtual mozilla::ipc::IPCResult RecvGetContentBlockingLog(
-      GetContentBlockingLogResolver&& aResolve) override;
+  mozilla::ipc::IPCResult RecvGetContentBlockingLog(
+      GetContentBlockingLogResolver&& aResolve);
 
  private:
   void HandleDoubleTap(const CSSPoint& aPoint, const Modifiers& aModifiers,
                        const ScrollableLayerGuid& aGuid);
 
   // Notify others that our TabContext has been updated.
   //
   // You should call this after calling TabContext::SetTabContext().  We also
--- a/ipc/ipdl/ipdl/direct_call.py
+++ b/ipc/ipdl/ipdl/direct_call.py
@@ -569,20 +569,16 @@ VIRTUAL_CALL_CLASSES = set([
     ("PExternalHelperApp", "parent"),
     ("PFTPChannel", "child"),
     ("PFTPChannel", "parent"),
     ("PHttpChannel", "child"),
     ("PHttpChannel", "parent"),
     ("PSessionStorageObserver", "child"),
     ("PSessionStorageObserver", "parent"),
 
-    # Recv* methods are MOZ_CAN_RUN_SCRIPT and OnMessageReceived is not, so
-    # it's not allowed to call them.
-    ("PBrowser", "child"),
-
     # can't be included safely for compilation error reasons
     ("PGMPContent", "parent"),
     ("PGMPService", "child"),
     ("PGMPService", "parent"),
     ("PGMPStorage", "parent"),
     ("PGMPVideoDecoder", "parent"),
     ("PGMPVideoEncoder", "parent"),
     ("PWebRenderBridge", "parent"),
--- a/js/src/proxy/Proxy.cpp
+++ b/js/src/proxy/Proxy.cpp
@@ -770,17 +770,17 @@ const Class js::ProxyClass =
 
 JS_FRIEND_API JSObject* js::NewProxyObject(JSContext* cx,
                                            const BaseProxyHandler* handler,
                                            HandleValue priv, JSObject* proto_,
                                            const ProxyOptions& options) {
   AssertHeapIsIdle();
   CHECK_THREAD(cx);
   if (proto_ != TaggedProto::LazyProto) {
-    cx->check(proto_); // |priv| might be cross-compartment.
+    cx->check(proto_);  // |priv| might be cross-compartment.
   }
 
   if (options.lazyProto()) {
     MOZ_ASSERT(!proto_);
     proto_ = TaggedProto::LazyProto;
   }
 
   return ProxyObject::New(cx, handler, priv, TaggedProto(proto_), options);