summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Source/modules/crypto/DOMWindowCrypto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Source/modules/crypto/DOMWindowCrypto.cpp')
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/DOMWindowCrypto.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/chromium/third_party/WebKit/Source/modules/crypto/DOMWindowCrypto.cpp b/chromium/third_party/WebKit/Source/modules/crypto/DOMWindowCrypto.cpp
index 5c4bbae2613..b3e4c3fe6c7 100644
--- a/chromium/third_party/WebKit/Source/modules/crypto/DOMWindowCrypto.cpp
+++ b/chromium/third_party/WebKit/Source/modules/crypto/DOMWindowCrypto.cpp
@@ -31,13 +31,13 @@
#include "config.h"
#include "modules/crypto/DOMWindowCrypto.h"
-#include "core/frame/DOMWindow.h"
+#include "core/frame/LocalDOMWindow.h"
#include "modules/crypto/Crypto.h"
namespace WebCore {
-DOMWindowCrypto::DOMWindowCrypto(DOMWindow* window)
- : DOMWindowProperty(window->frame())
+DOMWindowCrypto::DOMWindowCrypto(LocalDOMWindow& window)
+ : DOMWindowProperty(window.frame())
{
}
@@ -50,19 +50,19 @@ const char* DOMWindowCrypto::supplementName()
return "DOMWindowCrypto";
}
-DOMWindowCrypto* DOMWindowCrypto::from(DOMWindow* window)
+DOMWindowCrypto& DOMWindowCrypto::from(LocalDOMWindow& window)
{
- DOMWindowCrypto* supplement = static_cast<DOMWindowCrypto*>(Supplement<DOMWindow>::from(window, supplementName()));
+ DOMWindowCrypto* supplement = static_cast<DOMWindowCrypto*>(WillBeHeapSupplement<LocalDOMWindow>::from(window, supplementName()));
if (!supplement) {
supplement = new DOMWindowCrypto(window);
- provideTo(window, supplementName(), adoptPtr(supplement));
+ provideTo(window, supplementName(), adoptPtrWillBeNoop(supplement));
}
- return supplement;
+ return *supplement;
}
-Crypto* DOMWindowCrypto::crypto(DOMWindow* window)
+Crypto* DOMWindowCrypto::crypto(LocalDOMWindow& window)
{
- return DOMWindowCrypto::from(window)->crypto();
+ return DOMWindowCrypto::from(window).crypto();
}
Crypto* DOMWindowCrypto::crypto() const
@@ -72,4 +72,10 @@ Crypto* DOMWindowCrypto::crypto() const
return m_crypto.get();
}
+void DOMWindowCrypto::trace(Visitor* visitor)
+{
+ visitor->trace(m_crypto);
+ WillBeHeapSupplement<LocalDOMWindow>::trace(visitor);
+}
+
} // namespace WebCore