Loading content/base/src/nsGenericElement.cpp +16 −7 Original line number Diff line number Diff line Loading @@ -4616,18 +4616,18 @@ nsGenericElement::CanSkipInCC(nsINode* aNode) return false; } // Bail out early if aNode is somewhere in anonymous content, // or otherwise unusual. if (UnoptimizableCCNode(aNode)) { return false; } nsIDocument* currentDoc = aNode->GetCurrentDoc(); if (currentDoc && nsCCUncollectableMarker::InGeneration(currentDoc->GetMarkedCCGeneration())) { return !NeedsScriptTraverse(aNode); } // Bail out early if aNode is somewhere in anonymous content, // or otherwise unusual. if (UnoptimizableCCNode(aNode)) { return false; } nsINode* root = currentDoc ? static_cast<nsINode*>(currentDoc) : FindOptimizableSubtreeRoot(aNode); Loading Loading @@ -4762,6 +4762,13 @@ NodeHasActiveFrame(nsIDocument* aCurrentDoc, nsINode* aNode) aNode->AsElement()->GetPrimaryFrame(); } bool OwnedByBindingManager(nsIDocument* aCurrentDoc, nsINode* aNode) { return aNode->IsElement() && aCurrentDoc->BindingManager()->GetBinding(aNode->AsElement()); } // CanSkip checks if aNode is black, and if it is, returns // true. If aNode is in a black DOM tree, CanSkip may also remove other objects // from purple buffer and unmark event listeners and user data. Loading @@ -4780,10 +4787,12 @@ nsGenericElement::CanSkip(nsINode* aNode, bool aRemovingAllowed) nsIDocument* currentDoc = aNode->GetCurrentDoc(); if (currentDoc && nsCCUncollectableMarker::InGeneration(currentDoc->GetMarkedCCGeneration()) && (!unoptimizable || NodeHasActiveFrame(currentDoc, aNode))) { (!unoptimizable || NodeHasActiveFrame(currentDoc, aNode) || OwnedByBindingManager(currentDoc, aNode))) { MarkNodeChildren(aNode); return true; } if (unoptimizable) { return false; } Loading Loading
content/base/src/nsGenericElement.cpp +16 −7 Original line number Diff line number Diff line Loading @@ -4616,18 +4616,18 @@ nsGenericElement::CanSkipInCC(nsINode* aNode) return false; } // Bail out early if aNode is somewhere in anonymous content, // or otherwise unusual. if (UnoptimizableCCNode(aNode)) { return false; } nsIDocument* currentDoc = aNode->GetCurrentDoc(); if (currentDoc && nsCCUncollectableMarker::InGeneration(currentDoc->GetMarkedCCGeneration())) { return !NeedsScriptTraverse(aNode); } // Bail out early if aNode is somewhere in anonymous content, // or otherwise unusual. if (UnoptimizableCCNode(aNode)) { return false; } nsINode* root = currentDoc ? static_cast<nsINode*>(currentDoc) : FindOptimizableSubtreeRoot(aNode); Loading Loading @@ -4762,6 +4762,13 @@ NodeHasActiveFrame(nsIDocument* aCurrentDoc, nsINode* aNode) aNode->AsElement()->GetPrimaryFrame(); } bool OwnedByBindingManager(nsIDocument* aCurrentDoc, nsINode* aNode) { return aNode->IsElement() && aCurrentDoc->BindingManager()->GetBinding(aNode->AsElement()); } // CanSkip checks if aNode is black, and if it is, returns // true. If aNode is in a black DOM tree, CanSkip may also remove other objects // from purple buffer and unmark event listeners and user data. Loading @@ -4780,10 +4787,12 @@ nsGenericElement::CanSkip(nsINode* aNode, bool aRemovingAllowed) nsIDocument* currentDoc = aNode->GetCurrentDoc(); if (currentDoc && nsCCUncollectableMarker::InGeneration(currentDoc->GetMarkedCCGeneration()) && (!unoptimizable || NodeHasActiveFrame(currentDoc, aNode))) { (!unoptimizable || NodeHasActiveFrame(currentDoc, aNode) || OwnedByBindingManager(currentDoc, aNode))) { MarkNodeChildren(aNode); return true; } if (unoptimizable) { return false; } Loading