Bug 1162293 - Part 2: Fix string leak in logging code. r=froydnj

If logging is enabled the result from |ToNewCString| will be leaked. Switched
to |NS_LossyConvertUTF16toASCII| instead.
This commit is contained in:
Eric Rahm 2015-05-07 09:43:39 -07:00
parent c451c2932b
commit 0874d24742

View File

@ -240,7 +240,7 @@ NativeKeyBindings::Execute(const WidgetKeyboardEvent& aEvent,
PR_LOG(gNativeKeyBindingsLog, PR_LOG_ALWAYS,
("%p NativeKeyBindings::KeyPress, selector=%s",
this, ToNewCString(nsSelectorString)));
this, NS_LossyConvertUTF16toASCII(nsSelectorString).get()));
}
// Try to find a simple mapping in the hashtable