chore: bump chromium to 108.0.5359.10 (22-x-y) (#36063)

* chore: bump chromium in DEPS to 108.0.5359.4

* chore: update patches

* fixup! Change content::PluginList to only run on the UI thread.

(cherry picked from commit 7b5ec87d4f)
Co-Authored-By: Robo <hop2deep@gmail.com>
(cherry picked from commit 76a618e7d0)

* chore: bump chromium in DEPS to 108.0.5359.10

* chore: update patches

* fixup printing patch

https://github.com/electron/electron/pull/35375 accidentally
broke https://github.com/electron/electron/pull/34711

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
electron-roller[bot]
2022-10-21 20:00:18 -04:00
committed by GitHub
parent b0a5ada661
commit fa39ee4bb7
36 changed files with 176 additions and 115 deletions

View File

@@ -613,6 +613,8 @@ source_set("electron_lib") {
if (enable_plugins) {
deps += [ "chromium_src:plugins" ]
sources += [
"shell/common/plugin_info.cc",
"shell/common/plugin_info.h",
"shell/renderer/pepper_helper.cc",
"shell/renderer/pepper_helper.h",
]

2
DEPS
View File

@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'108.0.5355.0',
'108.0.5359.10',
'node_version':
'v16.17.1',
'nan_version':

View File

@@ -67,10 +67,10 @@ index 149ca596036a4a4c123b6982014001953cf06800..dd069baf01929b75f42093ecf09ecf8e
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 c8af53d40eaa1dd3a0067948a8cda80d1599cee3..4de918ee52efa7ec27a21aa2f57616d31dfd07d1 100644
index d0b5233ad45995bd6128a03fe9267618d723d683..e5e93be8f2433196a13aa104241b1ddd63985e81 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
@@ -209,6 +209,7 @@ void LocalWindowProxy::Initialize() {
@@ -210,6 +210,7 @@ void LocalWindowProxy::Initialize() {
}
InstallConditionalFeatures();

View File

@@ -72,10 +72,10 @@ index f3b681ec44c57f69c57390f31bd951cef8de3f0c..2fbe866ddf50d7eb324b0e2e4d120f4c
// Visibility -----------------------------------------------------------
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index 50cae526561de69c7b6b3b5d2467946ee92fcb23..fe35e9c6b8c51e61f0f89c8feca03a36f756d432 100644
index 33cd38a8e24a2db922987a957a115a5892382a59..b07f239296667e0d3809ccee255d608e7b0d0c9b 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -3808,13 +3808,21 @@ PageScheduler* WebViewImpl::Scheduler() const {
@@ -3811,13 +3811,21 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler();
}

View File

@@ -9,7 +9,7 @@ and can be removed when the crash in fork is resolved.
Related issue: https://github.com/electron/electron/issues/32718
diff --git a/build_overrides/partition_alloc.gni b/build_overrides/partition_alloc.gni
index 2e63825db7a41ecbb044547dbfe318767d743a4e..e245960ab5a714293cc08b556988a28e37f120ff 100644
index 44ace8017bdf9ce2ddb996e30ee03dbdc6274fb9..e2ce9f6c57e55f6a9257bb2e58e99895ca52f8c6 100644
--- a/build_overrides/partition_alloc.gni
+++ b/build_overrides/partition_alloc.gni
@@ -40,7 +40,7 @@ _disable_partition_alloc = is_component_build || (is_win && is_debug)

View File

@@ -33,10 +33,10 @@ index b12b4e65be8ad29054f5fdd98600888726b1d068..d67683efeabed3209eac553ff050ec2e
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index cb7cbdca15b12f5735d20777cb3b2fd8d3129061..7ce770bde9e70ac7f3aceb3dd7c14f4a19c76bfc 100644
index 68415e75360cec6de27d95ba01b30935c491023e..b5885d348ed5a3ed18bb524cbbde51ed185a8658 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4679,7 +4679,7 @@ static_library("browser") {
@@ -4683,7 +4683,7 @@ static_library("browser") {
# On Windows, the hashes are embedded in //chrome:chrome_initial rather
# than here in :chrome_dll.
@@ -46,10 +46,10 @@ index cb7cbdca15b12f5735d20777cb3b2fd8d3129061..7ce770bde9e70ac7f3aceb3dd7c14f4a
sources += [ "certificate_viewer_stub.cc" ]
}
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index e368f894735d19ff166997b8f72379a8988541ac..141308ad441cd6864318533071dd033f1499ebf3 100644
index 15b713cb25724fc2a0b743725837720492739ed2..f7649e3bc908cd9a04294d63c405f98b6363b05d 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -6153,7 +6153,6 @@ test("unit_tests") {
@@ -6156,7 +6156,6 @@ test("unit_tests") {
deps += [
"//chrome:other_version",
@@ -57,7 +57,7 @@ index e368f894735d19ff166997b8f72379a8988541ac..141308ad441cd6864318533071dd033f
"//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources",
"//chrome/app:crash_reporter_client_win_unit_tests",
@@ -6178,6 +6177,10 @@ test("unit_tests") {
@@ -6181,6 +6180,10 @@ test("unit_tests") {
"//ui/resources",
]
@@ -68,7 +68,7 @@ index e368f894735d19ff166997b8f72379a8988541ac..141308ad441cd6864318533071dd033f
ldflags = [
"/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
"/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
@@ -7103,7 +7106,7 @@ test("unit_tests") {
@@ -7107,7 +7110,7 @@ test("unit_tests") {
}
deps += [
@@ -77,7 +77,7 @@ index e368f894735d19ff166997b8f72379a8988541ac..141308ad441cd6864318533071dd033f
"//chrome/browser/autofill_assistant/password_change/vector_icons:vector_icons",
"//chrome/browser/enterprise/connectors/analysis:features",
"//chrome/browser/media/router:test_support",
@@ -7226,6 +7229,10 @@ test("unit_tests") {
@@ -7230,6 +7233,10 @@ test("unit_tests") {
}
}

View File

@@ -9,7 +9,7 @@ potentially prevent a window from being created.
TODO(loc): this patch is currently broken.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index f00a5c63bb8f6c61f1a89cb38cf1ea253a353e25..94690c49a771cb5ff873696bf0926972e7276d50 100644
index e4e16ccdcd2070e56d9572b7d4bc22d685cb34bc..7484975281bf5c19b1640c56ea6ad5f8a1add54a 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -7443,6 +7443,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -81,7 +81,7 @@ index f31156ba6ea6d6229198d129c5b56cfa1847c5fc..41f3dac6323bda9d1a10bcb8678fe3da
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 65d57c0efa1b268f0cbe4b49bd64a51d1da3cdc0..2dcea7a09b8521020e0821e18cbd45219caca639 100644
index 9b6c2b8b249af92bc38c2c72f420e851c138d6f6..3f5f0449b7c70b7d48438d4c4c908c897cad3727 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -163,6 +163,7 @@ class NetworkService;

View File

@@ -7,7 +7,7 @@ By default, chromium sets up one v8 snapshot to be used in all v8 contexts. This
to have a dedicated browser process v8 snapshot defined by the file `browser_v8_context_snapshot.bin`.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index f55888577c514abe5ed64e8b88ff9f6e442815fd..1cb549ad9229dc9cf478e1bb3959a984055d8fe1 100644
index 89cbfffe47ba6dbf6ba771b49a327ea69a3aede9..3089d64a8d701fcce9a153b1fbb6553e030e0bcc 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -38,6 +38,7 @@
@@ -48,7 +48,7 @@ index f55888577c514abe5ed64e8b88ff9f6e442815fd..1cb549ad9229dc9cf478e1bb3959a984
#endif // V8_USE_EXTERNAL_STARTUP_DATA
}
@@ -955,7 +962,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
@@ -954,7 +961,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
return TerminateForFatalInitializationError();
#endif // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE)
@@ -81,7 +81,7 @@ index a687861c04b323102a8d2bfe22b24a964793cd9b..4a7a469111eaec3e1e76ee852bd5afbb
return new ContentClient();
}
diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h
index 94b0925b07528eb21004aeb180594c067932f1d3..095f697908595d14aa7fb524efe31df3a80e4144 100644
index 8420d43b88bc7187d8e0701dd58a5de07366a5c6..5572fad8219ae2c72f7c636b8b86c0b64cf75411 100644
--- a/content/public/app/content_main_delegate.h
+++ b/content/public/app/content_main_delegate.h
@@ -9,6 +9,7 @@
@@ -92,7 +92,7 @@ index 94b0925b07528eb21004aeb180594c067932f1d3..095f697908595d14aa7fb524efe31df3
#include "build/build_config.h"
#include "content/common/content_export.h"
#include "content/public/common/main_function_params.h"
@@ -162,6 +163,8 @@ class CONTENT_EXPORT ContentMainDelegate {
@@ -165,6 +166,8 @@ class CONTENT_EXPORT ContentMainDelegate {
virtual bool ShouldHandleConsoleControlEvents();
#endif

View File

@@ -15,10 +15,10 @@ at some point be an API to "unfreeze" the flags, or we may be able to refactor
node initialization to not update flags after V8 initialization.
diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc
index ff83822653e2e661eb0ce9e3a1a90c045b25fdb1..f7141cb915ab8028117264ecd8ebfdb53b1079f0 100644
index f2bdea351833b9c49b2f6fb1a9badfc83c07dbb1..ed7b55da2ba31391d2840ef704159f59c26b92e3 100644
--- a/content/renderer/render_process_impl.cc
+++ b/content/renderer/render_process_impl.cc
@@ -241,6 +241,9 @@ RenderProcessImpl::RenderProcessImpl()
@@ -228,6 +228,9 @@ RenderProcessImpl::RenderProcessImpl()
SetV8FlagIfNotFeature(features::kWebAssemblyDynamicTiering,
"--no-wasm-dynamic-tiering");
@@ -27,4 +27,4 @@ index ff83822653e2e661eb0ce9e3a1a90c045b25fdb1..f7141cb915ab8028117264ecd8ebfdb5
+
#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64)
if (base::FeatureList::IsEnabled(features::kWebAssemblyTrapHandler)) {
if (command_line->HasSwitch(switches::kEnableCrashpad) ||
base::CommandLine* const command_line =

View File

@@ -51,10 +51,10 @@ index b1ac2fd235d3fc424d15b5c5991d7026a0f85090..6dc46954b070795de082d8542f8bae56
// This may only be called on NetworkContexts created with the constructor
// that calls MakeURLRequestContext().
diff --git a/services/network/network_context.h b/services/network/network_context.h
index 5b0a62302719f2aca565d933be4391ce59894f01..f16ba305b84c46ffbbef66d95c3f04bc8cc4f7e3 100644
index ae43559f383538f9a8ef168a592a6de416f1ded2..402a9de330140e78f14dbfae204f4c637803fcef 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -298,6 +298,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -299,6 +299,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override;
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
mojom::NetworkConditionsPtr conditions) override;

View File

@@ -12,7 +12,7 @@ Ideally we could add an embedder observer pattern here but that can be
done in future work.
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index fe35e9c6b8c51e61f0f89c8feca03a36f756d432..775d81466dea650bb849cf6fb1a97662781a9b2d 100644
index b07f239296667e0d3809ccee255d608e7b0d0c9b..4adb26b265738d5f16568252e070300dcf2951f5 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -164,6 +164,7 @@

View File

@@ -13,7 +13,7 @@ other protocols to register their streaming behavior. MultibufferDataSource::Ass
then refers to the list so that it can correctly determine the data source's settings.
diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
index 2201f930953ed125a0439bafb26e27b42de11003..7372476a7a794d5de8ee01858690f77af8875501 100644
index 35e37b00ca87f1975c11ab98858b7849487304e5..82248fc99bbd0484f15de6ed7a7451cda741f807 100644
--- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
+++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
@@ -11,8 +11,10 @@
@@ -65,7 +65,7 @@ index 2201f930953ed125a0439bafb26e27b42de11003..7372476a7a794d5de8ee01858690f77a
void MultiBufferDataSource::SetReader(MultiBufferReader* reader) {
diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.h b/third_party/blink/renderer/platform/media/multi_buffer_data_source.h
index fd7d59b9c50d0142a3d17a43b348f66f7f868674..e2361792eb6f9ba1e46018283634e2b9293916ec 100644
index 28789ff812609dcad26955f4d22e9bfac8b9f948..6ea16442e0c4f29d1df81081a93a5f9fb6972d5c 100644
--- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.h
+++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.h
@@ -33,6 +33,8 @@ namespace blink {

View File

@@ -103,10 +103,10 @@ index dd8e82d32cba09733b98f48ff08e750b4dec82d2..0680b97af6a933c060d759740da2a294
string mime_type;
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index 7e7032d83da30c95a01e5f240934a5aec81c8345..05095deaccf5ce111e3fc4ee4d304e17e55485a9 100644
index 60a520d9f637a588d10e72239818fa5b862c9865..d3d1d572277605dddf2a2a2a78919bff92c00a22 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -606,6 +606,7 @@ URLLoader::URLLoader(
@@ -478,6 +478,7 @@ URLLoader::URLLoader(
mojo::SimpleWatcher::ArmingPolicy::MANUAL,
base::SequencedTaskRunnerHandle::Get()),
per_factory_corb_state_(context.GetMutableCorbState()),
@@ -114,7 +114,7 @@ index 7e7032d83da30c95a01e5f240934a5aec81c8345..05095deaccf5ce111e3fc4ee4d304e17
devtools_request_id_(request.devtools_request_id),
request_mode_(request.mode),
request_credentials_mode_(request.credentials_mode),
@@ -785,7 +786,7 @@ URLLoader::URLLoader(
@@ -660,7 +661,7 @@ URLLoader::URLLoader(
url_request_->SetRequestHeadersCallback(base::BindRepeating(
&URLLoader::SetRawRequestHeadersAndNotify, base::Unretained(this)));
@@ -123,7 +123,7 @@ index 7e7032d83da30c95a01e5f240934a5aec81c8345..05095deaccf5ce111e3fc4ee4d304e17
url_request_->SetResponseHeadersCallback(base::BindRepeating(
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
}
@@ -1572,6 +1573,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
@@ -1442,6 +1443,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
}
response_ = BuildResponseHead();
@@ -144,7 +144,7 @@ index 7e7032d83da30c95a01e5f240934a5aec81c8345..05095deaccf5ce111e3fc4ee4d304e17
// Parse and remove the Trust Tokens response headers, if any are expected,
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
index 0cb0cc23cad280fd04dde13c8070d04ca2f886a0..e50b4f518da8fae47a76c26affcc7a5d2f07068f 100644
index 9be9f703b189050332ca506dd3066609c3fa3992..1a15939f15fcc93de02cf0ff67faaefc5adbee53 100644
--- a/services/network/url_loader.h
+++ b/services/network/url_loader.h
@@ -526,6 +526,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader

View File

@@ -13,10 +13,10 @@ This patch can be removed should we choose to support chrome.fileSystem
or support it enough to fix the crash.
diff --git a/chrome/browser/resources/pdf/pdf_viewer.ts b/chrome/browser/resources/pdf/pdf_viewer.ts
index faa76a4083ad33bf8262fa322b9bfdd885320e8f..5ef867b567fc8f1dd230ab46de7f8b3b05e47b38 100644
index 05bb506868ffc2b72e57b348f10e868258297447..990336cc320135b27361494735a08a2284f95136 100644
--- a/chrome/browser/resources/pdf/pdf_viewer.ts
+++ b/chrome/browser/resources/pdf/pdf_viewer.ts
@@ -860,26 +860,12 @@ export class PdfViewerElement extends PdfViewerBaseElement {
@@ -865,26 +865,12 @@ export class PdfViewerElement extends PdfViewerBaseElement {
dataArray = [result.dataToSave];
}
@@ -48,7 +48,7 @@ index faa76a4083ad33bf8262fa322b9bfdd885320e8f..5ef867b567fc8f1dd230ab46de7f8b3b
}
/**
@@ -987,30 +973,12 @@ export class PdfViewerElement extends PdfViewerBaseElement {
@@ -992,30 +978,12 @@ export class PdfViewerElement extends PdfViewerBaseElement {
fileName = fileName + '.pdf';
}

View File

@@ -50,10 +50,10 @@ upstream would also hit this DCHECK, so give it a try with content_shell or
chrome and that would help reporting upstream crbug.
diff --git a/services/device/device_service.cc b/services/device/device_service.cc
index e21ddc77480abc177b2c2afd76ccc0126b27ebb7..7db962d3bc076e9465b2e4e081122fd5bb2aa8d5 100644
index eb9831586c92d5fbd90e075a8c32fa2e647edd82..c3bf4194fd97826aae8b9da5e0c91100081828c7 100644
--- a/services/device/device_service.cc
+++ b/services/device/device_service.cc
@@ -159,7 +159,7 @@ DeviceService::~DeviceService() {
@@ -158,7 +158,7 @@ DeviceService::~DeviceService() {
// naturally sequenced after the last task on
// |serial_port_manager_task_runner_| per ThreadPool shutdown semantics).
// See crbug.com/1263149#c20 for details.

View File

@@ -8,11 +8,11 @@ v8::Value instead of base::Value.
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=1323953
diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc
index 01d3ac55dbf4d366e660bbee1d964f21bc3182ac..9ead280cce1577f05ff3409f8b31bd0fb044eaea 100644
index bbeec904936d05ef76a9e5de1dcd7159e5c0f364..4be3de364630e989f4ac956944362800d535ef73 100644
--- a/extensions/renderer/script_injection.cc
+++ b/extensions/renderer/script_injection.cc
@@ -342,6 +342,7 @@ void ScriptInjection::InjectJs(std::set<std::string>* executing_scripts,
blocking_option,
@@ -331,6 +331,7 @@ void ScriptInjection::InjectJs(std::set<std::string>* executing_scripts,
blink::mojom::LoadEventBlockingOption::kBlock,
base::BindOnce(&ScriptInjection::OnJsInjectionCompleted,
weak_ptr_factory_.GetWeakPtr()),
+ base::NullCallback(),
@@ -86,7 +86,7 @@ index 175b2a77d696a60fa8209809edc758912a11e83a..86cdb09f3d87cdc6970a288f50848c78
void LocalFrame::SetEvictCachedSessionStorageOnFreezeOrUnload() {
diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h
index baac5c90c88991dc4b3ced175a8830f8d4cf1935..3b7f6a708fb41df297f9017daa6ec815ea1c418b 100644
index 4296d020d3fa1b26b055dfd6140f8886b01e9493..cd42e9a71d1896b83ff6c556b3006cb1ca0af101 100644
--- a/third_party/blink/renderer/core/frame/local_frame.h
+++ b/third_party/blink/renderer/core/frame/local_frame.h
@@ -762,6 +762,7 @@ class CORE_EXPORT LocalFrame final

View File

@@ -20,7 +20,7 @@ index d1700997390777100002fb0a2f4a5fc0e961fb15..1a08dabef38c67b7ccfc5522e91b0322
}
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 2dcea7a09b8521020e0821e18cbd45219caca639..0a128058163ec4adcdfb051d5c2e0f6c8394b81b 100644
index 3f5f0449b7c70b7d48438d4c4c908c897cad3727..b00733238917b663909125e68a6fea84e060c9a8 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -272,6 +272,11 @@ class CONTENT_EXPORT ContentBrowserClient {

View File

@@ -11,7 +11,7 @@ If removing this patch causes no sync failures, it's safe to delete :+1:
Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index a6adc31330f50a9495ef335b6c5d99e5d8f45e39..a85d5bb16ab0ce8a0193c54af282d49424a5b40b 100755
index 24d1aff884305f2c5366a898e45632bdcd18f3ab..116765e717c22a550e21197dfd27145c08d36c41 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -302,6 +302,8 @@ def GetDefaultHostOs():

View File

@@ -9,7 +9,7 @@ but due to the nature of electron, we need to load the v8 snapshot
in the browser process.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index e2f53860b9ea57e1a07f58a7490770a9b7517143..f55888577c514abe5ed64e8b88ff9f6e442815fd 100644
index 6965f862853afa8ddebfbfc0ee766bcf7b0643a6..89cbfffe47ba6dbf6ba771b49a327ea69a3aede9 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -261,11 +261,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {

View File

@@ -50,10 +50,10 @@ index 8d1b4e5bf4f95dc890a956b616860f955da5b929..9914fba92b472fbe52c1f14e695b2131
gfx::Size pixel_size_;
diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.mm b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
index 3bf9a1c4ca3fc41bc912852b291a1484da29e00a..eda48669fc091122004733d3585e2dc9cf81c35b 100644
index 622ae164022f2e78f0591f81e6afdb6e7331cdd3..3c3e351c4d8da67a5b78bc359bb3b9ed0c898011 100644
--- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm
+++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
@@ -61,6 +61,7 @@
@@ -68,6 +68,7 @@
ca_layer_tree_coordinator_ = std::make_unique<ui::CALayerTreeCoordinator>(
use_remote_layer_api_, allow_av_sample_buffer_display_layer);
@@ -61,7 +61,7 @@ index 3bf9a1c4ca3fc41bc912852b291a1484da29e00a..eda48669fc091122004733d3585e2dc9
// Create the CAContext to send this to the GPU process, and the layer for
// the context.
if (use_remote_layer_api_) {
@@ -69,6 +70,7 @@
@@ -76,6 +77,7 @@
options:@{}] retain]);
[ca_context_ setLayer:ca_layer_tree_coordinator_->GetCALayerForDisplay()];
}
@@ -69,7 +69,7 @@ index 3bf9a1c4ca3fc41bc912852b291a1484da29e00a..eda48669fc091122004733d3585e2dc9
}
ImageTransportSurfaceOverlayMac::~ImageTransportSurfaceOverlayMac() {
@@ -146,7 +148,9 @@
@@ -153,7 +155,9 @@
"GLImpl", static_cast<int>(gl::GetGLImplementation()),
"width", pixel_size_.width());
if (use_remote_layer_api_) {
@@ -79,7 +79,7 @@ index 3bf9a1c4ca3fc41bc912852b291a1484da29e00a..eda48669fc091122004733d3585e2dc9
} else {
IOSurfaceRef io_surface =
ca_layer_tree_coordinator_->GetIOSurfaceForDisplay();
@@ -378,6 +382,7 @@
@@ -385,6 +389,7 @@
ca_layer_tree_coordinator_ = std::make_unique<ui::CALayerTreeCoordinator>(
use_remote_layer_api_, allow_av_sample_buffer_display_layer);
@@ -87,7 +87,7 @@ index 3bf9a1c4ca3fc41bc912852b291a1484da29e00a..eda48669fc091122004733d3585e2dc9
// Create the CAContext to send this to the GPU process, and the layer for
// the context.
if (use_remote_layer_api_) {
@@ -386,6 +391,7 @@
@@ -393,6 +398,7 @@
options:@{}] retain]);
[ca_context_ setLayer:ca_layer_tree_coordinator_->GetCALayerForDisplay()];
}
@@ -95,7 +95,7 @@ index 3bf9a1c4ca3fc41bc912852b291a1484da29e00a..eda48669fc091122004733d3585e2dc9
}
ImageTransportSurfaceOverlayMacEGL::~ImageTransportSurfaceOverlayMacEGL() {
@@ -464,7 +470,9 @@
@@ -490,7 +496,9 @@
"GLImpl", static_cast<int>(gl::GetGLImplementation()),
"width", pixel_size_.width());
if (use_remote_layer_api_) {

View File

@@ -139,10 +139,10 @@ index a5974ea868cfca930794f522038844138a02b3ce..b1ac2fd235d3fc424d15b5c5991d7026
builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
diff --git a/services/network/network_context.h b/services/network/network_context.h
index 7a0d76107bf45fd4d1e638b9b66965c4ace4e893..5b0a62302719f2aca565d933be4391ce59894f01 100644
index e6c3b62a0505b7dd83f77bde63264461446c770a..ae43559f383538f9a8ef168a592a6de416f1ded2 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -102,6 +102,7 @@ class URLMatcher;
@@ -103,6 +103,7 @@ class URLMatcher;
namespace network {
class CertVerifierWithTrustAnchors;
@@ -150,7 +150,7 @@ index 7a0d76107bf45fd4d1e638b9b66965c4ace4e893..5b0a62302719f2aca565d933be4391ce
class CookieManager;
class ExpectCTReporter;
class HostResolver;
@@ -238,6 +239,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -239,6 +240,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
void CreateURLLoaderFactory(
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
mojom::URLLoaderFactoryParamsPtr params) override;
@@ -159,7 +159,7 @@ index 7a0d76107bf45fd4d1e638b9b66965c4ace4e893..5b0a62302719f2aca565d933be4391ce
void ResetURLLoaderFactories() override;
void GetCookieManager(
mojo::PendingReceiver<mojom::CookieManager> receiver) override;
@@ -838,6 +841,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -843,6 +846,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
std::vector<base::OnceClosure> dismount_closures_;
#endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED)

View File

@@ -31,7 +31,7 @@ index dfbfbf4e5d92eb8c7c2ba38f31264ac41713a485..78cc81931321656c308e5611e30e0813
const GURL& origin,
const GURL& document_url,
diff --git a/content/browser/notifications/blink_notification_service_impl.cc b/content/browser/notifications/blink_notification_service_impl.cc
index a84465f5c59921a1febaf2015be71fb593eb92a5..0b8e0aea8ac663c22c327005cb95d3f19dd1200c 100644
index f66c863b18da856b449eaf4fd8cf8202d34a2f10..55aecd359a7d375f64d2125e3c08d9ea50175cda 100644
--- a/content/browser/notifications/blink_notification_service_impl.cc
+++ b/content/browser/notifications/blink_notification_service_impl.cc
@@ -83,11 +83,13 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl(
@@ -49,7 +49,7 @@ index a84465f5c59921a1febaf2015be71fb593eb92a5..0b8e0aea8ac663c22c327005cb95d3f1
service_worker_context_(std::move(service_worker_context)),
render_process_host_id_(render_process_host->GetID()),
@@ -152,7 +154,7 @@ void BlinkNotificationServiceImpl::DisplayNonPersistentNotification(
notification_id, std::move(event_listener_remote));
notification_id, std::move(event_listener_remote), weak_document_ptr_);
browser_context_->GetPlatformNotificationService()->DisplayNotification(
- notification_id, origin_.GetURL(), document_url_,

View File

@@ -796,7 +796,7 @@ index 51a5497b809cda82b223138f43507172a9f066ae..71227492fd87e577518f3bf55ded37b0
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
// Set options for print preset from source PDF document.
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index a82ab440893d22424366c969d6765a10ee05ea86..a68bc27a93a38f5a1cb0c3dc225def6290dbf688 100644
index 5a032fac280466c9e1498c4d629acbe0b0bb1ec6..3274b0331aaa077603e8ad10ca9fe4b3cebc3161 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -2819,8 +2819,9 @@ source_set("browser") {
@@ -812,7 +812,7 @@ index a82ab440893d22424366c969d6765a10ee05ea86..a68bc27a93a38f5a1cb0c3dc225def62
if (is_chromeos) {
sources += [
diff --git a/content/browser/utility_sandbox_delegate_win.cc b/content/browser/utility_sandbox_delegate_win.cc
index aa59ef2ea780af3e881be9a984eef5d309586dc4..c5bd3ed36ff3f4d1fe75ef2c6a1d40d655c0bbe0 100644
index aa59ef2ea780af3e881be9a984eef5d309586dc4..fb5dcccf6d3f7cf9c18155319d87624432d92526 100644
--- a/content/browser/utility_sandbox_delegate_win.cc
+++ b/content/browser/utility_sandbox_delegate_win.cc
@@ -99,6 +99,7 @@ bool NetworkPreSpawnTarget(sandbox::TargetConfig* config) {
@@ -823,14 +823,14 @@ index aa59ef2ea780af3e881be9a984eef5d309586dc4..c5bd3ed36ff3f4d1fe75ef2c6a1d40d6
// Sets the sandbox policy for the print backend service process.
bool PrintBackendPreSpawnTarget(sandbox::TargetConfig* config) {
DCHECK(!config->IsConfigured());
@@ -192,6 +193,7 @@ bool XrCompositingPreSpawnTarget(sandbox::TargetConfig* config,
@@ -112,6 +113,7 @@ bool PrintBackendPreSpawnTarget(sandbox::TargetConfig* config) {
config->SetDelayedIntegrityLevel(sandbox::INTEGRITY_LEVEL_LOW);
return true;
}
+#endif
} // namespace
std::string UtilitySandboxedProcessLauncherDelegate::GetSandboxTag() {
std::string UtilityAppContainerId(base::CommandLine& cmd_line) {
return base::WideToUTF8(cmd_line.GetProgram().value());
diff --git a/printing/printing_context.cc b/printing/printing_context.cc
index 3a9e75c229f028dcbfb2d7b9294bc42989cb4c1e..a890c5517c0708034bbc6b9b606c990a9ae8be7a 100644
--- a/printing/printing_context.cc

View File

@@ -10,7 +10,7 @@ kinds of utility windows. Similarly for `disableAutoHideCursor`.
Additionally, disables usage of some private APIs in MAS builds.
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
index 1f5898124ca5ab45349dd4749c1b33a10723d46a..3c70ba4663b0176167a32e588dfd2840ba13362c 100644
index 22b03d5bd27f09731a3c2d6dbb03c7dc612a2975..274a7e784af522b8f58c36095ca6c0cdadb97671 100644
--- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
+++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
@@ -158,6 +158,15 @@ void ExtractUnderlines(NSAttributedString* string,
@@ -29,7 +29,7 @@ index 1f5898124ca5ab45349dd4749c1b33a10723d46a..3c70ba4663b0176167a32e588dfd2840
// RenderWidgetHostViewCocoa ---------------------------------------------------
// Private methods:
@@ -599,6 +608,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
@@ -597,6 +606,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
}
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
@@ -39,7 +39,7 @@ index 1f5898124ca5ab45349dd4749c1b33a10723d46a..3c70ba4663b0176167a32e588dfd2840
return [self acceptsMouseEventsWhenInactive];
}
@@ -675,6 +687,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
@@ -673,6 +685,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
// its parent view.
BOOL hitSelf = NO;
while (view) {
@@ -50,7 +50,7 @@ index 1f5898124ca5ab45349dd4749c1b33a10723d46a..3c70ba4663b0176167a32e588dfd2840
if (view == self)
hitSelf = YES;
if ([view isKindOfClass:[self class]] && ![view isEqual:self] &&
@@ -994,6 +1010,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
@@ -992,6 +1008,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
eventType == NSEventTypeKeyDown &&
!(modifierFlags & NSEventModifierFlagCommand);
@@ -61,7 +61,7 @@ index 1f5898124ca5ab45349dd4749c1b33a10723d46a..3c70ba4663b0176167a32e588dfd2840
// We only handle key down events and just simply forward other events.
if (eventType != NSEventTypeKeyDown) {
_hostHelper->ForwardKeyboardEvent(event, latency_info);
@@ -1818,9 +1838,11 @@ - (NSAccessibilityRole)accessibilityRole {
@@ -1816,9 +1836,11 @@ - (NSAccessibilityRole)accessibilityRole {
// Since this implementation doesn't have to wait any IPC calls, this doesn't
// make any key-typing jank. --hbono 7/23/09
//
@@ -73,7 +73,7 @@ index 1f5898124ca5ab45349dd4749c1b33a10723d46a..3c70ba4663b0176167a32e588dfd2840
- (NSArray*)validAttributesForMarkedText {
// This code is just copied from WebKit except renaming variables.
@@ -1829,7 +1851,10 @@ - (NSArray*)validAttributesForMarkedText {
@@ -1827,7 +1849,10 @@ - (NSArray*)validAttributesForMarkedText {
initWithObjects:NSUnderlineStyleAttributeName,
NSUnderlineColorAttributeName,
NSMarkedClauseSegmentAttributeName,

View File

@@ -14,7 +14,7 @@ Note that we also need to manually update embedder's
`api::WebContents::IsFullscreenForTabOrPending` value.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 94690c49a771cb5ff873696bf0926972e7276d50..e6df759eff45383f809a98994bfae3b1d79807ef 100644
index 7484975281bf5c19b1640c56ea6ad5f8a1add54a..674168c49840bf73512ec9fba7a91e4d8c49c7a0 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -6718,6 +6718,17 @@ void RenderFrameHostImpl::EnterFullscreen(

View File

@@ -26,10 +26,10 @@ index 69e9da01fd70890a3df6c3c3959f87feb9ea316e..ce8cbdd6ce54bb2e0f1e6371679fc0d1
// An empty URL is returned if the URL is not overriden.
virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index 9a29b47834bd99129c73397e8873cedc8cf7f014..c3adc4563f0c5d8e50dc1f5acdd61f314b21493d 100644
index 4cedfbfaa2f7b76a4add30f7d0859d6b59bb2c56..f934c18e385299682a66a3027f52460e1da20098 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -867,6 +867,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
@@ -876,6 +876,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
}
@@ -43,10 +43,10 @@ index 9a29b47834bd99129c73397e8873cedc8cf7f014..c3adc4563f0c5d8e50dc1f5acdd61f31
const v8::Local<v8::Context>& worker) {
GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index bb3be5a46b3dfd9f279c780d501a264cf4fc5be7..799cec3e793b1acf33864bea4d49b3544634781b 100644
index 78ffa14e79f1294f5dc4731441d24905948dd2db..9561eed5d1e2234edbda8094b6c15af0c29d083b 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -181,6 +181,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -182,6 +182,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
void DidStartWorkerThread() override;
void WillStopWorkerThread() override;
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
@@ -55,10 +55,10 @@ index bb3be5a46b3dfd9f279c780d501a264cf4fc5be7..799cec3e793b1acf33864bea4d49b354
const blink::WebSecurityOrigin& script_origin) override;
blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel()
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index 4bbd5c412ff46a865de52c07c0f91b2bd05ce476..9b4559f6dd51cec07a4fdc7da35ce645906f1a74 100644
index bb82952036825aa6b19449956984cb3c90874af1..9550aee35d129c5cdd71de67150dfb70661414e6 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -633,6 +633,7 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -635,6 +635,7 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
@@ -67,12 +67,12 @@ index 4bbd5c412ff46a865de52c07c0f91b2bd05ce476..9b4559f6dd51cec07a4fdc7da35ce645
const WebSecurityOrigin& script_origin) {
return false;
diff --git a/third_party/blink/renderer/core/workers/worker_thread.cc b/third_party/blink/renderer/core/workers/worker_thread.cc
index 8bb4af88c478ba374682ee7fd56616336c1176b6..b5ab51bf0e8277794303046748ca43ed8cbcf9ba 100644
index 8bf05b2789af3f7d2f6ecda9b7a6eb4abb84dbd6..b739ed97b190bce06b6c0f2bc12a1869fa590e39 100644
--- a/third_party/blink/renderer/core/workers/worker_thread.cc
+++ b/third_party/blink/renderer/core/workers/worker_thread.cc
@@ -745,6 +745,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
nested_runner_->QuitNow();
@@ -747,6 +747,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
}
pause_handle_.reset();
+ {
+ v8::HandleScope handle_scope(GetIsolate());

View File

@@ -35,10 +35,10 @@ index ce8cbdd6ce54bb2e0f1e6371679fc0d1438ae69c..4de6b91b2f182be488249bf2a47b376a
// from the worker thread.
virtual void WillDestroyWorkerContextOnWorkerThread(
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index c3adc4563f0c5d8e50dc1f5acdd61f314b21493d..3460a40fb904ad0a976f53d5a53004692a75e380 100644
index f934c18e385299682a66a3027f52460e1da20098..9bc3b562363f75ddbcb55ee1dd3e567a8f449b16 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -879,6 +879,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
@@ -888,6 +888,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
worker);
}
@@ -52,10 +52,10 @@ index c3adc4563f0c5d8e50dc1f5acdd61f314b21493d..3460a40fb904ad0a976f53d5a5300469
const blink::WebSecurityOrigin& script_origin) {
return GetContentClient()->renderer()->AllowScriptExtensionForServiceWorker(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index 799cec3e793b1acf33864bea4d49b3544634781b..c4f354300035bede81187ba490178e717a448665 100644
index 9561eed5d1e2234edbda8094b6c15af0c29d083b..b39e1d1783692ce787d6be8cc7ed59686b9cc78b 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -181,6 +181,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -182,6 +182,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
void DidStartWorkerThread() override;
void WillStopWorkerThread() override;
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
@@ -65,10 +65,10 @@ index 799cec3e793b1acf33864bea4d49b3544634781b..c4f354300035bede81187ba490178e71
bool AllowScriptExtensionForServiceWorker(
const blink::WebSecurityOrigin& script_origin) override;
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index 9b4559f6dd51cec07a4fdc7da35ce645906f1a74..66f5268054cd00a8aa0f22cf5197a329b1ce38e5 100644
index 9550aee35d129c5cdd71de67150dfb70661414e6..53f9b371d28a82ea20554bfd2ae04082047bf44b 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -633,6 +633,8 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -635,6 +635,8 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}

View File

@@ -9,7 +9,7 @@ necessary for native modules to load.
Also, some fixes relating to mksnapshot on ARM.
diff --git a/BUILD.gn b/BUILD.gn
index bd6252bbce6c8232104b10a11395a83c272b3863..d6d3ab0cafe13334441594ab80cc62b46b79c50b 100644
index 29eb0dc060063e0f68b16d5809e39ce2ebc8156e..f3a5b9f5d1e1dcb881497d793f982a8c38091bb4 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -634,7 +634,7 @@ config("internal_config") {
@@ -21,7 +21,7 @@ index bd6252bbce6c8232104b10a11395a83c272b3863..d6d3ab0cafe13334441594ab80cc62b4
defines += [ "BUILDING_V8_SHARED" ]
}
@@ -6072,7 +6072,7 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -6073,7 +6073,7 @@ if (current_toolchain == v8_generator_toolchain) {
"src/interpreter/bytecodes.h",
]

View File

@@ -12,7 +12,7 @@ This patch can be safely removed if, when it is removed, `node.lib` does not
contain any standard C++ library exports (e.g. `std::ostringstream`).
diff --git a/BUILD.gn b/BUILD.gn
index cda24079b700d0cde451ef84cc2e19345040f32d..f4b89fe682b0454729a00b0e9c929b8e9af74d5d 100644
index 12e322d66485ad174eb6cc7220296d0f8eb4655d..f481aaa18d18034b7f5ddd834820c2d065e39a83 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -634,6 +634,10 @@ config("internal_config") {

View File

@@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch
Needed in order to target mksnapshot for mksnapshot zip.
diff --git a/BUILD.gn b/BUILD.gn
index d6d3ab0cafe13334441594ab80cc62b46b79c50b..cda24079b700d0cde451ef84cc2e19345040f32d 100644
index f3a5b9f5d1e1dcb881497d793f982a8c38091bb4..12e322d66485ad174eb6cc7220296d0f8eb4655d 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -6084,7 +6084,6 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -6085,7 +6085,6 @@ if (current_toolchain == v8_generator_toolchain) {
if (current_toolchain == v8_snapshot_toolchain) {
v8_executable("mksnapshot") {

View File

@@ -18,7 +18,7 @@ index f58636fee555d782e18b7521c0c4f28ed60b3a52..6b0c63b34ff09f70cb9a4fe419f3b9bb
StoreRoot(RootIndex::kCurrentMicrotask, microtask);
TNode<IntPtrT> saved_entered_context_count = GetEnteredContextCount();
diff --git a/src/codegen/code-stub-assembler.cc b/src/codegen/code-stub-assembler.cc
index 68dd0da0750948d74bdcfeff4b25693e6d03855e..4b9bf906b90762749011ab7c21c43d9e862f1fda 100644
index a069126f94daff6377dacc0e171e3ff27a0c176c..b5adde191992581f4aa052aec5a6587be9f9463c 100644
--- a/src/codegen/code-stub-assembler.cc
+++ b/src/codegen/code-stub-assembler.cc
@@ -6257,12 +6257,6 @@ void CodeStubAssembler::SetPendingMessage(TNode<HeapObject> message) {

View File

@@ -43,7 +43,6 @@
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
#if BUILDFLAG(ENABLE_PLUGINS)
#include "content/public/browser/plugin_service.h"
#include "content/public/common/content_plugin_info.h"
#include "ppapi/shared_impl/ppapi_permissions.h"
#include "ppapi/shared_impl/ppapi_switches.h" // nogncheck crbug.com/1125897
@@ -121,20 +120,6 @@ void ComputeBuiltInPlugins(std::vector<content::ContentPluginInfo>* plugins) {
"Portable Document Format");
pdf_info.mime_types.push_back(pdf_mime_type);
plugins->push_back(pdf_info);
// NB. in Chrome, this plugin isn't registered until the PDF extension is
// loaded. However, in Electron, we load the PDF extension unconditionally
// when it is enabled in the build, so we're OK to load the plugin eagerly
// here.
content::WebPluginInfo info;
info.type = content::WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN;
info.name = base::ASCIIToUTF16(kPDFExtensionPluginName);
// This isn't a real file path; it's just used as a unique identifier.
info.path = base::FilePath::FromUTF8Unsafe(extension_misc::kPdfExtensionId);
info.background_color = content::WebPluginInfo::kDefaultBackgroundColor;
info.mime_types.emplace_back(kPDFMimeType, "pdf", "Portable Document Format");
content::PluginService::GetInstance()->RefreshPlugins();
content::PluginService::GetInstance()->RegisterInternalPlugin(info, true);
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
}
#endif // BUILDFLAG(ENABLE_PLUGINS)

View File

@@ -7,6 +7,7 @@
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "base/base_switches.h"
#include "base/command_line.h"
@@ -112,6 +113,11 @@
#include "chrome/browser/spellchecker/spellcheck_factory.h" // nogncheck
#endif
#if BUILDFLAG(ENABLE_PLUGINS)
#include "content/public/browser/plugin_service.h"
#include "shell/common/plugin_info.h"
#endif // BUILDFLAG(ENABLE_PLUGINS)
namespace electron {
namespace {
@@ -382,6 +388,18 @@ void ElectronBrowserMainParts::PostCreateThreads() {
content::GetIOThreadTaskRunner({})->PostTask(
FROM_HERE,
base::BindOnce(&tracing::TracingSamplerProfiler::CreateOnChildThread));
#if BUILDFLAG(ENABLE_PLUGINS)
// PluginService can only be used on the UI thread
// and ContentClient::AddPlugins gets called for both browser and render
// process where the latter will not have UI thread which leads to DCHECK.
// Separate the WebPluginInfo registration for these processes.
std::vector<content::WebPluginInfo> plugins;
auto* plugin_service = content::PluginService::GetInstance();
plugin_service->RefreshPlugins();
GetInternalPlugins(&plugins);
for (const auto& plugin : plugins)
plugin_service->RegisterInternalPlugin(plugin, true);
#endif
}
void ElectronBrowserMainParts::PostDestroyThreads() {

View File

@@ -0,0 +1,39 @@
// Copyright (c) 2022 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "shell/common/plugin_info.h"
#if BUILDFLAG(ENABLE_PDF_VIEWER)
#include "base/strings/utf_string_conversions.h"
#include "chrome/common/pdf_util.h"
#include "extensions/common/constants.h"
#include "shell/common/electron_constants.h"
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
namespace electron {
void GetInternalPlugins(std::vector<content::WebPluginInfo>* plugins) {
#if BUILDFLAG(ENABLE_PDF_VIEWER)
// NB. in Chrome, this plugin isn't registered until the PDF extension is
// loaded. However, in Electron, we load the PDF extension unconditionally
// when it is enabled in the build, so we're OK to load the plugin eagerly
// here.
plugins->push_back(GetPDFPluginInfo());
#endif
}
#if BUILDFLAG(ENABLE_PDF_VIEWER)
content::WebPluginInfo GetPDFPluginInfo() {
content::WebPluginInfo info;
info.type = content::WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN;
info.name = base::ASCIIToUTF16(kPDFExtensionPluginName);
// This isn't a real file path; it's just used as a unique identifier.
info.path = base::FilePath::FromUTF8Unsafe(extension_misc::kPdfExtensionId);
info.background_color = content::WebPluginInfo::kDefaultBackgroundColor;
info.mime_types.emplace_back(kPDFMimeType, "pdf", "Portable Document Format");
return info;
}
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
} // namespace electron

View File

@@ -0,0 +1,23 @@
// Copyright (c) 2022 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ELECTRON_SHELL_COMMON_PLUGIN_INFO_H_
#define ELECTRON_SHELL_COMMON_PLUGIN_INFO_H_
#include <vector>
#include "content/public/common/content_plugin_info.h"
#include "electron/buildflags/buildflags.h"
namespace electron {
void GetInternalPlugins(std::vector<content::WebPluginInfo>* plugins);
#if BUILDFLAG(ENABLE_PDF_VIEWER)
content::WebPluginInfo GetPDFPluginInfo();
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
} // namespace electron
#endif // ELECTRON_SHELL_COMMON_PLUGIN_INFO_H_

View File

@@ -73,6 +73,7 @@
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
#if BUILDFLAG(ENABLE_PLUGINS)
#include "shell/common/plugin_info.h"
#include "shell/renderer/pepper_helper.h"
#endif // BUILDFLAG(ENABLE_PLUGINS)
@@ -420,19 +421,12 @@ bool RendererClientBase::IsPluginHandledExternally(
->CreateFrameContainer(plugin_element, original_url, mime_type, info);
}
// TODO(nornagon): this info should be shared with the data in
// electron_content_client.cc / ComputeBuiltInPlugins.
content::WebPluginInfo info;
info.type = content::WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN;
info.name = base::ASCIIToUTF16(kPDFExtensionPluginName);
info.path = base::FilePath::FromUTF8Unsafe(extension_misc::kPdfExtensionId);
info.background_color = content::WebPluginInfo::kDefaultBackgroundColor;
info.mime_types.emplace_back(kPDFMimeType, "pdf", "Portable Document Format");
return extensions::MimeHandlerViewContainerManager::Get(
content::RenderFrame::FromWebFrame(
plugin_element.GetDocument().GetFrame()),
true /* create_if_does_not_exist */)
->CreateFrameContainer(plugin_element, original_url, mime_type, info);
->CreateFrameContainer(plugin_element, original_url, mime_type,
GetPDFPluginInfo());
#else
return false;
#endif