| 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 acb4cfcd292594344964e315ca59425eaed2fd62..391a19076b249945cbbde28e83e6f0102eb600ba 100644
|
| --- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
|
| @@ -1322,10 +1322,12 @@ void LocalDOMWindow::cancelIdleCallback(int id)
|
| document->cancelIdleCallback(id);
|
| }
|
|
|
| -CustomElementsRegistry* LocalDOMWindow::customElements() const
|
| +CustomElementsRegistry* LocalDOMWindow::customElements(ScriptState* scriptState) const
|
| {
|
| + if (!scriptState->world().isMainWorld())
|
| + return nullptr;
|
| if (!m_customElements)
|
| - m_customElements = CustomElementsRegistry::create();
|
| + m_customElements = CustomElementsRegistry::create(scriptState, document()->registrationContext());
|
| return m_customElements.get();
|
| }
|
|
|
|
|