Open Bug 1402306 Opened 7 years ago Updated 1 year ago

onunload event listener not removed after script evaluation

Categories

(Remote Protocol :: Marionette, defect, P2)

Version 3
defect

Tracking

(Not tracked)

People

(Reporter: ato, Unassigned)

References

(Blocks 1 open bug)

Details

The document unload event listener in testing/marionette/evaluate.js is never removed after the script is done evaluating because it is installed directly on window.onunload but attempted removed with window.removeEventListener:

>     unloadHandler = sandbox.cloneInto(
>         () => reject(new JavaScriptError("Document was unloaded")),
>         sb);>     sb.window.onunload = unloadHandler;>     sb.window.removeEventListener("unload", unloadHandler);

This can be verified if you log when the unloadHandler is called.
[Mass Change 2018-01-15] Moving bugs to backlog
Priority: -- → P3
Blocks: webdriver
Priority: P3 → P2
Severity: normal → S3
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.