mirror of
https://github.com/electron/electron.git
synced 2026-01-06 22:24:03 -05:00
fix: gracefully fail if app.configureHostResolver is called before ready (#33062)
This commit is contained in:
@@ -1630,6 +1630,11 @@ v8::Local<v8::Value> App::GetDockAPI(v8::Isolate* isolate) {
|
||||
void ConfigureHostResolver(v8::Isolate* isolate,
|
||||
const gin_helper::Dictionary& opts) {
|
||||
gin_helper::ErrorThrower thrower(isolate);
|
||||
if (!Browser::Get()->is_ready()) {
|
||||
thrower.ThrowError(
|
||||
"configureHostResolver cannot be called before the app is ready");
|
||||
return;
|
||||
}
|
||||
net::SecureDnsMode secure_dns_mode = net::SecureDnsMode::kOff;
|
||||
std::string default_doh_templates;
|
||||
if (base::FeatureList::IsEnabled(features::kDnsOverHttps)) {
|
||||
|
||||
Reference in New Issue
Block a user