Skip to content

120.0.6099.278

DriverMemory cloning should not weakly assert success, as it can fail in
real production scenarios. Now Clone() will return an invalid
DriverMemory object if it fails to duplicate the internal handle.
Existing callers of Clone() are already durable to an invalid output, so
this change results in graceful failures instead of undefined behavior.

This also replaces some weak asserts in DriverTransport creation with
hardening asserts. We may want to fail more gracefully if these end
up crashing a lot, but it seems unlikely.

(cherry picked from commit 4bd18c5a3a7a935716bbed197fba6d45a1122894)

Fixed: 1521571
Change-Id: Id764b33ead8bbba58e61b3270920c839479eaa4a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5240312
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1252882}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5250958
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/branch-heads/6099@{#1905}
Cr-Branched-From: e6ee4500f7d6549a9ac1354f8d056da49ef406be-refs/heads/main@{#1217362}
Assets 2