Make SharedMemory::TakeHandle() unmap memory.

TakeHandle() was resetting |memory_| without unmapping the shared
memory. This leaks resources because it's no longer possible to unmap
after that point.

Bug: 804399
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I42397ec8dc768ec6d9b2affcaee829f6c8a8ea00
Reviewed-on: https://chromium-review.googlesource.com/897969
Commit-Queue: kylechar <kylechar@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#534109}(cherry picked from commit 58fd01a7e6537738c1f6a7063cb54bdc33d1e9a8)
Reviewed-on: https://chromium-review.googlesource.com/929741
Reviewed-by: Siddhartha S <ssid@chromium.org>
Cr-Commit-Position: refs/branch-heads/3325@{#542}
Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369}
6 files changed