Skip to content

Commit

Permalink
[marionette] Raise JavaScriptError if MarionetteCommands actor gets d…
Browse files Browse the repository at this point in the history
…estroyed.

Differential Revision: https://phabricator.services.mozilla.com/D219658

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1761634
gecko-commit: 2d8046b0452a0dafe4f832c2620ebc560855900e
gecko-reviewers: webdriver-reviewers, Sasha, jdescottes
  • Loading branch information
whimboo authored and moz-wptsync-bot committed Aug 21, 2024
1 parent 3897cad commit fee3544
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tools/wptrunner/wptrunner/executors/executormarionette.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,15 +275,18 @@ def get_test_window(self, window_id, parent, timeout=5):
def test_window_loaded(self):
"""Wait until the page in the new window has been loaded.
Hereby ignore Javascript execptions that are thrown when
Hereby ignore Javascript exceptions that are thrown when
the document has been unloaded due to a process change.
"""
while True:
try:
self.parent.base.execute_script(self.window_loaded_script, asynchronous=True)
break
except errors.JavascriptException:
pass
except errors.JavascriptException as e:
if e.message.startswith("Script evaluation aborted: Actor"):
# Special-case JavaScript errors for a JSWindowActor destroy
# until a decision is made on bug 1673478.
pass


class MarionettePrefsProtocolPart(PrefsProtocolPart):
Expand Down

0 comments on commit fee3544

Please sign in to comment.