michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "FMRadioRequestParent.h" michael@0: #include "FMRadioService.h" michael@0: #include "mozilla/unused.h" michael@0: #include "mozilla/dom/PFMRadio.h" michael@0: michael@0: BEGIN_FMRADIO_NAMESPACE michael@0: michael@0: FMRadioRequestParent::FMRadioRequestParent() michael@0: : mActorDestroyed(false) michael@0: { michael@0: MOZ_COUNT_CTOR(FMRadioRequestParent); michael@0: } michael@0: michael@0: FMRadioRequestParent::~FMRadioRequestParent() michael@0: { michael@0: MOZ_COUNT_DTOR(FMRadioRequestParent); michael@0: } michael@0: michael@0: void michael@0: FMRadioRequestParent::ActorDestroy(ActorDestroyReason aWhy) michael@0: { michael@0: mActorDestroyed = true; michael@0: } michael@0: michael@0: nsresult michael@0: FMRadioRequestParent::Run() michael@0: { michael@0: MOZ_ASSERT(NS_IsMainThread(), "Wrong thread!"); michael@0: michael@0: if (!mActorDestroyed) { michael@0: unused << Send__delete__(this, mResponseType); michael@0: } michael@0: michael@0: return NS_OK; michael@0: } michael@0: michael@0: END_FMRADIO_NAMESPACE michael@0: