From 5cf46e2f87f4f6294d02d96c7905b069c9975eee Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Fri, 3 Jan 2020 18:50:56 -0500 Subject: Bug 1341693 - Don't need to check GetDocShell() when creating CustomElementRegistry; Tag UXP Issue #1344 --- dom/base/nsGlobalWindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dom/base/nsGlobalWindow.cpp') diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index dd1fe4586..c965d5b97 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -4241,8 +4241,9 @@ CustomElementRegistry* nsGlobalWindow::CustomElements() { MOZ_RELEASE_ASSERT(IsInnerWindow()); + if (!mCustomElements) { - mCustomElements = CustomElementRegistry::Create(AsInner()); + mCustomElements = new CustomElementRegistry(AsInner()); } return mCustomElements; -- cgit v1.2.3