Check if GuestOsRegistryService exists before use
guest_os::GetHandler can be called on incognito and guest profiles which do not have a GuestOsRegistryService. This causes a null pointer deref crash. Fix this by returning base::nullopt in this case. Ran new unit test without change to verify the crash, and again with the rest of the change to verify the fix. Bug: 1139821 Change-Id: I943d2d7c06b2f897607784a046978a981ed2613e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2485414 Commit-Queue: Fergus Dall <sidereal@google.com> Commit-Queue: Joel Hockey <joelhockey@chromium.org> Auto-Submit: Fergus Dall <sidereal@google.com> Reviewed-by:Joel Hockey <joelhockey@chromium.org> Cr-Commit-Position: refs/heads/master@{#818757}
Showing
Please register or sign in to comment