Commit 37f454f2 authored by Kris Maglione's avatar Kris Maglione
Browse files

Bug 1643998: Ignore load events from stale actors in browserLoaded helper. r=nika

parent 8e4e262b
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -81,7 +81,6 @@ support-files = file_new_tab_page.html
skip-if =
  !e10s
  os == 'linux' && debug && bits == 64  # Pref and test only relevant for e10s, Bug 1581500.
  fission && (os == "mac" || os == 'linux')  # Bug 1713893 - new Fission platform triage
[browser_privilegedmozilla_process_pref.js]
skip-if = !e10s # Pref and test only relevant for e10s.
[browser_newwindow_tabstrip_overflow.js]
+9 −0
Original line number Diff line number Diff line
@@ -11,6 +11,15 @@ class BrowserTestUtilsParent extends JSWindowActorParent {
    switch (aMessage.name) {
      case "DOMContentLoaded":
      case "load": {
        // Don't dispatch events that came from stale actors.
        let bc = this.browsingContext;
        if (
          bc.embedderElement.browsingContext != bc ||
          !(this.manager && this.manager.isCurrentGlobal)
        ) {
          return;
        }

        let event = new CustomEvent(
          `BrowserTestUtils:ContentEvent:${aMessage.name}`,
          {