Bug 655493 - Remove WinCE code from layout; r=roc
authorEd Morley <bmo@edmorley.co.uk>
Mon, 09 May 2011 09:56:09 -0700
changeset 69203 052bbd46f96fed5e042a07aa269426e3c28b241d
parent 69202 0abe8338b79b1e27dfe11969bf5c07b73602a362
child 69204 b486f0b4a30de3c476968beb1739feb9b2620160
push idunknown
push userunknown
push dateunknown
reviewersroc
bugs655493
milestone6.0a1
Bug 655493 - Remove WinCE code from layout; r=roc
layout/base/tests/TestPoisonArea.cpp
--- a/layout/base/tests/TestPoisonArea.cpp
+++ b/layout/base/tests/TestPoisonArea.cpp
@@ -219,36 +219,26 @@ static const ia64_instr _return_instr =
 // Miscellaneous Windows/Unix portability gumph
 
 #ifdef _WIN32
 // Uses of this function deliberately leak the string.
 static LPSTR
 StrW32Error(DWORD errcode)
 {
   LPSTR errmsg;
-
-#ifndef WINCE
   FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |
                  FORMAT_MESSAGE_FROM_SYSTEM |
                  FORMAT_MESSAGE_IGNORE_INSERTS,
                  NULL, errcode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
                  (LPSTR) &errmsg, 0, NULL);
 
   // FormatMessage puts an unwanted newline at the end of the string
   size_t n = strlen(errmsg)-1;
   while (errmsg[n] == '\r' || errmsg[n] == '\n') n--;
   errmsg[n+1] = '\0';
-#else
-  // CE doesn't have FormatMessageA so we just stringify the error code.
-  // Use LocalAlloc for consistency with the regular Windows code path.
-  // "code \0" is 6 bytes, and a 32-bit number might need 10 more.
-  errmsg = (LPSTR)LocalAlloc(LMEM_FIXED, 16);
-  _snprintf(errmsg, 16, "code %u", errcode);
-#endif
-
   return errmsg;
 }
 #define LastErrMsg() (StrW32Error(GetLastError()))
 
 // Because we use VirtualAlloc in MEM_RESERVE mode, the "page size" we want
 // is the allocation granularity.
 static SYSTEM_INFO _sinfo;
 #undef PAGESIZE