зеркало из https://github.com/mozilla/gecko-dev.git
07e3ce0af7
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 |
||
---|---|---|
.. | ||
about | ||
data | ||
file | ||
ftp | ||
gio | ||
http | ||
res | ||
viewsource | ||
websocket | ||
wyciwyg | ||
moz.build |