Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / modules / crypto / KeyPair.cpp
index 6beaf2b..66dfecc 100644 (file)
 
 namespace WebCore {
 
-PassRefPtr<KeyPair> KeyPair::create(const blink::WebCryptoKey& publicKey, const blink::WebCryptoKey& privateKey)
+DEFINE_GC_INFO(KeyPair);
+
+PassRefPtrWillBeRawPtr<KeyPair> KeyPair::create(const blink::WebCryptoKey& publicKey, const blink::WebCryptoKey& privateKey)
 {
     ASSERT(publicKey.type() == blink::WebCryptoKeyTypePublic);
     ASSERT(privateKey.type() == blink::WebCryptoKeyTypePrivate);
-    return adoptRef(new KeyPair(Key::create(publicKey), Key::create(privateKey)));
+    return adoptRefWillBeNoop(new KeyPair(Key::create(publicKey), Key::create(privateKey)));
 }
 
-KeyPair::KeyPair(const PassRefPtr<Key>& publicKey, const PassRefPtr<Key>& privateKey)
+KeyPair::KeyPair(const PassRefPtrWillBeRawPtr<Key>& publicKey, const PassRefPtrWillBeRawPtr<Key>& privateKey)
     : m_publicKey(publicKey)
     , m_privateKey(privateKey)
 {
@@ -52,4 +54,10 @@ KeyPair::KeyPair(const PassRefPtr<Key>& publicKey, const PassRefPtr<Key>& privat
     ScriptWrappable::init(this);
 }
 
+void KeyPair::trace(Visitor* visitor)
+{
+    visitor->trace(m_publicKey);
+    visitor->trace(m_privateKey);
+}
+
 } // namespace WebCore