зеркало из https://github.com/mozilla/gecko-dev.git
Bug 87264: fix small leak in nsDOMEvent. r=dbaron, sr=ben
This commit is contained in:
Родитель
57b4f04566
Коммит
6d1a338eba
|
@ -1060,11 +1060,7 @@ NS_METHOD nsDOMEvent::GetPreventDefault(PRBool* aReturn)
|
||||||
nsresult
|
nsresult
|
||||||
nsDOMEvent::SetEventType(const nsAReadableString& aEventTypeArg)
|
nsDOMEvent::SetEventType(const nsAReadableString& aEventTypeArg)
|
||||||
{
|
{
|
||||||
nsAutoString str; str.AssignWithConversion("on");
|
nsCOMPtr<nsIAtom> atom(dont_AddRef(NS_NewAtom(NS_LITERAL_STRING("on") + aEventTypeArg)));
|
||||||
nsIAtom* atom;
|
|
||||||
|
|
||||||
str.Append(aEventTypeArg);
|
|
||||||
atom = NS_NewAtom(str);
|
|
||||||
|
|
||||||
if (atom == nsLayoutAtoms::onmousedown && mEvent->eventStructType == NS_MOUSE_EVENT) {
|
if (atom == nsLayoutAtoms::onmousedown && mEvent->eventStructType == NS_MOUSE_EVENT) {
|
||||||
mEvent->message = NS_MOUSE_LEFT_BUTTON_DOWN;
|
mEvent->message = NS_MOUSE_LEFT_BUTTON_DOWN;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче