chore: bump chromium to 148.0.7768.0 (main) (#50599)

* chore: bump chromium in DEPS to 148.0.7765.0

* chore: bump chromium in DEPS to 148.0.7766.0

* fix(patch-conflict): update packed_resources dep name after upstream rename

Upstream renamed //chrome:packed_resources_integrity_header to
//chrome:packed_resources. Updated the patch to guard the new dependency
name with !is_electron_build while preserving the same intent.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7714543

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(patch-conflict): update code_cache_host_impl.cc for upstream includes and TODO

Upstream added #include <stdint.h> and a TODO comment in
code_cache_host_impl.cc which conflicted with the Electron code cache
custom schemes patch. Resolved by keeping both upstream additions and
the Electron ProcessLockURLIsCodeCacheScheme function.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7615151

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: update patch hunk headers

Co-Authored-By: Claude <noreply@anthropic.com>

* 7700837: update RecordContentToVisibleTimeRequest from mojom to native struct

Upstream typemapped RecordContentToVisibleTimeRequest from a Mojo
struct to a native C++ struct. Updated OSR virtual method signatures
from blink::mojom::RecordContentToVisibleTimeRequestPtr to
std::optional<blink::RecordContentToVisibleTimeRequest> and
blink::RecordContentToVisibleTimeRequest to match.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7700837

Co-Authored-By: Claude <noreply@anthropic.com>

* 7714579: update WebString::FromASCII to FromUTF8

Upstream renamed blink::WebString::FromASCII to FromAscii. Updated
Electron's usage to FromUTF8 which is equivalent for ASCII scheme
strings and avoids a dependency on the renamed method. Also fixed
blink::String::FromUTF8 to use the String constructor directly.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7714579

Co-Authored-By: Claude <noreply@anthropic.com>

* 7696480: add stream_info dep after StreamInfo extraction

Upstream extracted extensions::StreamInfo from PdfViewerStreamManager
to a standalone class in extensions/browser/mime_handler/stream_info.h.
Added the new target as a dependency since Electron's streams_private
and pdf_viewer_private APIs use PdfViewerStreamManager which now
depends on the separate StreamInfo target.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7696480

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: bump chromium in DEPS to 148.0.7768.0

* fix(patch-conflict): update PiP patch for new toggle_mute_button in overlay window

Upstream added a toggle_mute_button to the live caption dialog controls
in VideoOverlayWindowViews::SetLiveCaptionDialogVisibility. Extended the
existing #if 0 guard to include the new button handling since Electron
disables live caption dialog functionality.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7682308

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(patch-conflict): update packed_resource_integrity patch after upstream dep removal

Upstream removed the deps += [ "//chrome:packed_resources" ] line from
the if (!is_win) block in chrome/browser/BUILD.gn. The Electron patch
no longer needs to guard this dep with !is_electron_build in this
location since the dep was already relocated by an earlier upstream CL.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7714543

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(patch-conflict): update WebSocket throttling revert for DisconnectWebSocketOnBFCache guard

Upstream added a DisconnectWebSocketOnBFCacheEnabled() runtime feature
check that wraps the WebSocket BFCache feature registration. Updated the
Electron revert patch to place the kAllowAggressiveThrottlingWithWebSocket
ternary inside the new conditional guard.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7698838

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(patch-conflict): update SCContentSharingPicker patch for upstream native picker refactor

Upstream added is_native_picker and filter_ based native picker session
validation to ScreenCaptureKitDeviceMac. Electron's patch uses its own
native picker approach (active_streams_ counter + direct SCContentSharingPicker
API), so marked the new upstream parameters as [[maybe_unused]] and kept
Electron's implementation.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7713560

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: update patch hunk headers

Co-Authored-By: Claude <noreply@anthropic.com>

* 7708800: update StartDragging signature to use RenderFrameHost

Upstream refactored StartDragging to take a RenderFrameHost& instead of
separate source_origin and source_rwh parameters. Updated
OffScreenWebContentsView to match the new signature and derive the
RenderWidgetHostImpl from the RenderFrameHost internally.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7708800

Co-Authored-By: Claude <noreply@anthropic.com>

* 7682308: add toggle_mute_button to chromium_src build sources

Upstream added a ToggleMuteButton to the PiP overlay window controls.
Added the new toggle_mute_button.cc/h source files to Electron's
chromium_src/BUILD.gn to resolve linker errors.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7682308

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: update patches after main rebase

* fixup! 7708800: update StartDragging signature to use RenderFrameHost

fix linting

* 7705541: [trap-handler] Track individual Wasm memories | https://chromium-review.googlesource.com/c/v8/v8/+/7705541

Moved the SetUpWebAssemblyTrapHandler() call to before the V8 isolate is created

* fixup! fix utility process tests

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
This commit is contained in:
electron-roller[bot]
2026-04-06 20:38:46 -07:00
committed by GitHub
parent b8f25c4ced
commit 6aaf490aa5
67 changed files with 311 additions and 306 deletions

View File

@@ -237,14 +237,8 @@ void ElectronBrowserMainParts::PostEarlyInitialization() {
// set. If this check is failing we may need to re-add that workaround
DCHECK(base::SingleThreadTaskRunner::HasCurrentDefault());
// The ProxyResolverV8 has setup a complete V8 environment, in order to
// avoid conflicts we only initialize our V8 environment after that.
js_env_ = std::make_unique<JavascriptEnvironment>(node_bindings_->uv_loop());
v8::Isolate* const isolate = js_env_->isolate();
v8::HandleScope scope(isolate);
// Enable trap handlers before user script execution.
// Enable trap handlers before creating the V8 isolate. V8 initialization
// calls IsTrapHandlerEnabled() which prevents later EnableTrapHandler calls.
#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)) && \
defined(ARCH_CPU_X86_64)) || \
((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)) && defined(ARCH_CPU_ARM64))
@@ -253,6 +247,13 @@ void ElectronBrowserMainParts::PostEarlyInitialization() {
}
#endif
// The ProxyResolverV8 has setup a complete V8 environment, in order to
// avoid conflicts we only initialize our V8 environment after that.
js_env_ = std::make_unique<JavascriptEnvironment>(node_bindings_->uv_loop());
v8::Isolate* const isolate = js_env_->isolate();
v8::HandleScope scope(isolate);
node_bindings_->Initialize(isolate, isolate->GetCurrentContext());
// Create the global environment.
node_env_ = node_bindings_->CreateEnvironment(

View File

@@ -1030,13 +1030,14 @@ void OffScreenRenderWidgetHostView::UpdateBackgroundColorFromRenderer(
}
void OffScreenRenderWidgetHostView::NotifyHostAndDelegateOnWasShown(
blink::mojom::RecordContentToVisibleTimeRequestPtr) {
std::optional<blink::RecordContentToVisibleTimeRequest>
visible_time_request) {
NOTREACHED();
}
void OffScreenRenderWidgetHostView::
RequestSuccessfulPresentationTimeFromHostOrDelegate(
blink::mojom::RecordContentToVisibleTimeRequestPtr) {
blink::RecordContentToVisibleTimeRequest visible_time_request) {
NOTREACHED();
}

View File

@@ -28,7 +28,7 @@
#include "shell/browser/osr/osr_video_consumer.h"
#include "shell/browser/osr/osr_view_proxy.h"
#include "third_party/abseil-cpp/absl/container/flat_hash_set.h"
#include "third_party/blink/public/mojom/widget/record_content_to_visible_time_request.mojom-forward.h"
#include "third_party/blink/public/common/page/content_to_visible_time_request.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/ime/text_input_client.h"
#include "ui/compositor/compositor.h"
@@ -159,9 +159,10 @@ class OffScreenRenderWidgetHostView
void OverrideDisplayFeatureForEmulation(
const content::DisplayFeature* display_feature) override {}
void NotifyHostAndDelegateOnWasShown(
blink::mojom::RecordContentToVisibleTimeRequestPtr) final;
std::optional<blink::RecordContentToVisibleTimeRequest>
visible_time_request) final;
void RequestSuccessfulPresentationTimeFromHostOrDelegate(
blink::mojom::RecordContentToVisibleTimeRequestPtr) final;
blink::RecordContentToVisibleTimeRequest visible_time_request) final;
void CancelSuccessfulPresentationTimeRequestForHostAndDelegate() final;
viz::SurfaceId GetCurrentSurfaceId() const override;
std::unique_ptr<content::SyntheticGestureTarget>

View File

@@ -5,6 +5,7 @@
#include "shell/browser/osr/osr_web_contents_view.h"
#include "content/browser/web_contents/web_contents_impl.h" // nogncheck
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "shell/browser/native_window.h"
@@ -161,17 +162,19 @@ bool OffScreenWebContentsView::CloseTabAfterEventTrackingIfNeeded() {
#endif // BUILDFLAG(IS_MAC)
void OffScreenWebContentsView::StartDragging(
content::RenderFrameHost& source_rfh,
const content::DropData& drop_data,
const url::Origin& source_origin,
blink::DragOperationsMask allowed_ops,
const gfx::ImageSkia& image,
const gfx::Vector2d& cursor_offset,
const gfx::Rect& drag_obj_rect,
const blink::mojom::DragEventSourceInfo& event_info,
content::RenderWidgetHostImpl* source_rwh) {
if (web_contents_)
const blink::mojom::DragEventSourceInfo& event_info) {
if (web_contents_) {
auto* source_rwh = static_cast<content::RenderWidgetHostImpl*>(
source_rfh.GetRenderWidgetHost());
static_cast<content::WebContentsImpl*>(web_contents_)
->SystemDragEnded(source_rwh);
}
}
void OffScreenWebContentsView::SetPainting(bool painting) {

View File

@@ -87,14 +87,14 @@ class OffScreenWebContentsView : public content::WebContentsView,
#endif
// content::RenderViewHostDelegateView
void StartDragging(const content::DropData& drop_data,
const url::Origin& source_origin,
blink::DragOperationsMask allowed_ops,
const gfx::ImageSkia& image,
const gfx::Vector2d& cursor_offset,
const gfx::Rect& drag_obj_rect,
const blink::mojom::DragEventSourceInfo& event_info,
content::RenderWidgetHostImpl* source_rwh) override;
void StartDragging(
content::RenderFrameHost& source_rfh,
const content::DropData& drop_data,
blink::DragOperationsMask allowed_ops,
const gfx::ImageSkia& image,
const gfx::Vector2d& cursor_offset,
const gfx::Rect& drag_obj_rect,
const blink::mojom::DragEventSourceInfo& event_info) override;
void UpdateDragOperation(ui::mojom::DragOperation operation,
bool document_is_handling_drag) override {}
void SetPainting(bool painting);

View File

@@ -262,26 +262,26 @@ void RendererClientBase::RenderThreadStarted() {
ParseSchemesCLISwitch(command_line, switches::kFetchSchemes);
for (const std::string& scheme : fetch_enabled_schemes) {
blink::WebSecurityPolicy::RegisterURLSchemeAsSupportingFetchAPI(
blink::WebString::FromASCII(scheme));
blink::WebString::FromUTF8(scheme));
}
std::vector<std::string> service_worker_schemes =
ParseSchemesCLISwitch(command_line, switches::kServiceWorkerSchemes);
for (const std::string& scheme : service_worker_schemes)
blink::WebSecurityPolicy::RegisterURLSchemeAsAllowingServiceWorkers(
blink::WebString::FromASCII(scheme));
blink::WebString::FromUTF8(scheme));
std::vector<std::string> csp_bypassing_schemes =
ParseSchemesCLISwitch(command_line, switches::kBypassCSPSchemes);
for (const std::string& scheme : csp_bypassing_schemes)
blink::SchemeRegistry::RegisterURLSchemeAsBypassingContentSecurityPolicy(
blink::String::FromUTF8(scheme));
blink::String(scheme));
std::vector<std::string> code_cache_schemes_list =
ParseSchemesCLISwitch(command_line, switches::kCodeCacheSchemes);
for (const auto& scheme : code_cache_schemes_list) {
blink::WebSecurityPolicy::RegisterURLSchemeAsCodeCacheWithHashing(
blink::WebString::FromASCII(scheme));
blink::WebString::FromUTF8(scheme));
}
// Allow file scheme to handle service worker by default.

View File

@@ -126,12 +126,8 @@ void NodeService::Initialize(
UpdateURLLoaderFactory(std::move(params->url_loader_factory_params));
}
js_env_ = std::make_unique<JavascriptEnvironment>(node_bindings_->uv_loop());
v8::Isolate* const isolate = js_env_->isolate();
v8::HandleScope scope{isolate};
// Enable trap handlers before user script execution.
// Enable trap handlers before creating the V8 isolate. V8 initialization
// calls IsTrapHandlerEnabled() which prevents later EnableTrapHandler calls.
#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)) && \
defined(ARCH_CPU_X86_64)) || \
((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)) && defined(ARCH_CPU_ARM64))
@@ -140,6 +136,11 @@ void NodeService::Initialize(
}
#endif
js_env_ = std::make_unique<JavascriptEnvironment>(node_bindings_->uv_loop());
v8::Isolate* const isolate = js_env_->isolate();
v8::HandleScope scope{isolate};
node_bindings_->Initialize(isolate, isolate->GetCurrentContext());
network_change_notifier_ = net::NetworkChangeNotifier::CreateIfNeeded(