Bug 535887, Change an assertion to warning in nsEventDispatcher.cpp, r=sicking

--HG--
extra : rebase_source : 249d9d86d8918e53fae0cfeb7bae766462353efe
This commit is contained in:
Olli Pettay 2010-03-19 12:52:48 +02:00
parent 5c00dd1789
commit 25059611b9

View File

@ -483,7 +483,12 @@ nsEventDispatcher::Dispatch(nsISupports* aTarget,
nsresult rv = NS_ERROR_FAILURE;
if (target->GetContextForEventHandlers(&rv) ||
NS_FAILED(rv)) {
NS_ERROR("This is unsafe!");
nsCOMPtr<nsINode> node = do_QueryInterface(target);
if (node && nsContentUtils::IsChromeDoc(node->GetOwnerDoc())) {
NS_WARNING("Fix the caller!");
} else {
NS_ERROR("This is unsafe! Fix the caller!");
}
}
}