Skip to content

Commit

Permalink
Bug 1875656: Make CanvasTranslator::AddBuffer diagnostic assert inste…
Browse files Browse the repository at this point in the history
…ad of release. r=aosmond,gfx-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D199222
  • Loading branch information
bobowen committed Jan 22, 2024
1 parent 76d38a1 commit 45d2b32
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion gfx/layers/ipc/CanvasTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,14 @@ void CanvasTranslator::AddBuffer(ipc::SharedMemoryBasic::Handle&& aBufferHandle,
return;
}

MOZ_RELEASE_ASSERT(mHeader->readerState == State::Paused);
if (mHeader->readerState != State::Paused) {
gfxCriticalNote << "CanvasTranslator::AddBuffer bad state "
<< uint32_t(State(mHeader->readerState));
MOZ_DIAGNOSTIC_ASSERT(false, "mHeader->readerState == State::Paused");
Deactivate();
return;
}

MOZ_ASSERT(mDefaultBufferSize != 0);

// Check and signal the writer when we finish with a buffer, because it
Expand Down

0 comments on commit 45d2b32

Please sign in to comment.