With GeckoDriver v0.20.0 and Firefox Quantum v59.0.2 (64-bits) your code block looks good and the log stack trace looks equally good enough sans the log message :
Promise rejected while context is inactive: Message manager disconnected
As per the discussion in Mozilla Support Forum this error seems to be Privacy Badger. In short this issue is caused by an extension that isn't loaded/working properly.
@Test
.Are unresolved promises rejected prior to a window.unload event?
Well, as I mentioned in my Answer your stack trace was fair enough as per current implementations. But personally I haven't seen this trace on my localhost :
Promise rejected while context is inactive: Message manager disconnected
Of-coarse some traces can be dependent of the underlying OS. Now going through the entire discussion Are unresolved promises rejected prior to a window.unload event? the bottom-line seems :
The problem of promises from unloading pages (or indeed script invocation in unloaded pages in general) not being specified very well and not being interoperably implemented is very real. See also https://bugzilla.mozilla.org/show_bug.cgi?id=1058695 where we ended up putting in some mitigations in Gecko that technically don't follow the spec, because technically following the spec requires leaking the world in common cases.... The problem is that there is no spec for this event loop stuff right now, and the spec for Promise is part of ES6, which doesn't really doesn't admit the possibility of Realms needing to go away in some sense, so there's nothing to even raise such issues against.
Hence the conclusion is You are good to race ahead