Browse Source

chore: bump chromium to 112.0.5615.204 (24-x-y) (#38350)

* chore: bump chromium in DEPS to 112.0.5615.204

* chore: update patches

* refactor: add WebViewGuestDelegate::GetGuestDelegateWeakPtr()

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4515455

This approach copied from GuestViewBase::GetGuestDelegateWeakPtr() approach in that same commit.

(cherry picked from commit 3f3ab39e3a1077f71aa90319d7a81d53cfb3c55e)

---------

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: Charles Kerr <[email protected]>
electron-roller[bot] 1 year ago
parent
commit
31f5e3c356

+ 1 - 1
DEPS

@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
 
 vars = {
   'chromium_version':
-    '112.0.5615.183',
+    '112.0.5615.204',
   'node_version':
     'v18.14.0',
   'nan_version':

+ 1 - 1
patches/chromium/cherry-pick-ec53103cc72d.patch

@@ -38,7 +38,7 @@ Bot-Commit: chromium-autoroll <[email protected]
 Cr-Commit-Position: refs/heads/main@{#1129520}
 
 diff --git a/DEPS b/DEPS
-index 0358ee8aa458ddc776f2d87c4a817c708b04c8ac..25499d7bed5c7a579aa4eaaca2eae53c14214486 100644
+index 0184cbad2abf3d206631ed6385d5e247e6223aa8..60df78a003e67aa2a000ff25588bf4c5fae40f4a 100644
 --- a/DEPS
 +++ b/DEPS
 @@ -299,7 +299,7 @@ vars = {

+ 2 - 2
patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch

@@ -17,10 +17,10 @@ policy->CanCommitOriginAndUrl.
 Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266.
 
 diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
-index d979fc0def505512f6847899f4c039a96e6d83ec..aac2bf5c5bd372f8d38e0f89e0ef3ed9f057ac4d 100644
+index 74ead3b0943da72725fcf32f541665916fd10459..604b299f62ac86b7c5f85f777407fc7d7977981b 100644
 --- a/content/browser/renderer_host/navigation_request.cc
 +++ b/content/browser/renderer_host/navigation_request.cc
-@@ -7074,10 +7074,11 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
+@@ -7080,10 +7080,11 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
    if (IsForMhtmlSubframe())
      return origin_with_debug_info;
  

+ 2 - 2
patches/v8/dcheck.patch

@@ -6,10 +6,10 @@ Subject: dcheck.patch
 https://github.com/auchenberg/volkswagen
 
 diff --git a/src/api/api.cc b/src/api/api.cc
-index fac24bae124fc5659c3e875bf88ede9b66be9c8d..5449ae36c6f001114f0d5bf1bba8038b483d1e50 100644
+index a8c89cafbf8fed4633d303c266c94f5e1c25acec..3827b8795e6c16c79bd87885570026444d98335d 100644
 --- a/src/api/api.cc
 +++ b/src/api/api.cc
-@@ -9728,7 +9728,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
+@@ -9739,7 +9739,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
  }
  
  void Isolate::PerformMicrotaskCheckpoint() {

+ 5 - 0
shell/browser/web_view_guest_delegate.cc

@@ -124,4 +124,9 @@ WebViewGuestDelegate::CreateNewGuestWindow(
   return guest_contents;
 }
 
+base::WeakPtr<content::BrowserPluginGuestDelegate>
+WebViewGuestDelegate::GetGuestDelegateWeakPtr() {
+  return weak_ptr_factory_.GetWeakPtr();
+}
+
 }  // namespace electron

+ 4 - 0
shell/browser/web_view_guest_delegate.h

@@ -37,6 +37,8 @@ class WebViewGuestDelegate : public content::BrowserPluginGuestDelegate,
   content::WebContents* GetOwnerWebContents() final;
   std::unique_ptr<content::WebContents> CreateNewGuestWindow(
       const content::WebContents::CreateParams& create_params) final;
+  base::WeakPtr<content::BrowserPluginGuestDelegate> GetGuestDelegateWeakPtr()
+      final;
 
   // WebContentsZoomController::Observer:
   void OnZoomLevelChanged(content::WebContents* web_contents,
@@ -55,6 +57,8 @@ class WebViewGuestDelegate : public content::BrowserPluginGuestDelegate,
   WebContentsZoomController* embedder_zoom_controller_ = nullptr;
 
   api::WebContents* api_web_contents_ = nullptr;
+
+  base::WeakPtrFactory<WebViewGuestDelegate> weak_ptr_factory_{this};
 };
 
 }  // namespace electron