I can't imagine that this regression has anything to do with
Unsound_NumQueuedMessages. There should genuinely be no way that the value returned there would be changed, and the performance of doing a couple fewer virtual calls for it should have no impact.
The only differences I'm seeing here are that we now acquire the MessageChannel's mutex when asking
IsClosed() (but I wouldn't expect us to be collecting memory reports at all during this particular test, and there should be no other callers of that method), and that we no longer update the atomic
output_queue_length_ member of
IPC::Channel when queueing/dequeueing messages (though I would expect that to only lead to performance improvements, and extremely slight ones at that).
Interestingly, looking at the graph it appears that the regression is for a similar-ish amount to the recent improvement reported in bug 1753436, although I have no idea how they could be related. Perhaps there's some optimizer threshold which we happen to be very near right now, and is causing small swings on this particular test?