nsresult SpeechTaskParent::DispatchErrorImpl(float aElapsedTime, uint32_t aCharIndex) { MOZ_ASSERT(mActor); SpeechSynthesisRequestParent* actor = mActor; mActor = nullptr; NS_ENSURE_TRUE(actor->Send__delete__(actor, true, aElapsedTime, aCharIndex), NS_ERROR_FAILURE); return NS_OK; }
nsresult SpeechTaskParent::DispatchEndImpl(float aElapsedTime, uint32_t aCharIndex) { MOZ_ASSERT(mActor); SpeechSynthesisRequestParent* actor = mActor; mActor = nullptr; if(NS_WARN_IF(!(actor->Send__delete__(actor, false, aElapsedTime, aCharIndex)))) { return NS_ERROR_FAILURE; } return NS_OK; }