Because I'm using canBeDispatched also from postSuccess, to check if I should start servicing the pendingRequest [1] and at that point pendingRequest[uid] might be undefined. I can change the call in [1] to read:

if (pendingRequest[uid] && canBeDispatched(pendingRequest[uid])) 

but seemed cleaner this way.

[1] https://github.com/mozilla-b2g/gaia/pull/13881/files#diff-e52295cf35393b752462e0ea99723b8cR76