diff --git a/shell/browser/api/electron_api_cookies.cc b/shell/browser/api/electron_api_cookies.cc index 9eab50f69c..8dfe136b10 100644 --- a/shell/browser/api/electron_api_cookies.cc +++ b/shell/browser/api/electron_api_cookies.cc @@ -290,6 +290,7 @@ v8::Local Cookies::Set(v8::Isolate* isolate, const std::string* url_string = details.FindStringKey("url"); if (!url_string) { promise.RejectWithErrorMessage("Missing required option 'url'"); + return handle; } const std::string* name = details.FindStringKey("name"); const std::string* value = details.FindStringKey("value");