ClearPoisonIOInterposer is never called
Categories
(Core :: XPCOM, task)
Tracking
()
People
(Reporter: mozbugz, Unassigned)
References
Details
Recently in bug 1529610 (not landed yet as I write this) I added a static object in PoisonIOInterposerWin.cpp, with associated clean-up code in ClearPoisonIOInterposer()
, which I expected to be called at some point before shutdown.
However ClearPoisonIOInterposer()
is never called. This caused some confusing test failures with my new code, before I noticed the missing calls!
Its existence implies that things created at/after InitPoisonIOInterposer()
will safely be removed. so I think that either:
ClearPoisonIOInterposer()
should actually be called to matchInitPoisonIOInterposer()
calls; however sinceInitPoisonIOInterposer()
may be called from multiple places, we would need to implement a kind of reference counting to make sure it's only called at the last possible moment.- Or
ClearPoisonIOInterposer()
should just be deleted, to remove the expectation that clean-up happens.
(In the meantime, in bug 1529610 I will add some comments around ClearPoisonIOInterposer()
, to notify future users that it's not used yet.)
Reporter | ||
Comment 1•4 years ago
|
||
Oh, I've only just noticed there's a MOZ_ASSERT(false)
at the top of the Windows implementation! I cannot see an explanation for it though. This was added in bug 902587 in 2013.
Aaron, you last worked on it in 2016(!), any ideas/suggestions?
Comment 2•4 years ago
|
||
Ugh, as you can see it has been a loooong time since that code was worked on.
My best guess is that there were issues with cleanly tearing down the PoisonIOInterposer
and we hadn't made a final decision as to how (or even whether) to do it. Unfortunately both Jonas and I got pulled onto different projects by the end of 2013 and this stuff never really made it to 100% completion.
I would say that, at this point, it's probably your call whether or not it is worth implementing ClearPoisonIOInterposer
. I'm happy to review it, of course, but at this point I don't have a good enough recollection of anything to have strong opinions about it.
Updated•2 years ago
|
Description
•