Commit 6e5abc32 authored by Georg Koppen's avatar Georg Koppen
Browse files

Backport of tjr's patch for bug 1331349

parent 9f977f7d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -849,7 +849,7 @@ ProtectPages(void* p, size_t size)
#if defined(XP_WIN)
    DWORD oldProtect;
    if (!VirtualProtect(p, size, PAGE_NOACCESS, &oldProtect)) {
        MOZ_CRASH_UNSAFE_PRINTF("VirtualProtect(PAGE_NOACCESS) failed! Error code: %u",
        MOZ_CRASH_UNSAFE_PRINTF("VirtualProtect(PAGE_NOACCESS) failed! Error code: %lu",
                                GetLastError());
    }
    MOZ_ASSERT(oldProtect == PAGE_READWRITE);
@@ -868,7 +868,7 @@ MakePagesReadOnly(void* p, size_t size)
#if defined(XP_WIN)
    DWORD oldProtect;
    if (!VirtualProtect(p, size, PAGE_READONLY, &oldProtect)) {
        MOZ_CRASH_UNSAFE_PRINTF("VirtualProtect(PAGE_READONLY) failed! Error code: %u",
        MOZ_CRASH_UNSAFE_PRINTF("VirtualProtect(PAGE_READONLY) failed! Error code: %lu",
                                GetLastError());
    }
    MOZ_ASSERT(oldProtect == PAGE_READWRITE);
@@ -887,7 +887,7 @@ UnprotectPages(void* p, size_t size)
#if defined(XP_WIN)
    DWORD oldProtect;
    if (!VirtualProtect(p, size, PAGE_READWRITE, &oldProtect)) {
        MOZ_CRASH_UNSAFE_PRINTF("VirtualProtect(PAGE_READWRITE) failed! Error code: %u",
        MOZ_CRASH_UNSAFE_PRINTF("VirtualProtect(PAGE_READWRITE) failed! Error code: %lu",
                                GetLastError());
    }
    MOZ_ASSERT(oldProtect == PAGE_NOACCESS || oldProtect == PAGE_READONLY);
+4 −1
Original line number Diff line number Diff line
@@ -594,7 +594,10 @@
 * PR_snprintf and friends, which are "printf-like" but which assign
 * different meanings to the various formats.
 */
#ifdef __GNUC__
#ifdef __MINGW__
#define MOZ_FORMAT_PRINTF(stringIndex, firstToCheck)  \
    __attribute__ ((format (ms_printf, stringIndex, firstToCheck)))
#elseif __GNUC__
#define MOZ_FORMAT_PRINTF(stringIndex, firstToCheck)  \
    __attribute__ ((format (printf, stringIndex, firstToCheck)))
#else