Attach bindings via addBinding even to nodes not in a document. Bug 380990, r+sr=sicking

This commit is contained in:
bzbarsky@mit.edu 2007-05-17 11:31:31 -07:00
parent 053c2cc91f
commit 54d9fbc29a

View File

@ -494,13 +494,7 @@ nsXBLService::LoadBindings(nsIContent* aContent, nsIURI* aURL, PRBool aAugmentFl
nsresult rv;
nsCOMPtr<nsIDocument> document;
if (aContent->HasFlag(NODE_FORCE_XBL_BINDINGS)) {
document = aContent->GetOwnerDoc();
}
else {
document = aContent->GetCurrentDoc();
}
nsCOMPtr<nsIDocument> document = aContent->GetOwnerDoc();
// XXX document may be null if we're in the midst of paint suppression
if (!document)