gecko-dev/netwerk/protocol
Andrew McCreight 07e3ce0af7 Bug 1517601, part 3 - WebSocketEvent subclasses should not hold strong references to the channel. r=mayhemer
This patch moves the channel pointer from the WebSocketEvents into the
classes that wrap them (EventTargetDispatcher and
WrappedWebSocketEvent) to fix leaks.

EventTargetDispatcher uses a weak pointer. This is needed to prevent a
leak if the ChannelEvent dispatch fails, because it would create a
cycle of strong references between the WebSocketEvent, the channel,
the channel event queue, and EventTargetDispatcher. It is safe because
the ChannelEventQueue ensures that the channel remains alive.

WrappedWebSocketEvent uses a strong pointer. This won't create a leak
because the runnable is not owned by the channel. It is needed for
safety because it can't rely on the ChannelEventQueue mechanism for
keeping the channel alive.

The WPT whitelisting moves them into two subdirectories that still
seem to leak sometimes, but the top level websockets/ directory seems
okay now.

Depends on D19586

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

--HG--
extra : moz-landing-system : lando
2019-02-13 16:58:31 +00:00
..
about Bug 1520868 - Replacing AsyncOpen2 with AsyncOpen always r=valentin 2019-02-12 16:08:25 +00:00
data Bug 1520868 - Replacing AsyncOpen2 with AsyncOpen always r=valentin 2019-02-12 16:08:25 +00:00
file Bug 1520868 - Replacing AsyncOpen2 with AsyncOpen always r=valentin 2019-02-12 16:08:25 +00:00
ftp Bug 1520868 - Replacing AsyncOpen2 with AsyncOpen always r=valentin 2019-02-12 16:08:25 +00:00
gio Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
http Bug 1522093 - Make sure to not reuse a connection to a proxy that returns an error response we can't gracefully handle, r=kershaw 2019-02-12 22:44:30 +00:00
res Bug 1520868 - Replacing AsyncOpen2 with AsyncOpen always r=valentin 2019-02-12 16:08:25 +00:00
viewsource Bug 1520868 - Replacing AsyncOpen2 with AsyncOpen always r=valentin 2019-02-12 16:08:25 +00:00
websocket Bug 1517601, part 3 - WebSocketEvent subclasses should not hold strong references to the channel. r=mayhemer 2019-02-13 16:58:31 +00:00
wyciwyg Bug 1520868 - Replacing AsyncOpen2 with AsyncOpen always r=valentin 2019-02-12 16:08:25 +00:00
moz.build Bug 1408957 - Remove netwerk/protocol/device/ (no longer used) r=dragana 2017-10-16 12:12:16 +02:00