Bug 1530818 - PrefetchVirtualMemory is WINAPI. r=dmajor a=aryx
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 27 Feb 2019 00:45:57 +0000
changeset 461633 f66a48e8030eab1dbf51956da9e968817d6d7184
parent 461422 5b8896aa3f698f812771b53dda2483eea62ba97c
child 461634 121bbaec1b30e7e0a4cf1b9db1db2bd8898306e6
push id79250
push usercsabou@mozilla.com
push dateThu, 28 Feb 2019 14:36:24 +0000
treeherderautoland@00fe264dc8b6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdmajor, aryx
bugs1530818
milestone67.0a1
first release with
nightly linux32
f66a48e8030e / 67.0a1 / 20190227104426 / files
nightly linux64
f66a48e8030e / 67.0a1 / 20190227104426 / files
nightly mac
f66a48e8030e / 67.0a1 / 20190227104426 / files
nightly win32
f66a48e8030e / 67.0a1 / 20190227104426 / files
nightly win64
f66a48e8030e / 67.0a1 / 20190227104426 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1530818 - PrefetchVirtualMemory is WINAPI. r=dmajor a=aryx Differential Revision: https://phabricator.services.mozilla.com/D21304
modules/libjar/nsZipArchive.cpp
--- a/modules/libjar/nsZipArchive.cpp
+++ b/modules/libjar/nsZipArchive.cpp
@@ -606,19 +606,19 @@ nsresult nsZipArchive::BuildFileList(PRF
     if (readaheadLength) {
 #if defined(XP_SOLARIS)
       posix_madvise(const_cast<uint8_t *>(startp), readaheadLength,
                     POSIX_MADV_WILLNEED);
 #elif defined(XP_UNIX)
       madvise(const_cast<uint8_t *>(startp), readaheadLength, MADV_WILLNEED);
 #elif defined(XP_WIN)
       static auto prefetchVirtualMemory =
-          reinterpret_cast<BOOL (*)(HANDLE, ULONG_PTR, PVOID, ULONG)>(
+          reinterpret_cast<BOOL (WINAPI *)(HANDLE, ULONG_PTR, PVOID, ULONG)>(
               GetProcAddress(GetModuleHandle(L"kernel32.dll"),
-                               "PrefetchVirtualMemory"));
+                             "PrefetchVirtualMemory"));
       if (prefetchVirtualMemory) {
         // Normally, we'd use WIN32_MEMORY_RANGE_ENTRY, but that requires
         // a different _WIN32_WINNT value before including windows.h, but
         // that causes complications with unified sources. It's a simple
         // enough struct anyways.
         struct {
           PVOID VirtualAddress;
           SIZE_T NumberOfBytes;