I left the implementation in nsMemoryImpl.cpp so that the diff looks reasonable. I also got rid of the weird singleton runnable and replaced it with NS_NewRunnableFunction. Differential Revision: https://phabricator.services.mozilla.com/D158214