diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 07:25:14 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 07:25:14 -0400 |
commit | fd7a325bc08f1f027b692181b6c7ab5efaf619aa (patch) | |
tree | 2d5fffa0474fea1a9d2f4fb855e6aabdf4b05d4c /dom/base/ChildIterator.cpp | |
parent | f0b7ba1e2b49858ce2755c61beebe3694cae882f (diff) | |
download | UXP-fd7a325bc08f1f027b692181b6c7ab5efaf619aa.tar UXP-fd7a325bc08f1f027b692181b6c7ab5efaf619aa.tar.gz UXP-fd7a325bc08f1f027b692181b6c7ab5efaf619aa.tar.lz UXP-fd7a325bc08f1f027b692181b6c7ab5efaf619aa.tar.xz UXP-fd7a325bc08f1f027b692181b6c7ab5efaf619aa.zip |
Bug 1422931 - Fix crash with slot element and make webcomponents preference per-doc
Tag #1375
Diffstat (limited to 'dom/base/ChildIterator.cpp')
-rw-r--r-- | dom/base/ChildIterator.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dom/base/ChildIterator.cpp b/dom/base/ChildIterator.cpp index 7a0a705da..7d3375fef 100644 --- a/dom/base/ChildIterator.cpp +++ b/dom/base/ChildIterator.cpp @@ -12,6 +12,7 @@ #include "nsIAnonymousContentCreator.h" #include "nsIFrame.h" #include "nsCSSAnonBoxes.h" +#include "nsDocument.h" namespace mozilla { namespace dom { @@ -66,7 +67,8 @@ ExplicitChildIterator::ExplicitChildIterator(const nsIContent* aParent, mIsFirst(aStartAtBeginning), mIndexInInserted(0) { - mParentAsSlot = HTMLSlotElement::FromContent(mParent); + mParentAsSlot = nsDocument::IsWebComponentsEnabled(mParent) ? + HTMLSlotElement::FromContent(mParent) : nullptr; } nsIContent* |