Open Bug 1642401 Opened 4 years ago Updated 4 years ago

Change CancelCPOWs() back to a release assert on ParentProcessIsBlocked()

Categories

(Core :: IPC, task, P3)

task

Tracking

()

People

(Reporter: mccr8, Unassigned)

References

(Blocks 1 open bug)

Details

CancelCPOWs() calls CancelCurrentTransaction() if a sync message is currently in progress. It was added in https://hg.mozilla.org/releases/mozilla-aurora/rev/a237339bf4c8 . Prior to that, we'd hit a release assert in those situations (something about entering a nested event loop and some Windows thing). This also triggers telemetry, IPC_TRANSACTION_CANCEL. It looks like nobody has hit this condition on recent Nightlies, so I think we can revert to the asserting behavior.

The patch I linked above also added a block of code that does a cancel from Send under certain conditions I don't really understand:

  if (msg->nested_level() < DispatchingSyncMessageNestedLevel() ||
      msg->nested_level() < AwaitingSyncReplyNestedLevel()) {
    MOZ_RELEASE_ASSERT(DispatchingSyncMessage() || DispatchingAsyncMessage());
    MOZ_RELEASE_ASSERT(!mIsPostponingSends);
    IPC_LOG("Cancel from Send");
    CancelMessage* cancel =
        new CancelMessage(CurrentNestedInsideSyncTransaction());
    CancelTransaction(CurrentNestedInsideSyncTransaction());
    mLink->SendMessage(cancel);
  }

It doesn't seem super CPOW-specific, so maybe it should be turned into a release assert that we never hit this condition? There's no telemetry on it.

If the "cancel from send" can be removed, then there might be some further clean up around removing cancelling stuff.

Assignee: continuation → nobody
You need to log in before you can comment on or make changes to this bug.