Ensure we succeed at constructing new sparse and dense arrays.

We could conceivably fail (in the presence of exceptions) to construct
the new dense array after constructing and replacing the sparse array.

Change-Id: I0fa0153c58e8b7de66aee464519a378b7f8c0bc8
Reviewed-on: https://code-review.googlesource.com/c/37291
Reviewed-by: Paul Wankadia <junyer@google.com>
1 file changed