Fix crash on empty getters or setters. Bug 326910, r=sicking, sr=bryner

git-svn-id: svn://10.0.0.236/trunk@189845 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2006-02-13 19:36:01 +00:00
parent 4ca438b5a6
commit 7507363770

View File

@@ -242,7 +242,7 @@ nsXBLProtoImplProperty::CompileMember(nsIScriptContext* aContext, const nsCStrin
}
PRBool deletedGetter = PR_FALSE;
if (mGetterText) {
if (mGetterText && mGetterText->GetText()) {
nsDependentString getter(mGetterText->GetText());
if (!getter.IsEmpty()) {
// Compile into a temp object so we don't wipe out mGetterText
@@ -298,7 +298,7 @@ nsXBLProtoImplProperty::CompileMember(nsIScriptContext* aContext, const nsCStrin
}
PRBool deletedSetter = PR_FALSE;
if (mSetterText) {
if (mSetterText && mSetterText->GetText()) {
nsDependentString setter(mSetterText->GetText());
if (!setter.IsEmpty()) {
// Compile into a temp object so we don't wipe out mSetterText