Bug 1759572 - AsyncLengthWaitHelper should be threadsafe, r=asuth

This works only because the only implementation of nsIAsyncInputStreamLength
happened to only run on the current thread. Bug 1754004, changes this, and requires the reference to be threadsafe.

Differential Revision: https://phabricator.services.mozilla.com/D141037
This commit is contained in:
Nika Layzell 2022-05-13 14:16:08 +00:00
Родитель 7fb91b57a3
Коммит caacb618c0
1 изменённых файлов: 2 добавлений и 4 удалений

Просмотреть файл

@ -1276,11 +1276,9 @@ nsMultiplexInputStream::Length(int64_t* aLength) {
}
class nsMultiplexInputStream::AsyncWaitLengthHelper final
: public nsIInputStreamLengthCallback
{
: public nsIInputStreamLengthCallback {
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
AsyncWaitLengthHelper()
: mStreamNotified(false), mLength(0), mNegativeSize(false) {}