Several navigation methods leak registered observers through the ProgressListener
Categories
(Remote Protocol :: Agent, defect, P2)
Tracking
(firefox132 fixed)
Tracking | Status | |
---|---|---|
firefox132 | --- | fixed |
People
(Reporter: whimboo, Assigned: whimboo)
References
(Blocks 1 open bug)
Details
(Whiteboard: [webdriver:m12])
Attachments
(1 file)
I noticed that issue when investigating bug 1891706. Whenever we open a new tab the method waitForInitialNavigationCompleted
is called to await the initial about:blank
page to be loaded.
Because this method uses the ProgressListener
class which itself makes use of the PromptListener
class several observer notifications are getting registered when the PromptListener
is started to listen.
In the waitForInitialNavigationCompleted
method we for sure wait for the navigation to be done but we never call listener.destroy()
. As such the progress listener will be removed when it gets out of scope but all the registered observers remain active.
To fix that we have to explicitly call listener.destroy()
before leaving the scope of the method.
Comment 1•2 months ago
|
||
As mentioned on Matrix, we also never call destroy on the ProgressListener instances created at:
Assignee | ||
Comment 2•2 months ago
|
||
Indeed. We should fix those all. Thanks!
Assignee | ||
Updated•2 months ago
|
Assignee | ||
Comment 3•2 months ago
|
||
Comment 5•2 months ago
|
||
bugherder |
Description
•