Bug 1407375 - Make sure to call NodeInfoChanged whenever we change the nodeinfo on a node. r=peterv, a=ritu
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 11 Oct 2017 22:19:06 -0400
changeset 432494 544de21bc0602fa2a95cfd0491e499ca2ae27d52
parent 432493 451bfe2c80bb0e783b931f518a969f07c0eb02ae
child 432495 95e2671a811d131c93a862bf6266394d60a8e5d3
push id7967
push userryanvm@gmail.com
push dateFri, 13 Oct 2017 20:16:54 +0000
treeherdermozilla-beta@95e2671a811d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv, ritu
bugs1407375
milestone57.0
Bug 1407375 - Make sure to call NodeInfoChanged whenever we change the nodeinfo on a node. r=peterv, a=ritu MozReview-Commit-ID: 71k1jv8thFA
dom/base/nsNodeUtils.cpp
--- a/dom/base/nsNodeUtils.cpp
+++ b/dom/base/nsNodeUtils.cpp
@@ -588,16 +588,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;
         }
       }
     }
   }