From 441467e7f32562951f5aa0a9819bafbe39493fda Mon Sep 17 00:00:00 2001 From: Olli Pettay Date: Fri, 19 Mar 2010 12:52:48 +0200 Subject: [PATCH] Bug 535887, Change an assertion to warning in nsEventDispatcher.cpp, r=sicking --HG-- extra : rebase_source : 249d9d86d8918e53fae0cfeb7bae766462353efe --- content/events/src/nsEventDispatcher.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/content/events/src/nsEventDispatcher.cpp b/content/events/src/nsEventDispatcher.cpp index 3d2fcf3bc9c5..fd5b28264068 100644 --- a/content/events/src/nsEventDispatcher.cpp +++ b/content/events/src/nsEventDispatcher.cpp @@ -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 node = do_QueryInterface(target); + if (node && nsContentUtils::IsChromeDoc(node->GetOwnerDoc())) { + NS_WARNING("Fix the caller!"); + } else { + NS_ERROR("This is unsafe! Fix the caller!"); + } } }