-
Notifications
You must be signed in to change notification settings - Fork 15k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: WebUSB on ARM64 macs Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> * chore: update patches --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
- Loading branch information
1 parent
12673d8
commit c174ed7
Showing
3 changed files
with
24 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
patches/chromium/chore_defer_usb_service_getdevices_request_until_usb_service_is.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 9acfb687b85986c2f2ba787e7b67556092a714d2..244fe386e499930e9a9f031edae216bb18b6fc4e 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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters