Bug 1499828 Part 5 - Don't suppress events when pausing in the middleman, r=lsmyth.
authorBrian Hackett <bhackett1024@gmail.com>
Wed, 17 Oct 2018 13:32:46 -0600
changeset 500775 18f2ea8c2a1978a36ed6b3124f9ce213da7726dc
parent 500774 925e342d29d805f96f06ebd99a4679cd2fd72ecd
child 500776 ae91c0db8005dd58d87b9acd8160ceacbb20db72
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsmyth
bugs1499828
milestone64.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 1499828 Part 5 - Don't suppress events when pausing in the middleman, r=lsmyth.
devtools/server/actors/targets/browsing-context.js
--- a/devtools/server/actors/targets/browsing-context.js
+++ b/devtools/server/actors/targets/browsing-context.js
@@ -1178,31 +1178,40 @@ const browsingContextTargetPrototype = {
    * Prepare to enter a nested event loop by disabling debuggee events.
    */
   preNest() {
     if (!this.window) {
       // The browsing context is already closed.
       return;
     }
     const windowUtils = this.window.windowUtils;
-    windowUtils.suppressEventHandling(true);
+
+    // Events are not suppressed when running in the middleman, as we are in a
+    // different process from the debuggee and may want to process events in
+    // the middleman for e.g. the overlay drawn when rewinding.
+    if (Debugger.recordReplayProcessKind() != "Middleman") {
+      windowUtils.suppressEventHandling(true);
+    }
+
     windowUtils.suspendTimeouts();
   },
 
   /**
    * Prepare to exit a nested event loop by enabling debuggee events.
    */
   postNest(nestData) {
     if (!this.window) {
       // The browsing context is already closed.
       return;
     }
     const windowUtils = this.window.windowUtils;
     windowUtils.resumeTimeouts();
-    windowUtils.suppressEventHandling(false);
+    if (Debugger.recordReplayProcessKind() != "Middleman") {
+      windowUtils.suppressEventHandling(false);
+    }
   },
 
   _changeTopLevelDocument(window) {
     // Fake a will-navigate on the previous document
     // to let a chance to unregister it
     this._willNavigate(this.window, window.location.href, null, true);
 
     this._windowDestroyed(this.window, null, true);