fix: crash when renderer process crashes while webview is reloading (#46768)
WebView uses WebContentsViewChildFrame, which doesn't have a Focus impl and triggers a fatal NOTREACHED. Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Jinli Wu <wujinli@bytedance.com>
This commit is contained in:
parent
197444181d
commit
c4302ab58c
3 changed files with 31 additions and 0 deletions
|
@ -4014,6 +4014,14 @@ void WebContents::ExitPictureInPicture() {
|
|||
PictureInPictureWindowManager::GetInstance()->ExitPictureInPicture();
|
||||
}
|
||||
|
||||
bool WebContents::ShouldFocusPageAfterCrash(content::WebContents* source) {
|
||||
// WebView uses WebContentsViewChildFrame, which doesn't have a Focus impl
|
||||
// and triggers a fatal NOTREACHED.
|
||||
if (is_guest())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void WebContents::DevToolsSaveToFile(const std::string& url,
|
||||
const std::string& content,
|
||||
bool save_as,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue