Bug 1530818 - PrefetchVirtualMemory is WINAPI. r=dmajor
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 27 Feb 2019 00:45:57 +0000
changeset 519275 ae89133ff9bd067f8b7d1d619f3c85bd5659fb2c
parent 519274 2a034c02b842f00f2bad8e6a1894da33cd21def9
child 519276 d954c8365626fc7dac127fd9c464f1008b9b06ba
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [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;