Bug 1249849: Make sure the correct implementations of malloc and free are used in DLL blocklist; r?glandium draft
authorAaron Klotz <aklotz@mozilla.com>
Mon, 07 Mar 2016 14:12:31 -0800
changeset 342974 03aecdafb18faa4b6239bcfda10f8b568baff07d
parent 339874 f0c0480732d36153e8839c7f17394d45f679f87d
child 516667 fa0dcdb54e118e3f07c0f8fa403a31a87541edd3
push id13504
push useraklotz@mozilla.com
push dateMon, 21 Mar 2016 19:00:31 +0000
reviewersglandium
bugs1249849
milestone48.0a1
Bug 1249849: Make sure the correct implementations of malloc and free are used in DLL blocklist; r?glandium MozReview-Commit-ID: 7piMI6MwOZh
mozglue/build/WindowsDllBlocklist.cpp
--- a/mozglue/build/WindowsDllBlocklist.cpp
+++ b/mozglue/build/WindowsDllBlocklist.cpp
@@ -1,23 +1,31 @@
 /* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+#define MOZ_MEMORY_IMPL
+#include "mozmemory_wrap.h"
+#define MALLOC_FUNCS MALLOC_FUNCS_MALLOC
+// See mozmemory_wrap.h for more details. This file is part of libmozglue, so
+// it needs to use _impl suffixes.
+#define MALLOC_DECL(name, return_type, ...) \
+  extern "C" MOZ_MEMORY_API return_type name ## _impl(__VA_ARGS__);
+#include "malloc_decls.h"
+
 #include <windows.h>
 #include <winternl.h>
 #include <io.h>
 
 #pragma warning( push )
 #pragma warning( disable : 4275 4530 ) // See msvc-stl-wrapper.template.h
 #include <map>
 #pragma warning( pop )
 
-#define MOZ_NO_MOZALLOC
 #include "nsAutoPtr.h"
 
 #include "nsWindowsDllInterceptor.h"
 #include "mozilla/UniquePtr.h"
 #include "mozilla/WindowsVersion.h"
 #include "nsWindowsHelpers.h"
 
 using namespace mozilla;