Please add just a quick comment that references that the docs for this are in mailapi/wakelocks.js.  I've been reading some other big Moz codebases recently and been finding that simple lifelines like this would have been super useful.  (NB: I understand this is a feedback pass.)