Bug 1407375. Make sure to call NodeInfoChanged whenever we change the nodeinfo on a node. r=peterv
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 11 Oct 2017 22:19:06 -0400
changeset 385838 51ff2d13e50c1e8f7731e4c7243064bb96d2e4d0
parent 385837 723d04bc0b4cc37ef8686dacaeabb8f7c75b1dfc
child 385839 76fb9cb1078c4abf59ac2fc50a95bbb90e6979fa
push id32669
push userarchaeopteryx@coole-files.de
push dateThu, 12 Oct 2017 21:58:56 +0000
treeherdermozilla-central@25aad10380b1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
bugs1407375
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1407375. Make sure to call NodeInfoChanged whenever we change the nodeinfo on a node. r=peterv MozReview-Commit-ID: 71k1jv8thFA
dom/base/nsNodeUtils.cpp
--- a/dom/base/nsNodeUtils.cpp
+++ b/dom/base/nsNodeUtils.cpp
@@ -611,16 +611,19 @@ nsNodeUtils::CloneAndAdopt(nsINode *aNod
         MOZ_ASSERT(IsDOMObject(wrapper));
         JSAutoCompartment ac(cx, wrapper);
         ReparentWrapper(cx, wrapper, aError);
         if (aError.Failed()) {
           if (wasRegistered) {
             aNode->OwnerDoc()->UnregisterActivityObserver(aNode->AsElement());
           }
           aNode->mNodeInfo.swap(newNodeInfo);
+          if (elem) {
+            elem->NodeInfoChanged(newDoc);
+          }
           if (wasRegistered) {
             aNode->OwnerDoc()->RegisterActivityObserver(aNode->AsElement());
           }
           return nullptr;
         }
       }
     }
   }