I wonder if [this] (https://searchfox.org/mozilla-central/rev/b741ddde6c678ca7025858952202d20664491555/docshell/base/BrowsingContext.cpp#3130) is the problem. That it somehow races with a load. I'll try to make the in process updates happen synchronously to see if that makes any difference.
Bug 1694904 Comment 34 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
I wonder if [this](https://searchfox.org/mozilla-central/rev/b741ddde6c678ca7025858952202d20664491555/docshell/base/BrowsingContext.cpp#3130) is the problem. That it somehow races with a load. I'll try to make the in process updates happen synchronously to see if that makes any difference.