Bug 1666783 - Remove nsIDocShell::GetInterface(nsISHistory). r=smaug
Also assert that it's never used. Differential Revision: https://phabricator.services.mozilla.com/D91142
This commit is contained in:
@@ -693,13 +693,10 @@ nsDocShell::GetInterface(const nsIID& aIID, void** aSink) {
|
||||
? NS_OK
|
||||
: NS_NOINTERFACE;
|
||||
} else if (aIID.Equals(NS_GET_IID(nsISHistory))) {
|
||||
RefPtr<ChildSHistory> shistory = GetSessionHistory();
|
||||
if (shistory) {
|
||||
// XXX(nika): Stop exposing nsISHistory through GetInterface.
|
||||
nsCOMPtr<nsISHistory> legacy = shistory->LegacySHistory();
|
||||
legacy.forget(aSink);
|
||||
return NS_OK;
|
||||
}
|
||||
// This is deprecated, you should instead directly get
|
||||
// ChildSHistory from the browsing context.
|
||||
MOZ_DIAGNOSTIC_ASSERT(
|
||||
false, "Do not try to get a nsISHistory interface from nsIDocShell");
|
||||
return NS_NOINTERFACE;
|
||||
} else if (aIID.Equals(NS_GET_IID(nsIWebBrowserFind))) {
|
||||
nsresult rv = EnsureFind();
|
||||
|
||||
Reference in New Issue
Block a user