mirror of
https://github.com/electron/electron.git
synced 2026-02-18 02:51:53 -05:00
Default network values to 0.0
This commit is contained in:
@@ -416,7 +416,9 @@ void Session::SetDownloadPath(const base::FilePath& path) {
|
||||
void Session::EnableNetworkEmulation(const mate::Dictionary& options) {
|
||||
std::unique_ptr<brightray::DevToolsNetworkConditions> conditions;
|
||||
bool offline = false;
|
||||
double latency, download_throughput, upload_throughput;
|
||||
double latency = 0.0;
|
||||
double download_throughput = 0.0;
|
||||
double upload_throughput = 0.0;
|
||||
if (options.Get("offline", &offline) && offline) {
|
||||
conditions.reset(new brightray::DevToolsNetworkConditions(offline));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user