diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2020-01-05 16:09:19 -0500 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2020-01-26 15:50:29 -0500 |
commit | 6bbb9f062b63c5a920b1d240ba0d8575150dd01a (patch) | |
tree | fbb5b2857a0fcddce7873a4ecb94fe17af8840fb /dom/base/CustomElementRegistry.h | |
parent | 01dfbc928f45caccc5d27704a0e98d61e92a64f1 (diff) | |
download | UXP-6bbb9f062b63c5a920b1d240ba0d8575150dd01a.tar UXP-6bbb9f062b63c5a920b1d240ba0d8575150dd01a.tar.gz UXP-6bbb9f062b63c5a920b1d240ba0d8575150dd01a.tar.lz UXP-6bbb9f062b63c5a920b1d240ba0d8575150dd01a.tar.xz UXP-6bbb9f062b63c5a920b1d240ba0d8575150dd01a.zip |
Bug 1334044: Replace detached callback (v0) with disconnected callback (v1).
Tag UXP Issue #1344
Diffstat (limited to 'dom/base/CustomElementRegistry.h')
-rw-r--r-- | dom/base/CustomElementRegistry.h | 5 |
1 files changed, 3 insertions, 2 deletions
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<nsWeakPtr, 1> ElementQueue; + typedef AutoTArray<RefPtr<Element>, 1> ElementQueue; /** * Enqueue a custom element upgrade reaction |