From 2a7961a0acaa105b084150f8df3b55da18e7cf3a Mon Sep 17 00:00:00 2001 From: "Byron Campen [:bwc]" Date: Thu, 19 Nov 2020 19:08:17 +0000 Subject: [PATCH] Bug 1626278: Make this test-case function dispatch to STS like it is supposed to. r=mjf Differential Revision: https://phabricator.services.mozilla.com/D97173 --- .../webrtc/transport/test/transport_unittests.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/dom/media/webrtc/transport/test/transport_unittests.cpp b/dom/media/webrtc/transport/test/transport_unittests.cpp index 7427032d0f13..cb1c90cae803 100644 --- a/dom/media/webrtc/transport/test/transport_unittests.cpp +++ b/dom/media/webrtc/transport/test/transport_unittests.cpp @@ -1,4 +1,4 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ + /* vim: set ts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, @@ -484,9 +484,15 @@ class TransportTestPeer : public sigslot::has_slots<> { } void DisconnectDestroyFlow() { - loopback_->Disconnect(); - disconnect_all(); // Disconnect from the signals; - flow_ = nullptr; + test_utils_->sts_target()->Dispatch( + NS_NewRunnableFunction( + __func__, + [this] { + loopback_->Disconnect(); + disconnect_all(); // Disconnect from the signals; + flow_ = nullptr; + }), + NS_DISPATCH_SYNC); } void SetDtlsAllowAll() {