Skip to content

Commit

Permalink
Bug 1557645 - Document::CreateStaticClone shouldn't be virtual. r=jwatt
Browse files Browse the repository at this point in the history
Just minor preliminar cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D90314
  • Loading branch information
emilio committed Sep 15, 2020
1 parent 7da05af commit ad97bae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion dom/base/Document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12283,8 +12283,10 @@ already_AddRefed<Document> Document::CreateStaticClone(
});

// Make document use different container during cloning.
//
// FIXME(emilio): Why is this needed?
RefPtr<nsDocShell> originalShell = mDocumentContainer.get();
SetContainer(static_cast<nsDocShell*>(aCloneContainer));
SetContainer(nsDocShell::Cast(aCloneContainer));
IgnoredErrorResult rv;
nsCOMPtr<nsINode> clonedNode = this->CloneNode(true, rv);
SetContainer(originalShell);
Expand Down
3 changes: 1 addition & 2 deletions dom/base/Document.h
Original file line number Diff line number Diff line change
Expand Up @@ -2831,8 +2831,7 @@ class Document : public nsINode,
*
* @param aCloneContainer The container for the clone document.
*/
virtual already_AddRefed<Document> CreateStaticClone(
nsIDocShell* aCloneContainer);
already_AddRefed<Document> CreateStaticClone(nsIDocShell* aCloneContainer);

/**
* If this document is a static clone, this returns the original
Expand Down

0 comments on commit ad97bae

Please sign in to comment.