Add some WTFLogAlways() debug to the SleepDisabler constructor and destructor to see when it is created and destroyed. Start playing a YouTube video and note that a SleepDisabler is created. Then close the browser tab. Notice that the destructor never runs: the SleepDisabler has somehow been leaked. This might be a media bug, or it might be a higher-level bug if some other code is leaking the entire media player (hopefully not?). I'm not sure what is happening.
I can't reproduce this after fixing bug 219353.
I can no longer reproduce this, so I'll close this. But see also bug #219354.
After more testing, I'm fairly confident this is reliably fixed.