[leveldb_proto] Reset original proto pointer to enable RVO

The initial implementation of the ParseToProto in proto_database_impl.h
returned a new empty proto using a new std::unique_ptr if the serialized
proto could not be parsed.

This CL instead changes it to reset the pointer contained in the
unique_ptr, which should enable RVO.

Bug: 939986
Change-Id: Id348c21c7f8749edc19fadd6c4cd94c055d239ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1519320
Reviewed-by: ssid <ssid@chromium.org>
Commit-Queue: Tommy Nyquist <nyquist@chromium.org>
Cr-Commit-Position: refs/heads/master@{#640678}
1 file changed