mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 08:18:41 +09:00
Bug 1422197 - Add fast path to get DocGroup in binding code for [CEReactions]
Tag #1375
This commit is contained in:
parent
fc8fcfc039
commit
ca09afd0b0
30 changed files with 206 additions and 44 deletions
|
|
@ -3406,28 +3406,6 @@ GetDesiredProto(JSContext* aCx, const JS::CallArgs& aCallArgs,
|
|||
return true;
|
||||
}
|
||||
|
||||
CustomElementReactionsStack*
|
||||
GetCustomElementReactionsStack(JS::Handle<JSObject*> 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<nsGenericHTMLElement>
|
||||
CreateHTMLElement(const GlobalObject& aGlobal, const JS::CallArgs& aCallArgs,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue