Bug 1162434 - Make windows emulation work on X64. r=marcoz, a=sledru
authorAlexander Surkov <surkov.alexander@gmail.com>
Tue, 12 May 2015 12:43:38 -0400
changeset 274738 b3034590e03f9d7550cda1e3d1bf6f32a6b0c6d8
parent 274737 e3e6b0dd3bc680d46b7326eb12104a60f14d3ae1
child 274739 e8e924727dba81ce3edacac6ccbfeb7945b717ac
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarcoz, sledru
bugs1162434
milestone40.0a2
Bug 1162434 - Make windows emulation work on X64. r=marcoz, a=sledru
accessible/windows/msaa/nsWinUtils.cpp
--- a/accessible/windows/msaa/nsWinUtils.cpp
+++ b/accessible/windows/msaa/nsWinUtils.cpp
@@ -144,17 +144,20 @@ WindowProc(HWND hWnd, UINT msg, WPARAM w
 {
   // Note, this window's message handling should not invoke any call that
   // may result in a cross-process ipc call. Doing so may violate RPC
   // message semantics.
 
   switch (msg) {
     case WM_GETOBJECT:
     {
-      if (lParam == OBJID_CLIENT) {
+      // Do explicit casting to make it working on 64bit systems (see bug 649236
+      // for details).
+      int32_t objId = static_cast<DWORD>(lParam);
+      if (objId == OBJID_CLIENT) {
         DocAccessible* document =
           nsWinUtils::sHWNDCache->GetWeak(static_cast<void*>(hWnd));
         if (document) {
           IAccessible* msaaAccessible = nullptr;
           document->GetNativeInterface((void**)&msaaAccessible); // does an addref
           if (msaaAccessible) {
             LRESULT result = ::LresultFromObject(IID_IAccessible, wParam,
                                                  msaaAccessible); // does an addref