mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 780168 - Avoid a couple QIs in nsDocShell::GetInterface(nsIDocument); r=bz
This commit is contained in:
parent
26ec93ab7a
commit
ffdeefc990
@ -951,11 +951,9 @@ NS_IMETHODIMP nsDocShell::GetInterface(const nsIID & aIID, void **aSink)
|
||||
}
|
||||
else if (aIID.Equals(NS_GET_IID(nsIDocument)) &&
|
||||
NS_SUCCEEDED(EnsureContentViewer())) {
|
||||
nsCOMPtr<nsIDOMDocument> domDoc;
|
||||
mContentViewer->GetDOMDocument(getter_AddRefs(domDoc));
|
||||
if (!domDoc)
|
||||
return NS_NOINTERFACE;
|
||||
return domDoc->QueryInterface(aIID, aSink);
|
||||
nsCOMPtr<nsIDocument> doc = mContentViewer->GetDocument();
|
||||
doc.forget(aSink);
|
||||
return *aSink ? NS_OK : NS_NOINTERFACE;
|
||||
}
|
||||
else if (aIID.Equals(NS_GET_IID(nsIApplicationCacheContainer))) {
|
||||
*aSink = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user