Files
cef/patch/patches/rfh_navigation_4829483.patch
Marshall Greenblatt b5c740eb60 Reduce the frequency of connection-related renderer crashes (see #3664)
- Use ResetWithReason to report intentional browser side disconnects of
  existing Mojo connections. Don't retry for those disconnects.
- Add set_disconnect_with_reason_and_result_handler in Chromium/Mojo to
  expose the MojoResult code for failed connections, allowing
  identification of connections that are intentionally unbound on the
  browser side.
- Optimize initial reconnect delay for known disconnect cases such as
  navigation-related and bfcache changes.
- Remove connection timeout and increase total connection deadline by
  100% to further reduce crash rates on slower machines.
- Only fail fatally for main frames (not sub-frames) in cases where the
  connection fails or disconnects for unknown reasons.
- Improve connection debug logging when running with
  `--enable-logging --vmodule=*frame*=1 --log-file=C:\temp\log.txt`
2024-12-04 10:53:48 -05:00

38 lines
1.7 KiB
Diff

diff --git content/browser/renderer_host/render_frame_host_impl.cc content/browser/renderer_host/render_frame_host_impl.cc
index 6223e072246c2..16e112ca96554 100644
--- content/browser/renderer_host/render_frame_host_impl.cc
+++ content/browser/renderer_host/render_frame_host_impl.cc
@@ -9130,6 +9130,16 @@ void RenderFrameHostImpl::CreateNewWindow(
return;
}
+ callback = base::BindOnce(
+ [](RenderFrameHostImpl* self,
+ CreateNewWindowCallback callback,
+ mojom::CreateNewWindowStatus status,
+ mojom::CreateNewWindowReplyPtr reply) {
+ GetContentClient()->browser()->CreateWindowResult(
+ self, status == mojom::CreateNewWindowStatus::kSuccess);
+ std::move(callback).Run(status, std::move(reply));
+ }, base::Unretained(this), std::move(callback));
+
// Otherwise, consume user activation before we proceed. In particular, it is
// important to do this before we return from the |opener_suppressed| case
// below.
@@ -11472,6 +11482,7 @@ void RenderFrameHostImpl::CommitNavigation(
auto browser_calc_origin_to_commit =
navigation_request->GetOriginToCommitWithDebugInfo();
if (!process_lock.is_error_page() && !is_mhtml_subframe &&
+ common_params->url.IsStandard() &&
!policy->CanAccessOrigin(
GetProcess()->GetID(), browser_calc_origin_to_commit.first.value(),
ChildProcessSecurityPolicyImpl::AccessType::kCanCommitNewOrigin)) {
@@ -15455,6 +15466,7 @@ void RenderFrameHostImpl::DidCommitNavigation(
if (interface_params) {
if (broker_receiver_.is_bound()) {
+ DVLOG(1) << __func__ << ": broker receiver reset";
broker_receiver_.reset();
}
BindBrowserInterfaceBrokerReceiver(