From 85856e39ef94e3a2bcef9a242e1865da5c756ad9 Mon Sep 17 00:00:00 2001 From: jgraham Date: Tue, 21 Sep 2021 11:55:41 +0100 Subject: [PATCH] Do whatever Ms2ger says Co-authored-by: Ms2ger --- rfcs/remote_channel.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rfcs/remote_channel.md b/rfcs/remote_channel.md index bfdb966d..68ea13bb 100644 --- a/rfcs/remote_channel.md +++ b/rfcs/remote_channel.md @@ -37,7 +37,7 @@ browser-specific techniques. * Gecko tests able to provide cross-context communication using the parent (i.e. browser UI) process as an intermediary. The - [SpecialPowers.spwan](https://searchfox.org/mozilla-central/source/testing/specialpowers/content/SpecialPowersChild.jsm#1547-1584) + [SpecialPowers.spawn](https://searchfox.org/mozilla-central/source/testing/specialpowers/content/SpecialPowersChild.jsm#1547-1584) API available to gecko tests allows running a function in another context, using structured clone to pass the arguments ([example](https://searchfox.org/mozilla-central/source/dom/tests/browser/browser_data_document_crossOriginIsolated.js#17)). @@ -101,7 +101,7 @@ an error to use the same UUID for multiple contexts. The message passing backend is based on a Python [Queue](https://docs.python.org/3/library/queue.html) object per channel, stored in the server stash. The advantage of using queues -here is that they are designed allow blocking reads. This means we +here is that they are designed to allow blocking reads. This means we don't have to use a polling API but can, on the server side, wait for a message to be added to a channel, and immediately forward the message to the client. Because the stash itself runs in a single @@ -488,7 +488,7 @@ function closeAllChannelSockets() {} With the stash-based approach, it's important to clean up the stash once no channels remain. Otherwise we end up leaking queues. The -general approach is to explicitly store a refcounf as part of the +general approach is to explicitly store a refcount as part of the stash value. Each socket that connects increments the refcount, and decrements it once the socket is closed. Access to the stash is protected by a lock, so only one socket may touch the refcount at a @@ -520,7 +520,7 @@ test.html