When a method has an empty body, don't drop the rest of the binding because of that.

Bug 231324, r+sr=bryner
This commit is contained in:
bzbarsky%mit.edu 2004-01-18 23:38:31 +00:00
Родитель 8d1668e5ae
Коммит 5f18239117
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -199,13 +199,13 @@ nsXBLProtoImplMethod::CompileMember(nsIScriptContext* aContext, const nsCString&
// No parameters or body was supplied, so don't install method.
if (!mUncompiledMethod)
return NS_ERROR_FAILURE;
return NS_OK;
// Don't install method if no name or body was supplied.
if (!(mName && mUncompiledMethod->mBodyText.GetText())) {
delete mUncompiledMethod;
mUncompiledMethod = nsnull;
return NS_ERROR_FAILURE;
return NS_OK;
}
nsDependentString body(mUncompiledMethod->mBodyText.GetText());