chore: bump chromium to f755b70e34659441e72c1a928a406 (master) (#21000)

This commit is contained in:
Electron Bot 2019-12-10 16:22:35 -08:00 committed by Jeremy Apthorp
parent a5c9bd53e0
commit 49b47ee4ed
181 changed files with 1117 additions and 1786 deletions

View file

@ -41,11 +41,40 @@ index 906a1ee4ac58b0744a32153bbaafeac4322a60e4..c90f4aead36cbf3767dc5094728963c2
// Adds the given SiteInstance to our map, to ensure that we do not create
// another SiteInstance for the same site.
void RegisterSiteInstance(SiteInstanceImpl* site_instance);
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
index 3e1027545b127ac1559b2d33ab817642b91f90d9..02b511e5568acb21c8cf255409c077292bbfc24c 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -1214,6 +1214,24 @@ void NavigationRequest::BeginNavigation() {
TRACE_EVENT_ASYNC_STEP_INTO0("navigation", "NavigationRequest", this,
"ResponseStarted");
+ // In Electron, a new process is started for every navigation when node is
+ // integrated in the renderer. Since GetFrameHostForNavigation is called more
+ // than once per navigation, we want to return the same frame host once
+ // the response has started, otherwise if the frame host that started the response
+ // and the frame host that is available for commit don't match then request will
+ // be cancelled. We rely on the NavigationRequest::state_ to determine this
+ // factor
+ //
+ // bool has_response_started =
+ // (request->state() >= NavigationRequest::WILL_PROCESS_RESPONSE &&
+ // !speculative_render_frame_host_);
+ //
+ // Hence this call is necesary before the call to GetFrameHostForNavigation. Also
+ // the state_ here is anyway going to end up being READY_TO_COMMIT because of
+ // ReadyToCommitNavigation a few lines later, so will not affect normal chromium
+ // request cycle.
+ state_ = READY_TO_COMMIT;
+
// Select an appropriate RenderFrameHost.
render_frame_host_ =
frame_tree_node_->render_manager()->GetFrameHostForNavigation(this);
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index d847c6dd1cad8077276a2097c86944780b16ff76..0a76a76e14306f2eee1961a780a08bce6b5dea64 100644
index 9da233cc44b248effa1f2835e65aea02f33d38db..55c05e903e6e8f438c596be227b130f4ad336271 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -2130,6 +2130,16 @@ bool RenderFrameHostManager::InitRenderView(
@@ -2137,6 +2137,16 @@ bool RenderFrameHostManager::InitRenderView(
scoped_refptr<SiteInstance>
RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
NavigationRequest* request) {
@ -62,7 +91,7 @@ index d847c6dd1cad8077276a2097c86944780b16ff76..0a76a76e14306f2eee1961a780a08bce
SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance();
// All children of MHTML documents must be MHTML documents. They all live in
@@ -2149,10 +2159,61 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -2156,10 +2166,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
//
// TODO(clamy): We should also consider as a candidate SiteInstance the
// speculative SiteInstance that was computed on redirects.
@ -76,9 +105,8 @@ index d847c6dd1cad8077276a2097c86944780b16ff76..0a76a76e14306f2eee1961a780a08bce
+ delegate_->GetControllerForRenderManager().GetBrowserContext();
+ bool has_navigation_started = request->state() != NavigationRequest::NOT_STARTED;
+ bool has_response_started =
+ (request->state() == NavigationRequest::RESPONSE_STARTED ||
+ request->state() == NavigationRequest::FAILED) &&
+ !speculative_render_frame_host_;
+ (request->state() >= NavigationRequest::WILL_PROCESS_RESPONSE &&
+ !speculative_render_frame_host_);
+ // Gives user a chance to choose a custom site instance.
+ SiteInstance* affinity_site_instance = nullptr;
+ scoped_refptr<SiteInstance> overriden_site_instance;
@ -128,7 +156,7 @@ index d847c6dd1cad8077276a2097c86944780b16ff76..0a76a76e14306f2eee1961a780a08bce
scoped_refptr<SiteInstance> dest_site_instance = GetSiteInstanceForNavigation(
request->common_params().url, request->GetSourceSiteInstance(),
@@ -2162,6 +2223,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -2169,6 +2229,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request->GetRestoreType() != RestoreType::NONE, request->is_view_source(),
request->WasServerRedirect());
@ -139,10 +167,10 @@ index d847c6dd1cad8077276a2097c86944780b16ff76..0a76a76e14306f2eee1961a780a08bce
}
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
index ea72b3a9d57383a47c91795c11bd0b8fc2b92e55..2adb671d8c36ad22814b75c4be61fb3925dd2258 100644
index 78dfe081fbe560f7c9bc2d39df571a56016f3a6b..7e3ec47028c60b87c52e9fced29ba510706a00fd 100644
--- a/content/browser/site_instance_impl.cc
+++ b/content/browser/site_instance_impl.cc
@@ -360,6 +360,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const GURL& url) {
@@ -368,6 +368,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const GURL& url) {
return browsing_instance_->HasSiteInstance(url);
}
@ -154,7 +182,7 @@ index ea72b3a9d57383a47c91795c11bd0b8fc2b92e55..2adb671d8c36ad22814b75c4be61fb39
const GURL& url) {
return browsing_instance_->GetSiteInstanceForURL(
diff --git a/content/browser/site_instance_impl.h b/content/browser/site_instance_impl.h
index 9fc7e1710f3038e82d7fac6c3fb608cd3a7071ba..ad1e884811e8f7de4dea43f9b754d578e62b4d92 100644
index 42042aba56c3cb89332c545ff3e84cca68517da6..c9fdfe196568824df3cce9762aaf0316c80d8255 100644
--- a/content/browser/site_instance_impl.h
+++ b/content/browser/site_instance_impl.h
@@ -84,6 +84,7 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
@ -166,7 +194,7 @@ index 9fc7e1710f3038e82d7fac6c3fb608cd3a7071ba..ad1e884811e8f7de4dea43f9b754d578
size_t GetRelatedActiveContentsCount() override;
bool RequiresDedicatedProcess() override;
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index 3fdc443b408c3d8f7ffdabf6b010d5fc1ecd22d5..0d0d0f8f90fd830882558b3358d4a168fe5746b7 100644
index 7767e84ceb323eda4391cf437f6aab84eb4e5b13..2453f8e1c78c97f7028d2d8d61d757a091615dc5 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -49,6 +49,21 @@
@ -192,7 +220,7 @@ index 3fdc443b408c3d8f7ffdabf6b010d5fc1ecd22d5..0d0d0f8f90fd830882558b3358d4a168
const MainFunctionParams& parameters) {
return nullptr;
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 891b69d65de0e47719af23eb7047d22d10417019..425e7ab657a2de0ff11e6989a0dc34e11f883999 100644
index 61566cf8137d09b1502cfe152fe34e9d3879529e..3a5be5531a95652db78a13967e218f5c6b59bbe5 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -215,8 +215,45 @@ struct WebPreferences;
@ -242,7 +270,7 @@ index 891b69d65de0e47719af23eb7047d22d10417019..425e7ab657a2de0ff11e6989a0dc34e1
// implementations for the browser startup code. See comments in
// browser_main_parts.h.
diff --git a/content/public/browser/site_instance.h b/content/public/browser/site_instance.h
index a3e880e20e51d988175f0e8e2c42e7f5c1740104..faadd39d01530092f4f31a896ecb60f235e7f63f 100644
index a718f53111bbaa0c248930a577f25b34e2d15494..5fafbed85e5549f0039da6414a40a653bbb72853 100644
--- a/content/public/browser/site_instance.h
+++ b/content/public/browser/site_instance.h
@@ -121,6 +121,11 @@ class CONTENT_EXPORT SiteInstance : public base::RefCounted<SiteInstance> {