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-03 23:30:32 +00:00
Родитель 9b0c0be96e
Коммит 62904d15cd
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) {}