Skip to content

Commit

Permalink
Bug 1300016 - only suspend web-speech when mUtterance exists. r=eeejay
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: E29qJ1sgZ5c
  • Loading branch information
alastor0325 committed Nov 7, 2016
1 parent 24e9ef2 commit b63290a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dom/media/webspeech/synth/nsSpeechTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,10 @@ nsSpeechTask::WindowVolumeChanged(float aVolume, bool aMuted)
NS_IMETHODIMP
nsSpeechTask::WindowSuspendChanged(nsSuspendedTypes aSuspend)
{
if (!mUtterance) {
return NS_OK;
}

if (aSuspend == nsISuspendedTypes::NONE_SUSPENDED &&
mUtterance->mPaused) {
Resume();
Expand Down

0 comments on commit b63290a

Please sign in to comment.