aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/element.rs
diff options
context:
space:
mode:
authorPatrick Shaughnessy <pshaughn@comcast.net>2020-01-22 18:44:33 -0500
committerPatrick Shaughnessy <pshaughn@comcast.net>2020-01-22 18:44:33 -0500
commit10869f66b57d70ad95117393ee13b45c375a7634 (patch)
tree30dde2db5d4a4bffa16118f09c5fff50991b6329 /components/script/dom/element.rs
parent24674687acaaca3a796f8cc61bc98c6e7d0097fb (diff)
downloadservo-10869f66b57d70ad95117393ee13b45c375a7634.tar.gz
servo-10869f66b57d70ad95117393ee13b45c375a7634.zip
Prevent infinite recursion when upgrading custom elements
Diffstat (limited to 'components/script/dom/element.rs')
-rw-r--r--components/script/dom/element.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index cb7d339a78e..29bdaf2f3bf 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -342,6 +342,10 @@ impl Element {
self.rare_data().as_ref()?.custom_element_definition.clone()
}
+ pub fn clear_custom_element_definition(&self) {
+ self.ensure_rare_data().custom_element_definition = None;
+ }
+
pub fn push_callback_reaction(&self, function: Rc<Function>, args: Box<[Heap<JSVal>]>) {
self.ensure_rare_data()
.custom_element_reaction_queue