Skip to content

Commit b542299

Browse files
committed
Bug 1631304 - Don't lazily create a TailDispatcher from MaybeDrainDirectTasks. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D72262
1 parent b90c442 commit b542299

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xpcom/threads/TaskDispatcher.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ class AutoTaskDispatcher : public TaskDispatcher {
206206
private:
207207
void MaybeDrainDirectTasks() {
208208
AbstractThread* currentThread = AbstractThread::GetCurrent();
209-
if (currentThread) {
209+
if (currentThread && currentThread->MightHaveTailTasks()) {
210210
currentThread->TailDispatcher().DrainDirectTasks();
211211
}
212212
}

0 commit comments

Comments
 (0)