Bug 1530818 - PrefetchVirtualMemory is WINAPI. r=dmajor
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 27 Feb 2019 00:45:57 +0000
changeset 461297 ae89133ff9bd067f8b7d1d619f3c85bd5659fb2c
parent 461296 2a034c02b842f00f2bad8e6a1894da33cd21def9
child 461298 d954c8365626fc7dac127fd9c464f1008b9b06ba
push id79093
push usermh@glandium.org
push dateWed, 27 Feb 2019 01:29:56 +0000
treeherderautoland@ae89133ff9bd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdmajor
bugs1530818
milestone67.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 1530818 - PrefetchVirtualMemory is WINAPI. r=dmajor 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;