PartitionAlloc: Leave bucket in valid state when allocation fails

When an allocation with the PartitionAllocReturnNull flag fails, we need to
make sure to leave all structures in a valid state when bailing out, since
the process lives on and may call again later.

Specifically, make sure that the bucket's activePagesHead has a valid value,
instead of null, when returning null from partitionAllocSlowPath(). Since
there's no meaningful page to set as the active pages head, set it to its
initial value, &PartitionRootBase::gSeedPage.

This was already necessarily supported by the allocation code paths. The
deallocation code path needs some minor adjustments to handle this state
correctly.

Review URL: https://codereview.chromium.org/645223007

git-svn-id: svn://svn.chromium.org/blink/trunk@184983 bbb929c8-8fbe-4397-9dbb-9b2b20218538
2 files changed