mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
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:
@@ -20,6 +20,7 @@
|
||||
#include "net/ssl/client_cert_identity.h"
|
||||
#include "services/metrics/public/cpp/ukm_source_id.h"
|
||||
#include "shell/browser/bluetooth/electron_bluetooth_delegate.h"
|
||||
#include "shell/browser/font/electron_font_access_delegate.h"
|
||||
#include "shell/browser/serial/electron_serial_delegate.h"
|
||||
#include "third_party/blink/public/mojom/badging/badging.mojom-forward.h"
|
||||
|
||||
@@ -91,6 +92,8 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
|
||||
|
||||
content::SerialDelegate* GetSerialDelegate() override;
|
||||
|
||||
content::FontAccessDelegate* GetFontAccessDelegate() override;
|
||||
|
||||
content::BluetoothDelegate* GetBluetoothDelegate() override;
|
||||
|
||||
device::GeolocationManager* GetGeolocationManager() override;
|
||||
@@ -305,6 +308,7 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
|
||||
|
||||
std::unique_ptr<ElectronSerialDelegate> serial_delegate_;
|
||||
std::unique_ptr<ElectronBluetoothDelegate> bluetooth_delegate_;
|
||||
std::unique_ptr<ElectronFontAccessDelegate> font_access_delegate_;
|
||||
|
||||
#if defined(OS_MAC)
|
||||
ElectronBrowserMainParts* browser_main_parts_ = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user