Skip to content

Commit

Permalink
Bug 1811216 - Update an assertion in JSValidatorChild r=farre
Browse files Browse the repository at this point in the history
I don't immediate see an reason about why this assertion can fail.

Given the test (browser_ext_tabs_move_window.js) closes some windows
near the end, I wonder if it's possible for RecvOnDataAvailable to
be run after ActorDestroy.

Differential Revision: https://phabricator.services.mozilla.com/D167270
  • Loading branch information
sefeng211 committed Jan 25, 2023
1 parent 38a87da commit 4df76be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dom/ipc/JSValidatorChild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ mozilla::ipc::IPCResult JSValidatorChild::RecvIsOpaqueResponseAllowed(
}

mozilla::ipc::IPCResult JSValidatorChild::RecvOnDataAvailable(Shmem&& aData) {
MOZ_ASSERT(mResolver);
if (!mResolver) {
MOZ_ASSERT(!CanSend());
return IPC_OK();
}

if (!mSourceBytes.Append(Span(aData.get<char>(), aData.Size<char>()),
mozilla::fallible)) {
Expand Down

0 comments on commit 4df76be

Please sign in to comment.