Prevent STATUS_ACCESS_VIOLATION in inspector overlay
Prior to a recent change [1], `InspectorOverlayAgent::SetInspectTool` would call `InspectorOverlayAgent::LoadFrameForTool` which assigns to `overlay_page_`. With the patch, that no longer happened, resulting in `STATUS_ACCESS_VIOLATION` “oh snap” errors when using the “capture area screenshot” functionality in DevTools. This patch moves the “is the inspector agent enabled” check around so that we don’t hit any `nullptr`s while still getting the desired behavior of not rendering inspector overlays while taking screenshots. [1]: https://chromium-review.googlesource.com/c/chromium/src/+/2235553 Bug: chromium:1091037, chromium:1122038 Change-Id: I36ab8b883f1e643bcc89ebaed4063cc1409ee466 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2387560Reviewed-by:Peter Marshall <petermarshall@chromium.org> Commit-Queue: Mathias Bynens <mathias@chromium.org> Cr-Commit-Position: refs/heads/master@{#803417}
Showing
Please register or sign in to comment