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 a2fdaff4ffed97c6b77f235992168b976c151297..15d7f1f9bfd371fa689d3fe603ba18d7e11578df 100644 |
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp |
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp |
@@ -1331,9 +1331,14 @@ CustomElementsRegistry* LocalDOMWindow::customElements(ScriptState* scriptState) |
{ |
if (!scriptState->world().isMainWorld()) |
return nullptr; |
+ return customElements(); |
+} |
+ |
+CustomElementsRegistry* LocalDOMWindow::customElements() const |
+{ |
if (!m_customElements) |
- m_customElements = CustomElementsRegistry::create(scriptState, document()->registrationContext()); |
- return m_customElements.get(); |
+ m_customElements = CustomElementsRegistry::create(document()->registrationContext()); |
+ return m_customElements; |
} |
void LocalDOMWindow::addedEventListener(const AtomicString& eventType, RegisteredEventListener& registeredListener) |