Bug 753455 - Improved warning message from XBL. r=bz

This commit is contained in:
Irving Reid 2012-05-09 18:57:44 -04:00
parent 1c5dc0c10b
commit e70f1e4bc0

View File

@ -836,9 +836,20 @@ nsXBLService::GetBinding(nsIContent* aBoundElement, nsIURI* aURI,
nsXBLPrototypeBinding* protoBinding = docInfo->GetPrototypeBinding(ref);
NS_WARN_IF_FALSE(protoBinding, "Unable to locate an XBL binding");
if (!protoBinding)
if (!protoBinding) {
#ifdef DEBUG
nsCAutoString uriSpec;
aURI->GetSpec(uriSpec);
nsCAutoString doc;
boundDocument->GetDocumentURI()->GetSpec(doc);
nsCAutoString message("Unable to locate an XBL binding for URI ");
message += uriSpec;
message += " in document ";
message += doc;
NS_WARNING(message.get());
#endif
return NS_ERROR_FAILURE;
}
NS_ENSURE_TRUE(aDontExtendURIs.AppendElement(protoBinding->BindingURI()),
NS_ERROR_OUT_OF_MEMORY);