diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2020-01-05 15:31:44 -0500 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2020-01-26 15:50:27 -0500 |
commit | 8573c572fbf5fa68defb3228e7f1450ec234d59b (patch) | |
tree | 97c6eefe6718d62d901155eca3badbfec67eebb0 /dom/base/Element.cpp | |
parent | f50503df9c2eced785957626273ee07e5312d546 (diff) | |
download | uxp-8573c572fbf5fa68defb3228e7f1450ec234d59b.tar.gz |
Bug 1392970 - Part 1: Make CustomElementDefinition ref-counted and put it in CustomElementData.
Tag UXP Issue #1344
Diffstat (limited to 'dom/base/Element.cpp')
-rw-r--r-- | dom/base/Element.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp index 5719b423d6..e90d444767 100644 --- a/dom/base/Element.cpp +++ b/dom/base/Element.cpp @@ -4065,3 +4065,23 @@ Element::SetCustomElementData(CustomElementData* aData) MOZ_ASSERT(!slots->mCustomElementData, "Custom element data may not be changed once set."); slots->mCustomElementData = aData; } + +CustomElementDefinition* +Element::GetCustomElementDefinition() const +{ + CustomElementData* data = GetCustomElementData(); + if (!data) { + return nullptr; + } + + return data->GetCustomElementDefinition(); +} + +void +Element::SetCustomElementDefinition(CustomElementDefinition* aDefinition) +{ + CustomElementData* data = GetCustomElementData(); + MOZ_ASSERT(data); + + data->SetCustomElementDefinition(aDefinition); +} |