Bug 169262

Summary: [WebCrypto] Replace const std::unique_ptr<CryptoAlgorithmParameters>&& with const CryptoAlgorithmParameters& for CryptoAlgorithm::importKey
Product: WebKit Reporter: Jiewen Tan <jiewen_tan>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: bfulgham, jiewen_tan
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Jiewen Tan 2017-03-06 21:43:50 PST
Current method CryptoAlgorithm::importKey is defined as follow:
void importKey(SubtleCrypto::KeyFormat, KeyData&&, const std::unique_ptr<CryptoAlgorithmParameters>&&, bool extractable, CryptoKeyUsageBitmap, KeyCallback&&, ExceptionCallback&&);

A const rvalue reference makes no sense here. Therefore, I propose it should be rewritten as:
void importKey(SubtleCrypto::KeyFormat, KeyData&&, const CryptoAlgorithmParameters&, bool extractable, CryptoKeyUsageBitmap, KeyCallback&&, ExceptionCallback&&);
Comment 1 Jiewen Tan 2018-07-13 15:54:36 PDT

*** This bug has been marked as a duplicate of bug 187501 ***