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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user