Skip to content

Commit

Permalink
chore: bump chromium to a264339194bfa02f5ecb3b8cba449 (master) (#27111)
Browse files Browse the repository at this point in the history
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
  • Loading branch information
3 people committed Jan 12, 2021
1 parent 1cd7242 commit adf0a73
Show file tree
Hide file tree
Showing 86 changed files with 503 additions and 460 deletions.
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,10 @@ step-fix-sync-on-mac: &step-fix-sync-on-mac
# Fix Clang Install (wrong binary)
rm -rf src/third_party/llvm-build
python src/tools/clang/scripts/update.py
# Temporarily use an older version of gn
unset CI
python src/buildtools/ensure_gn_version.py git_revision:53d92014bf94c3893886470a1c7c1289f8818db0
export CI=true
fi
step-install-signing-cert-on-mac: &step-install-signing-cert-on-mac
Expand Down
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ gclient_gn_args = [

vars = {
'chromium_version':
'b13e791d7244a08d9d61dbfa2bb2b6cdf1ff6294',
'caef502ee3aa264339194bfa02f5ecb3b8cba449',
'node_version':
'v14.15.4',
'nan_version':
Expand Down
2 changes: 0 additions & 2 deletions chromium_src/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,6 @@ static_library("chrome") {
"//chrome/browser/printing/print_view_manager_basic.h",
"//chrome/browser/printing/printer_query.cc",
"//chrome/browser/printing/printer_query.h",
"//chrome/browser/printing/printing_message_filter.cc",
"//chrome/browser/printing/printing_message_filter.h",
"//chrome/browser/printing/printing_service.cc",
"//chrome/browser/printing/printing_service.h",
]
Expand Down
22 changes: 11 additions & 11 deletions patches/chromium/add_didinstallconditionalfeatures.patch
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ index b6b4e0b27ae971f45ab6d50b2eaede6c4d5b7a8d..b785e23bb7e9bb61cb4434ab0bd2b8df
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 5ee447f5e028a6793d88e8a1d436ea2c5bdba045..efbfb14678cc28dbf3ea918aa6c280e7518a673f 100644
index b42f671279177bf5b58e4c4bd9ee1a83197f31f6..74301e21452af01ebbd5f945610c75cf66aed8a9 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4683,6 +4683,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4676,6 +4676,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}

Expand All @@ -40,10 +40,10 @@ index 5ee447f5e028a6793d88e8a1d436ea2c5bdba045..efbfb14678cc28dbf3ea918aa6c280e7
int world_id) {
for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index ade3e6607ce80bbf35d1618c19fb73ac38c15435..733a095c45b978694e240a0d256d4c2914f4bef9 100644
index f55598ff3266a0e116e80d871a1948a3849cc82b..44f922f8f334dc65dee155bcfaa6f50c1a435b4a 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -651,6 +651,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -658,6 +658,8 @@ class CONTENT_EXPORT RenderFrameImpl
blink::WebLocalFrameClient::LazyLoadBehavior lazy_load_behavior) override;
void DidCreateScriptContext(v8::Local<v8::Context> context,
int world_id) override;
Expand All @@ -53,7 +53,7 @@ index ade3e6607ce80bbf35d1618c19fb73ac38c15435..733a095c45b978694e240a0d256d4c29
int world_id) override;
void DidChangeScrollOffset() override;
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
index 85a51e356241d8c9078ccb0b299cf64a6751c9dd..a209b3fcce3ae9e7ff57b5e47b64a63710fca624 100644
index 03bbdf9d4049e3c78a9cb236625e2def2a5a39e2..d0a7382ccf78be6a7d3457db70c3b5ec6df07652 100644
--- a/third_party/blink/public/web/web_local_frame_client.h
+++ b/third_party/blink/public/web/web_local_frame_client.h
@@ -558,6 +558,9 @@ class BLINK_EXPORT WebLocalFrameClient {
Expand All @@ -67,10 +67,10 @@ index 85a51e356241d8c9078ccb0b299cf64a6751c9dd..a209b3fcce3ae9e7ff57b5e47b64a637
virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
int32_t world_id) {}
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
index 16d2cc458b3a61c0974b258111ad154be61d55db..119f080e0ea00300dc4df8e9ec14d735b424c3f5 100644
index be5cf4457cd379d5abc119d209d2df6520ad1022..8a0baac5bb8cb403324fb8156be62b924d6d3d1a 100644
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
@@ -203,6 +203,7 @@ void LocalWindowProxy::Initialize() {
@@ -188,6 +188,7 @@ void LocalWindowProxy::Initialize() {
}

InstallConditionalFeatures();
Expand All @@ -79,7 +79,7 @@ index 16d2cc458b3a61c0974b258111ad154be61d55db..119f080e0ea00300dc4df8e9ec14d735
if (World().IsMainWorld()) {
GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld();
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
index ef7391a22f661981480c86a709f33c55474d3396..45cec4203c9165940e78cf040e0752f29d056279 100644
index 5c171f837c93fa3df33f5230e999a76fbf8d17c8..97f55d0c95f462384fd112a2a16a5170432677d9 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
@@ -293,6 +293,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
Expand All @@ -92,7 +92,7 @@ index ef7391a22f661981480c86a709f33c55474d3396..45cec4203c9165940e78cf040e0752f2
int32_t world_id) = 0;
virtual bool AllowScriptExtensions() = 0;
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
index 1a5a792fb38246b78b6048a42c968ab3bd7d897c..b63e8ceb72b95754823304d66ade50e7ee86b098 100644
index 63076a78c9dc145a573cad55cc0d880636fdd972..5f7c14a425d2892affa0c872567be922f05ac096 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
@@ -415,6 +415,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
Expand All @@ -110,7 +110,7 @@ index 1a5a792fb38246b78b6048a42c968ab3bd7d897c..b63e8ceb72b95754823304d66ade50e7
v8::Local<v8::Context> context,
int32_t world_id) {
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
index e720a4915a83ede1bfba70c1c43777879d62db38..9b0d89bb124915627d0f08f81321f83f78b73493 100644
index 00780a63657423935bce8a6b35cc1d629b256d14..806e8a381e6089d0ade1492ecd7608f13a71c230 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
@@ -77,6 +77,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
Expand All @@ -123,7 +123,7 @@ index e720a4915a83ede1bfba70c1c43777879d62db38..9b0d89bb124915627d0f08f81321f83f
int32_t world_id) override;

diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
index 1bc22007a15f26840373e42e01ec787c0d1d4451..158c2be36cd098ba2c07f8c00cf71dc00040daaf 100644
index f380e3949be397a894146ab71398c17227779878..4ee4e1f0ae040fdf27c183a16e3102fcacf223a0 100644
--- a/third_party/blink/renderer/core/loader/empty_clients.h
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
@@ -336,6 +336,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
Expand Down
12 changes: 6 additions & 6 deletions patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@ index cd4519d88c3bb8688e772eb0ed2d68e368a32052..12544d1a531ac353802f452d49713d30
// the per-context allow patterns that is managed via NetworkContext
// interface. This still respects the per-context block lists.
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index c92b8a079b759bb53b47ac96511b4dcd6a31d1fd..f6cae1fe60140362efa062b314f6dd9782afb37f 100644
index f33e95c18f54a337b0fab970060fb0740f5e204e..c8220cd5883e2d30a867061779158f630999c88f 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -462,6 +462,7 @@ URLLoader::URLLoader(
@@ -465,6 +465,7 @@ URLLoader::URLLoader(
base::WeakPtr<KeepaliveStatisticsRecorder> keepalive_statistics_recorder,
base::WeakPtr<NetworkUsageAccumulator> network_usage_accumulator,
mojom::TrustedURLLoaderHeaderClient* url_loader_header_client,
+ mojom::TrustedURLLoaderAuthClient* url_loader_auth_client,
mojom::OriginPolicyManager* origin_policy_manager,
std::unique_ptr<TrustTokenRequestHelperFactory> trust_token_helper_factory,
const cors::OriginAccessList* origin_access_list,
@@ -526,6 +527,11 @@ URLLoader::URLLoader(
@@ -529,6 +530,11 @@ URLLoader::URLLoader(
header_client_.set_disconnect_handler(
base::BindOnce(&URLLoader::OnMojoDisconnect, base::Unretained(this)));
}
Expand All @@ -72,7 +72,7 @@ index c92b8a079b759bb53b47ac96511b4dcd6a31d1fd..f6cae1fe60140362efa062b314f6dd97
if (want_raw_headers_) {
options_ |= mojom::kURLLoadOptionSendSSLInfoWithResponse |
mojom::kURLLoadOptionSendSSLInfoForCertificateError;
@@ -1166,7 +1172,7 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
@@ -1190,7 +1196,7 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
// |this| may have been deleted.
return;
}
Expand All @@ -81,7 +81,7 @@ index c92b8a079b759bb53b47ac96511b4dcd6a31d1fd..f6cae1fe60140362efa062b314f6dd97
OnAuthCredentials(base::nullopt);
return;
}
@@ -1182,11 +1188,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
@@ -1206,11 +1212,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
if (url_request->response_headers())
head->headers = url_request->response_headers();
head->auth_challenge_info = auth_info;
Expand Down Expand Up @@ -128,7 +128,7 @@ index 600dd2f10bda513428c16ba6537e5a262f8f6b4b..814662e3bcc2c574ef8e63e607da77f0
std::unique_ptr<FileOpenerForUpload> file_opener_for_upload_;

diff --git a/services/network/url_loader_factory.cc b/services/network/url_loader_factory.cc
index df541bd7513638b4d9b4942e010343b1fdb665c6..1289ed6cc898d3b1c06dd7c4ac9f959727e0b0b2 100644
index 9d7557376804030f444d57d3592bfdf763563188..4af9a8a78b64d45f134e7f3614f861d8c681e463 100644
--- a/services/network/url_loader_factory.cc
+++ b/services/network/url_loader_factory.cc
@@ -77,6 +77,7 @@ URLLoaderFactory::URLLoaderFactory(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ index 758b0b1616ecf86b7dd090adce94395851d9baf2..55f20eb6266368c65fc0ec80d52caa33
accelerated_video_decode_enabled(false),
animation_policy(
diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
index 63d5d4e586eb152fbe7c22ce0038cd3c55ad3175..472acd8f567d323af63151301b153f4d8ab0c529 100644
index ac2cb47de75eb3c3a695ff784c651ba3864ee6a0..e238c4e94fe6501bf7f89654d3b3eeef86eafb63 100644
--- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
+++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
@@ -24,6 +24,11 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
Expand All @@ -57,7 +57,7 @@ index 63d5d4e586eb152fbe7c22ce0038cd3c55ad3175..472acd8f567d323af63151301b153f4d
!data.ReadLazyFrameLoadingDistanceThresholdsPx(
&out->lazy_frame_loading_distance_thresholds_px) ||
!data.ReadLazyImageLoadingDistanceThresholdsPx(
@@ -148,6 +153,27 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
@@ -150,6 +155,27 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
out->navigate_on_drag_drop = data.navigate_on_drag_drop();
out->v8_cache_options = data.v8_cache_options();
out->record_whole_document = data.record_whole_document();
Expand Down Expand Up @@ -86,7 +86,7 @@ index 63d5d4e586eb152fbe7c22ce0038cd3c55ad3175..472acd8f567d323af63151301b153f4d
out->accelerated_video_decode_enabled =
data.accelerated_video_decode_enabled();
diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h
index 95ab02073293c69cafb8a0dc7de5ea467e6ade13..a67307ca4e480a3c50761f0186b070a6de4dbc83 100644
index 64444803e75f95ad1a9b526521c5eee90ba5f925..f8b33c329988f269964783fb290721fc5208ae3d 100644
--- a/third_party/blink/public/common/web_preferences/web_preferences.h
+++ b/third_party/blink/public/common/web_preferences/web_preferences.h
@@ -9,6 +9,7 @@
Expand All @@ -97,7 +97,7 @@ index 95ab02073293c69cafb8a0dc7de5ea467e6ade13..a67307ca4e480a3c50761f0186b070a6
#include "base/strings/string16.h"
#include "base/time/time.h"
#include "build/build_config.h"
@@ -157,6 +158,29 @@ struct BLINK_COMMON_EXPORT WebPreferences {
@@ -159,6 +160,29 @@ struct BLINK_COMMON_EXPORT WebPreferences {
blink::mojom::V8CacheOptions v8_cache_options;
bool record_whole_document;

Expand Down Expand Up @@ -128,7 +128,7 @@ index 95ab02073293c69cafb8a0dc7de5ea467e6ade13..a67307ca4e480a3c50761f0186b070a6
// only controls whether or not the "document.cookie" field is properly
// connected to the backing store, for instance if you wanted to be able to
diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
index 145106cb2fc1992528c33c3429d40c7a528f20af..4c360934a648535b6ebaf476cb2b75bfd6192927 100644
index c071879cdc2e8c39f9eb9e95aa9f08d6d560fc58..9b4143fe461b35df5763e89991c00befd12a18d2 100644
--- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
+++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
@@ -6,6 +6,7 @@
Expand All @@ -139,7 +139,7 @@ index 145106cb2fc1992528c33c3429d40c7a528f20af..4c360934a648535b6ebaf476cb2b75bf
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "net/nqe/effective_connection_type.h"
#include "third_party/blink/public/common/common_export.h"
@@ -431,6 +432,88 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
@@ -436,6 +437,88 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
return r.record_whole_document;
}

Expand Down Expand Up @@ -229,7 +229,7 @@ index 145106cb2fc1992528c33c3429d40c7a528f20af..4c360934a648535b6ebaf476cb2b75bf
return r.cookie_enabled;
}
diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
index df3ffb49020c834b13689c1827d29dd15ace8b62..55774f77bcf967fa94d9fe3fca43814448ded7af 100644
index 519b354f7a0e02e8bfeb9c33904f78898fce37c4..483712685b01a75ad26e9f45a08f2ae32b00d10f 100644
--- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
+++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
@@ -9,6 +9,7 @@ import "third_party/blink/public/mojom/css/preferred_contrast.mojom";
Expand All @@ -240,7 +240,7 @@ index df3ffb49020c834b13689c1827d29dd15ace8b62..55774f77bcf967fa94d9fe3fca438144

enum PointerType {
kPointerNone = 1, // 1 << 0
@@ -209,6 +210,29 @@ struct WebPreferences {
@@ -210,6 +211,29 @@ struct WebPreferences {
V8CacheOptions v8_cache_options;
bool record_whole_document;

Expand Down
60 changes: 48 additions & 12 deletions patches/chromium/blink_local_frame.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,52 @@ According to electron/electron#3699, it is unreliable to use |unload|
event for process.exit('exit'), so we have to do that in
willReleaseScriptContext.

However Chromium then disallowed scripting in willReleaseScriptContext
in https://codereview.chromium.org/1657583002, and crash will happen
when there is code doing that.
Refs changes in:
* https://codereview.chromium.org/1657583002
* https://chromium-review.googlesource.com/c/chromium/src/+/2596880
* https://chromium-review.googlesource.com/c/chromium/src/+/2597169

This patch reverts the change to fix the crash in Electron.
This patch reverts the changes to fix associated crashes in Electron.

diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
index 0d5d1bf784f63f00724cdcf71263752e7715ebf1..5b7869255ec81c4a7bd1e0918609aafe11849934 100644
--- a/third_party/blink/renderer/core/frame/frame.cc
+++ b/third_party/blink/renderer/core/frame/frame.cc
@@ -135,14 +135,6 @@ bool Frame::Detach(FrameDetachType type) {

DCHECK(!IsDetached());

- // TODO(dcheng): FocusController::FrameDetached() *should* fire JS events,
- // hence the above check for `client_` being null. However, when this was
- // previously placed before the `FrameDetached()` call, nothing crashes, which
- // is suspicious. Investigate if we really don't need to fire JS events--and
- // if we don't, move `forbid_scripts` up to be instantiated sooner and
- // simplify this code.
- ScriptForbiddenScope forbid_scripts;
-
if (type == FrameDetachType::kRemove) {
if (provisional_frame_) {
provisional_frame_->Detach(FrameDetachType::kRemove);
@@ -165,6 +157,14 @@ bool Frame::Detach(FrameDetachType type) {
GetWindowProxyManager()->ClearForSwap();
}

+ // TODO(dcheng): FocusController::FrameDetached() *should* fire JS events,
+ // hence the above check for `client_` being null. However, when this was
+ // previously placed before the `FrameDetached()` call, nothing crashes, which
+ // is suspicious. Investigate if we really don't need to fire JS events--and
+ // if we don't, move `forbid_scripts` up to be instantiated sooner and
+ // simplify this code.
+ ScriptForbiddenScope forbid_scripts;
+
// After this, we must no longer talk to the client since this clears
// its owning reference back to our owning LocalFrame.
client_->Detached(type);
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index 235d2b2ae975974daa33c72ef6767ba1ae3d3776..21247ac3539a80badd7c3f7821961492beeba6bf 100644
index bc44c0826be2b7b780b980ddf33285090e0278fb..59bcf6963ba53506d2324a782a18993d374de31a 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -646,10 +646,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
@@ -627,10 +627,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
}
DCHECK(!view_ || !view_->IsAttached());

Expand All @@ -26,16 +61,17 @@ index 235d2b2ae975974daa33c72ef6767ba1ae3d3776..21247ac3539a80badd7c3f7821961492
- // - Document::Shutdown() can dispose plugins which can run script.
- ScriptForbiddenScope forbid_script;
if (!Client())
return;
return false;

@@ -668,6 +664,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
DCHECK(!view_->IsAttached());
Client()->WillBeDetached();

@@ -666,6 +662,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
// Notify WindowProxyManager that the frame is closing, since its cleanup ends
// up calling back to LocalFrameClient via WindowProxy.
GetWindowProxyManager()->ClearForClose();
+ // This is the earliest that scripting can be disabled:
+ // - FrameLoader::Detach() can fire XHR abort events
+ // - Document::Shutdown() can dispose plugins which can run script.
+ ScriptForbiddenScope forbid_script;
+
// TODO(crbug.com/729196): Trace why LocalFrameView::DetachFromLayout crashes.
CHECK(!view_->IsAttached());
SetView(nullptr);
Loading

0 comments on commit adf0a73

Please sign in to comment.