Index: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp |
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp |
index 1fb4ffe6862ef48b7be5ff7d5d7f38991883300c..1a2988f20b7dcdfe1ef00708c67a569799406334 100644 |
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp |
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp |
@@ -1334,7 +1334,12 @@ CustomElementsRegistry* LocalDOMWindow::customElements(ScriptState* scriptState) |
CustomElementsRegistry* LocalDOMWindow::customElements() const |
{ |
if (!m_customElements && m_document) |
- m_customElements = CustomElementsRegistry::create(document()); |
+ m_customElements = CustomElementsRegistry::create(this); |
+ return m_customElements; |
+} |
+ |
+CustomElementsRegistry* LocalDOMWindow::maybeCustomElements() const |
+{ |
return m_customElements; |
} |