From 010f37f47b9c15935a6113cd82e43f0673122016 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 17 Apr 2020 07:29:57 -0400 Subject: Bug 1422197 - Add fast path to get DocGroup in binding code for [CEReactions] Tag #1375 --- dom/bindings/BindingUtils.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'dom/bindings/BindingUtils.cpp') diff --git a/dom/bindings/BindingUtils.cpp b/dom/bindings/BindingUtils.cpp index 51274f1af..ee321772e 100644 --- a/dom/bindings/BindingUtils.cpp +++ b/dom/bindings/BindingUtils.cpp @@ -3406,28 +3406,6 @@ GetDesiredProto(JSContext* aCx, const JS::CallArgs& aCallArgs, return true; } -CustomElementReactionsStack* -GetCustomElementReactionsStack(JS::Handle aObj) -{ - // This might not be the right object, if there are wrappers. Unwrap if we can. - JSObject* obj = js::CheckedUnwrap(aObj); - if (!obj) { - return nullptr; - } - - nsGlobalWindow* window = xpc::WindowGlobalOrNull(obj); - if (!window) { - return nullptr; - } - - DocGroup* docGroup = window->AsInner()->GetDocGroup(); - if (!docGroup) { - return nullptr; - } - - return docGroup->CustomElementReactionsStack(); -} - // https://html.spec.whatwg.org/multipage/dom.html#htmlconstructor already_AddRefed CreateHTMLElement(const GlobalObject& aGlobal, const JS::CallArgs& aCallArgs, -- cgit v1.2.3