diff --git a/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp b/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp index 17fb58cece1..6b9c772958a 100644 --- a/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp +++ b/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp @@ -249,6 +249,10 @@ nsXBLPrototypeBinding::GetBindingURI(nsCString& aResult) nsCOMPtr info; GetXBLDocumentInfo(nsnull, getter_AddRefs(info)); + NS_ASSERTION(info, "The prototype binding has somehow lost its XBLDocInfo! Bad bad bad!!!\n"); + if (!info) + return NS_ERROR_FAILURE; + info->GetDocumentURI(aResult); aResult += "#"; aResult += mID; @@ -261,6 +265,10 @@ nsXBLPrototypeBinding::GetDocURI(nsCString& aResult) nsCOMPtr info; GetXBLDocumentInfo(nsnull, getter_AddRefs(info)); + NS_ASSERTION(info, "The prototype binding has somehow lost its XBLDocInfo! Bad bad bad!!!\n"); + if (!info) + return NS_ERROR_FAILURE; + info->GetDocumentURI(aResult); return NS_OK; } diff --git a/mozilla/layout/xbl/src/nsXBLPrototypeBinding.cpp b/mozilla/layout/xbl/src/nsXBLPrototypeBinding.cpp index 17fb58cece1..6b9c772958a 100644 --- a/mozilla/layout/xbl/src/nsXBLPrototypeBinding.cpp +++ b/mozilla/layout/xbl/src/nsXBLPrototypeBinding.cpp @@ -249,6 +249,10 @@ nsXBLPrototypeBinding::GetBindingURI(nsCString& aResult) nsCOMPtr info; GetXBLDocumentInfo(nsnull, getter_AddRefs(info)); + NS_ASSERTION(info, "The prototype binding has somehow lost its XBLDocInfo! Bad bad bad!!!\n"); + if (!info) + return NS_ERROR_FAILURE; + info->GetDocumentURI(aResult); aResult += "#"; aResult += mID; @@ -261,6 +265,10 @@ nsXBLPrototypeBinding::GetDocURI(nsCString& aResult) nsCOMPtr info; GetXBLDocumentInfo(nsnull, getter_AddRefs(info)); + NS_ASSERTION(info, "The prototype binding has somehow lost its XBLDocInfo! Bad bad bad!!!\n"); + if (!info) + return NS_ERROR_FAILURE; + info->GetDocumentURI(aResult); return NS_OK; }