зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1643998: Ignore load events from stale actors in browserLoaded helper. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D117570
This commit is contained in:
Родитель
db959e6eb0
Коммит
5c9ca10ec3
|
@ -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]
|
||||
|
|
|
@ -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 && bc.embedderElement.browsingContext != bc) ||
|
||||
!(this.manager && this.manager.isCurrentGlobal)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
let event = new CustomEvent(
|
||||
`BrowserTestUtils:ContentEvent:${aMessage.name}`,
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче