Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: WebUSB on ARM64 macs #37522

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions patches/chromium/.patches
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,4 @@ chore_patch_out_partition_attribute_dcheck_for_webviews.patch
expose_v8initializer_codegenerationcheckcallbackinmainthread.patch
chore_patch_out_profile_methods_in_profile_selections_cc.patch
fix_x11_window_restore_minimized_maximized_window.patch
chore_defer_usb_service_getdevices_request_until_usb_service_is.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Kleinschmidt <jkleinsc@electronjs.org>
Date: Thu, 2 Mar 2023 15:26:46 -0500
Subject: chore: defer USB service GetDevices request until USB service is
ready.

On macOS we need to wait until the USB service is ready before the list of
devices is available. This should no longer be necessary if/when
https://crbug.com/1096743 is completed.

diff --git a/services/device/usb/usb_service_impl.cc b/services/device/usb/usb_service_impl.cc
index 99456d1baa098e8a48b4a31cc8f5661586f7fc82..11d98208c85093598813897a144812c76bc67bea 100644
--- a/services/device/usb/usb_service_impl.cc
+++ b/services/device/usb/usb_service_impl.cc
@@ -198,7 +198,7 @@ void UsbServiceImpl::GetDevices(GetDevicesCallback callback) {
return;
}

- if (enumeration_in_progress_) {
+ if (enumeration_in_progress_ || !enumeration_ready_) {
pending_enumeration_callbacks_.push_back(std::move(callback));
return;
}
5 changes: 0 additions & 5 deletions shell/browser/feature_list.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ void InitializeFeatureList() {
disable_features +=
std::string(",") + features::kSpareRendererForSitePerProcess.name;

#if BUILDFLAG(IS_MAC)
// Needed for WebUSB implementation
enable_features += std::string(",") + device::kNewUsbBackend.name;
#endif

#if !BUILDFLAG(ENABLE_PICTURE_IN_PICTURE)
disable_features += std::string(",") + media::kPictureInPicture.name;
#endif
Expand Down