Bug 1777181 - Use cancelable runnables for DataPipe notifications, r=asuth

Differential Revision: https://phabricator.services.mozilla.com/D150611
This commit is contained in:
Nika Layzell 2022-06-30 00:44:06 +00:00
Родитель a78fdd3dc0
Коммит 933e0ff56a
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -570,7 +570,7 @@ NS_IMETHODIMP DataPipeSender::AsyncWait(nsIOutputStreamCallback* aCallback,
uint32_t aRequestedCount,
nsIEventTarget* aTarget) {
AsyncWaitInternal(
aCallback ? NS_NewRunnableFunction(
aCallback ? NS_NewCancelableRunnableFunction(
"DataPipeReceiver::AsyncWait",
[self = RefPtr{this}, callback = RefPtr{aCallback}] {
MOZ_LOG(gDataPipeLog, LogLevel::Debug,
@ -641,7 +641,7 @@ NS_IMETHODIMP DataPipeReceiver::AsyncWait(nsIInputStreamCallback* aCallback,
uint32_t aRequestedCount,
nsIEventTarget* aTarget) {
AsyncWaitInternal(
aCallback ? NS_NewRunnableFunction(
aCallback ? NS_NewCancelableRunnableFunction(
"DataPipeReceiver::AsyncWait",
[self = RefPtr{this}, callback = RefPtr{aCallback}] {
MOZ_LOG(gDataPipeLog, LogLevel::Debug,