IPCRejectReporter.cpp (1218B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #include "mozilla/dom/quota/QuotaCommon.h" 8 #include "mozilla/ipc/MessageChannel.h" 9 10 namespace mozilla::dom::fs { 11 12 // TODO: Find a better way to deal with these errors 13 void IPCRejectReporter(mozilla::ipc::ResponseRejectReason aReason) { 14 switch (aReason) { 15 case mozilla::ipc::ResponseRejectReason::ActorDestroyed: 16 // This is ok 17 break; 18 case mozilla::ipc::ResponseRejectReason::HandlerRejected: 19 QM_TRY(OkIf(false), QM_VOID); 20 break; 21 case mozilla::ipc::ResponseRejectReason::ChannelClosed: 22 QM_TRY(OkIf(false), QM_VOID); 23 break; 24 case mozilla::ipc::ResponseRejectReason::ResolverDestroyed: 25 QM_TRY(OkIf(false), QM_VOID); 26 break; 27 case mozilla::ipc::ResponseRejectReason::SendError: 28 QM_TRY(OkIf(false), QM_VOID); 29 break; 30 default: 31 QM_TRY(OkIf(false), QM_VOID); 32 break; 33 } 34 } 35 36 } // namespace mozilla::dom::fs