diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-04-25 01:01:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-25 01:01:08 +0200 |
commit | a203f449bbc01f97564b7c5e2272b06a9569d7b4 (patch) | |
tree | 7193ae9ea7a77fcbd2c73ce0a9622b9fa836a013 /dom/base/nsINode.cpp | |
parent | acd4eee44eb04fe01b0063818b492390f463ccec (diff) | |
parent | eae8d21428acdb3fb842df091ded0eb276bcaaaa (diff) | |
download | UXP-a203f449bbc01f97564b7c5e2272b06a9569d7b4.tar UXP-a203f449bbc01f97564b7c5e2272b06a9569d7b4.tar.gz UXP-a203f449bbc01f97564b7c5e2272b06a9569d7b4.tar.lz UXP-a203f449bbc01f97564b7c5e2272b06a9569d7b4.tar.xz UXP-a203f449bbc01f97564b7c5e2272b06a9569d7b4.zip |
Merge pull request #262 from janekptacijarabaci/js_dom_overflow_1
moebius#138: Optimize operations on root of deeply-nested frame tree
Diffstat (limited to 'dom/base/nsINode.cpp')
-rw-r--r-- | dom/base/nsINode.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp index 3a649a61d..715ca93ea 100644 --- a/dom/base/nsINode.cpp +++ b/dom/base/nsINode.cpp @@ -1907,6 +1907,10 @@ void nsINode::doRemoveChildAt(uint32_t aIndex, bool aNotify, nsIContent* aKid, nsAttrAndChildArray& aChildArray) { + // NOTE: This function must not trigger any calls to + // nsIDocument::GetRootElement() calls until *after* it has removed aKid from + // aChildArray. Any calls before then could potentially restore a stale + // value for our cached root element, per note in nsDocument::RemoveChildAt(). NS_PRECONDITION(aKid && aKid->GetParentNode() == this && aKid == GetChildAt(aIndex) && IndexOf(aKid) == (int32_t)aIndex, "Bogus aKid"); |