Fix for bug 9378. document.layers now returns undefined, not null. r=pollmann

git-svn-id: svn://10.0.0.236/trunk@58156 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
vidur%netscape.com
2000-01-18 23:35:47 +00:00
parent 06e4b6c8b0
commit 4755c2cf84
5 changed files with 5 additions and 41 deletions

View File

@@ -2291,10 +2291,10 @@ nsHTMLDocument::MatchLayers(nsIContent *aContent, nsString* aData)
return result;
}
#ifdef NS_IMPLEMENT_DOCUMENT_LAYERS
NS_IMETHODIMP
nsHTMLDocument::GetLayers(nsIDOMHTMLCollection** aLayers)
{
#ifdef NS_IMPLEMENT_DOCUMENT_LAYERS
if (nsnull == mLayers) {
mLayers = new nsContentList(this, MatchLayers, nsnull);
if (nsnull == mLayers) {
@@ -2305,12 +2305,11 @@ nsHTMLDocument::GetLayers(nsIDOMHTMLCollection** aLayers)
*aLayers = (nsIDOMHTMLCollection *)mLayers;
NS_ADDREF(mLayers);
#else
*aLayers = nsnull;
#endif
return NS_OK;
}
#endif
NS_IMETHODIMP
nsHTMLDocument::GetPlugins(nsIDOMHTMLCollection** aPlugins)