fix: window.open doesn't work correctly in child window (#25080)
If speculative render view host is deleted during naviagation to page we try to open with call to window.open window is destroyed right after it is created. It may happen when naviagation triggers redirect from http to https. To void that we should emit event current-render-view-deleted only when render view host which was destroyed is the current webcontent's rvh.
This commit is contained in:
parent
3e627f7700
commit
73adeef877
3 changed files with 26 additions and 16 deletions
|
@ -556,8 +556,6 @@ class WebContents : public gin::Wrappable<WebContents>,
|
|||
const base::TimeTicks& proceed_time) override;
|
||||
void RenderViewCreated(content::RenderViewHost* render_view_host) override;
|
||||
void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override;
|
||||
void RenderViewHostChanged(content::RenderViewHost* old_host,
|
||||
content::RenderViewHost* new_host) override;
|
||||
void RenderViewDeleted(content::RenderViewHost*) override;
|
||||
void RenderProcessGone(base::TerminationStatus status) override;
|
||||
void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override;
|
||||
|
@ -696,10 +694,6 @@ class WebContents : public gin::Wrappable<WebContents>,
|
|||
|
||||
bool initially_shown_ = true;
|
||||
|
||||
// The ID of the process of the currently committed RenderViewHost.
|
||||
// -1 means no speculative RVH has been committed yet.
|
||||
int currently_committed_process_id_ = -1;
|
||||
|
||||
service_manager::BinderRegistryWithArgs<content::RenderFrameHost*> registry_;
|
||||
mojo::ReceiverSet<mojom::ElectronBrowser, content::RenderFrameHost*>
|
||||
receivers_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue