-
Notifications
You must be signed in to change notification settings - Fork 15k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: crash when clicking links with target=_blank from webview #29874
Conversation
new_guest_view->CreateViewForWidget( | ||
guest_contents_impl->GetRenderViewHost()->GetWidget()); | ||
if (!create_params.initially_hidden) | ||
widget_view->Show(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this call to Show
is new, is it needed? Is this code inspired by some analogous code in Chromium?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is analogous to the non-guest code path from content::WebContentsImpl::CreateNewWindow
, this one specifically to https://source.chromium.org/chromium/chromium/src/+/main:content/browser/web_contents/web_contents_impl.cc;l=3794-3798
Release Notes Persisted
|
I have automatically backported this PR to "14-x-y", please check out #29949 |
I have automatically backported this PR to "12-x-y", please check out #29950 |
I have automatically backported this PR to "13-x-y", please check out #29951 |
Click on link inside BrowserView still crush #29263 (comment) Do you think is related? |
I confirm this is fixed in v14beta, but not v13 latest |
Description of Change
Fixes #28348
When running the test case in debug build, it will be seen that
RWHV::SetActive
call fails because it tries to access an interface blink::FrameWidget that is not bound.The interface usually gets bound when
RenderView
gets created during navigationWhen starting with window.opener suppressed,
WebViewGuestDelegate::CreateNewGuestWindow
created NSView for page which is going to be navigated immediately. Since the view was setup, it was receiving the events from the UI loop that led to the above crash.This change removes the eager widget creation call for this case and lets chromium handle it as expected.
Checklist
npm test
passesRelease Notes
Notes: fix crash when clicking links with
target=_blank
from webview