Bug 767370 - Uninitialised value use in nsIDOMKeyEvent_GetCharCode; r=peterv
authorJulian Seward <jseward@acm.org>
Fri, 22 Jun 2012 17:53:01 +0200
changeset 97420 31cf3f1603d760c4b46ab7846a55deedb234ae1a
parent 97419 d7dc563a8f436872f95b396dac95d7af25b41d87
child 97421 a770f57a063fd8eb5c112a64b93b03e0914b27e1
push id22974
push userryanvm@gmail.com
push dateSat, 23 Jun 2012 12:36:09 +0000
treeherdermozilla-central@e21173ed2c38 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
bugs767370
milestone16.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 767370 - Uninitialised value use in nsIDOMKeyEvent_GetCharCode; r=peterv
content/events/src/nsDOMKeyboardEvent.cpp
--- a/content/events/src/nsDOMKeyboardEvent.cpp
+++ b/content/events/src/nsDOMKeyboardEvent.cpp
@@ -91,16 +91,17 @@ nsDOMKeyboardEvent::GetCharCode(PRUint32
   case NS_KEY_UP:
   case NS_KEY_DOWN:
     *aCharCode = 0;
     break;
   case NS_KEY_PRESS:
     *aCharCode = ((nsKeyEvent*)mEvent)->charCode;
     break;
   default:
+    *aCharCode = 0;
     break;
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDOMKeyboardEvent::GetKeyCode(PRUint32* aKeyCode)
 {