Skip to content

Commit 6bdc373

Browse files
author
David Anderson
committed
Initialize nsKeyEvent::mNativeKeyEvent to prevent crashes on multi-process (bug 906237, r=smichaud).
1 parent bb87caf commit 6bdc373

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

widget/nsGUIEventIPC.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,10 @@ struct ParamTraits<nsKeyEvent>
273273
ReadParam(aMsg, aIter, &aResult->keyCode) &&
274274
ReadParam(aMsg, aIter, &aResult->charCode) &&
275275
ReadParam(aMsg, aIter, &aResult->isChar) &&
276-
ReadParam(aMsg, aIter, &aResult->location)) {
277-
aResult->mKeyNameIndex =
278-
static_cast<mozilla::widget::KeyNameIndex>(keyNameIndex);
276+
ReadParam(aMsg, aIter, &aResult->location))
277+
{
278+
aResult->mKeyNameIndex = static_cast<mozilla::widget::KeyNameIndex>(keyNameIndex);
279+
aResult->mNativeKeyEvent = NULL;
279280
return true;
280281
}
281282
return false;

0 commit comments

Comments
 (0)