Factor out common code for SetPendingNext.

Change-Id: I6c1f9cd6da7b2c21714175455e61479273d3669f
3 files changed