From 6bbb9f062b63c5a920b1d240ba0d8575150dd01a Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sun, 5 Jan 2020 16:09:19 -0500 Subject: Bug 1334044: Replace detached callback (v0) with disconnected callback (v1). Tag UXP Issue #1344 --- dom/base/CustomElementRegistry.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'dom/base/CustomElementRegistry.h') diff --git a/dom/base/CustomElementRegistry.h b/dom/base/CustomElementRegistry.h index f73a8707e..30e2c00ab 100644 --- a/dom/base/CustomElementRegistry.h +++ b/dom/base/CustomElementRegistry.h @@ -256,11 +256,12 @@ public: { } - // nsWeakPtr is a weak pointer of Element + // Hold a strong reference of Element so that it does not get cycle collected + // before the reactions in its reaction queue are invoked. // The element reaction queues are stored in CustomElementData. // We need to lookup ElementReactionQueueMap again to get relevant reaction queue. // The choice of 1 for the auto size here is based on gut feeling. - typedef AutoTArray ElementQueue; + typedef AutoTArray, 1> ElementQueue; /** * Enqueue a custom element upgrade reaction -- cgit v1.2.3