RSUs and other vesting should be (as in, it would be nice if they did) prorated in the event of a layoff (assuming layoff here means no-fault separation).
That would be the only situation in which I'd even consider them part of compensation. If I can't use it to pay my rent now, it might as well not exist, given the likelihood I'd never be able to realize them anyway.
> One of my previous employers had a rule where they would vest all of my RSU if I were to die while employed there.
Idle curiosity: Was that in lieu of or in addition to life insurance? (Most of my employers have had free life insurance with a payout of a multiple of base salary.)