| Index: third_party/WebKit/Source/modules/credentialmanager/PasswordCredential.cpp
|
| diff --git a/third_party/WebKit/Source/modules/credentialmanager/PasswordCredential.cpp b/third_party/WebKit/Source/modules/credentialmanager/PasswordCredential.cpp
|
| index f539ccb5946f8053136b28c2f50309f45d448938..e174b504a68831f129717eaafeede9eca1c8c1d6 100644
|
| --- a/third_party/WebKit/Source/modules/credentialmanager/PasswordCredential.cpp
|
| +++ b/third_party/WebKit/Source/modules/credentialmanager/PasswordCredential.cpp
|
| @@ -25,9 +25,19 @@ PasswordCredential* PasswordCredential::create(WebPasswordCredential* webPasswor
|
|
|
| PasswordCredential* PasswordCredential::create(const PasswordCredentialData& data, ExceptionState& exceptionState)
|
| {
|
| + if (data.id().isEmpty()) {
|
| + exceptionState.throwTypeError("'id' must not be empty.");
|
| + return nullptr;
|
| + }
|
| + if (data.password().isEmpty()) {
|
| + exceptionState.throwTypeError("'password' must not be empty.");
|
| + return nullptr;
|
| + }
|
| +
|
| KURL iconURL = parseStringAsURL(data.iconURL(), exceptionState);
|
| if (exceptionState.hadException())
|
| return nullptr;
|
| +
|
| return new PasswordCredential(data.id(), data.password(), data.name(), iconURL);
|
| }
|
|
|
|
|