Skip to content

fix: InspectorFrontendHost override in embedded windows#49794

Merged
codebytere merged 1 commit intomainfrom
fix-frontend-host
Mar 9, 2026
Merged

fix: InspectorFrontendHost override in embedded windows#49794
codebytere merged 1 commit intomainfrom
fix-frontend-host

Conversation

@codebytere
Copy link
Copy Markdown
Member

Description of Change

Closes #49753

Adds a path to _overrideGlobalValueFromIsolatedWorld that allows for silent failure when a given property doesn't exist on an object without hard CHECKing.

Checklist

Release Notes

Notes: Fixed an issue where Chrome Devtools menus may not appear in certain embedded windows.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/39-x-y PR should also be added to the "39-x-y" branch. target/40-x-y PR should also be added to the "40-x-y" branch. target/41-x-y PR should also be added to the "41-x-y" branch. labels Feb 13, 2026
@electron-cation electron-cation bot added new-pr 🌱 PR opened recently and removed new-pr 🌱 PR opened recently labels Feb 13, 2026
@codebytere codebytere force-pushed the fix-frontend-host branch 2 times, most recently from fc58831 to 8bf18c6 Compare February 16, 2026 09:50
@codebytere codebytere requested a review from jkleinsc February 17, 2026 14:20
@codebytere codebytere requested a review from ckerr February 19, 2026 18:44
TraceKeyPath(global, key_path, allow_silent_failure);
if (!maybe_target_object.has_value())
return;
gin_helper::Dictionary target_object = std::move(maybe_target_object);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof, sorry for the noise. TIL gin_helper::Dictionary isn't movable.

Either of these would be fine:

  1. Go back to making a copy
  2. Avoid the copy by using a reference auto& target_object = *maybe_target_object;

@codebytere codebytere requested a review from ckerr February 20, 2026 09:05
@codebytere codebytere force-pushed the fix-frontend-host branch 2 times, most recently from 778c56d to 1dfc9d2 Compare March 3, 2026 10:06
@codebytere codebytere merged commit ccb2c77 into main Mar 9, 2026
155 of 159 checks passed
@codebytere codebytere deleted the fix-frontend-host branch March 9, 2026 09:53
@release-clerk
Copy link
Copy Markdown

release-clerk bot commented Mar 9, 2026

Release Notes Persisted

Fixed an issue where Chrome Devtools menus may not appear in certain embedded windows.

@trop
Copy link
Copy Markdown
Contributor

trop bot commented Mar 9, 2026

I have automatically backported this PR to "39-x-y", please check out #50136

@trop trop bot added the in-flight/39-x-y label Mar 9, 2026
@trop
Copy link
Copy Markdown
Contributor

trop bot commented Mar 9, 2026

I have automatically backported this PR to "41-x-y", please check out #50137

@trop trop bot removed the target/39-x-y PR should also be added to the "39-x-y" branch. label Mar 9, 2026
@trop
Copy link
Copy Markdown
Contributor

trop bot commented Mar 9, 2026

I have automatically backported this PR to "40-x-y", please check out #50138

@trop trop bot added in-flight/41-x-y in-flight/40-x-y merged/41-x-y PR was merged to the "41-x-y" branch. merged/40-x-y PR was merged to the "40-x-y" branch. merged/39-x-y PR was merged to the "39-x-y" branch. and removed target/41-x-y PR should also be added to the "41-x-y" branch. target/40-x-y PR should also be added to the "40-x-y" branch. in-flight/41-x-y in-flight/40-x-y in-flight/39-x-y labels Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged/39-x-y PR was merged to the "39-x-y" branch. merged/40-x-y PR was merged to the "40-x-y" branch. merged/41-x-y PR was merged to the "41-x-y" branch. semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression (39+): setDevToolsWebContents() + detached DevTools in custom BrowserWindow breaks DevTools dropdown/popup/context menus (works in 38.8.0)

3 participants