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

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

Issue 1967693003: Avoid object slicing in WebCredential::create (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding the hilarious namespace :) 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
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 d77728bca0aac2a3cd353362a2585339d90557c6..ac3e1ab0d74fa07e5dbc2376c8aca0e93f7c75ec 100644
--- a/third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp
+++ b/third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp
@@ -171,7 +171,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());
Yuta Kitamura 2016/05/12 03:58:55 This variable violates our naming convention
+ CredentialManagerClient::from(scriptState->getExecutionContext())->dispatchStore(*web_credential, new NotificationCallbacks(resolver));
return promise;
}

Powered by Google App Engine
This is Rietveld 408576698