Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Unified Diff: third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp

Issue 1976943002: Avoid object slicing in WebCredential::create (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/exported/WebCredential.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp
diff --git a/third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp b/third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp
index 98dc149bacb0fa1a387e88926365ced9303c5511..2ca7a1772b971e8d60e34b3dc9f9cd8f61bdf6ea 100644
--- a/third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp
+++ b/third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp
@@ -170,7 +170,8 @@ ScriptPromise CredentialsContainer::store(ScriptState* scriptState, Credential*
if (!checkBoilerplate(resolver))
return promise;
- CredentialManagerClient::from(scriptState->getExecutionContext())->dispatchStore(WebCredential::create(credential->getPlatformCredential()), new NotificationCallbacks(resolver));
+ auto web_credential = WebCredential::create(credential->getPlatformCredential());
+ CredentialManagerClient::from(scriptState->getExecutionContext())->dispatchStore(*web_credential, new NotificationCallbacks(resolver));
return promise;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/exported/WebCredential.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698