Throw error when options object is invalid
This commit is contained in:
parent
4085ba309a
commit
6a829e0179
1 changed files with 4 additions and 1 deletions
|
@ -571,7 +571,10 @@ void Session::ClearHostResolverCache(mate::Arguments* args) {
|
|||
|
||||
void Session::ClearAuthCache(mate::Arguments* args) {
|
||||
ClearAuthCacheOptions options;
|
||||
args->GetNext(&options);
|
||||
if (!args->GetNext(&options)) {
|
||||
args->ThrowError("Must specify options object");
|
||||
return;
|
||||
}
|
||||
base::Closure callback;
|
||||
args->GetNext(&callback);
|
||||
|
||||
|
|
Loading…
Reference in a new issue