fix: prevent navigator.fonts.query() from crashing (#30930)

* fix: prevent navigator.fonts.query() from crashing

* refactor: use base::PostTask instead
This commit is contained in:
Shelley Vohr 2021-09-15 15:56:38 +02:00 committed by GitHub
parent 9eaa9de3b4
commit c8e4cc29c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 82 additions and 0 deletions

View file

@ -1670,6 +1670,12 @@ content::BluetoothDelegate* ElectronBrowserClient::GetBluetoothDelegate() {
return bluetooth_delegate_.get();
}
content::FontAccessDelegate* ElectronBrowserClient::GetFontAccessDelegate() {
if (!font_access_delegate_)
font_access_delegate_ = std::make_unique<ElectronFontAccessDelegate>();
return font_access_delegate_.get();
}
void BindBadgeServiceForServiceWorker(
const content::ServiceWorkerVersionBaseInfo& info,
mojo::PendingReceiver<blink::mojom::BadgeService> receiver) {