memory/mozalloc/mozalloc_abort.h

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

michael@0 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
michael@0 2 * vim: sw=4 ts=4 et :
michael@0 3 */
michael@0 4 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 5 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 7
michael@0 8 #ifndef mozilla_mozalloc_abort_h
michael@0 9 #define mozilla_mozalloc_abort_h
michael@0 10
michael@0 11 #include "mozilla/Attributes.h"
michael@0 12
michael@0 13 #if defined(MOZALLOC_EXPORT)
michael@0 14 // do nothing: it's been defined to __declspec(dllexport) by
michael@0 15 // mozalloc*.cpp on platforms where that's required
michael@0 16 #elif defined(XP_WIN)
michael@0 17 # define MOZALLOC_EXPORT __declspec(dllimport)
michael@0 18 #elif defined(HAVE_VISIBILITY_ATTRIBUTE)
michael@0 19 /* Make sure symbols are still exported even if we're wrapped in a
michael@0 20 * |visibility push(hidden)| blanket. */
michael@0 21 # define MOZALLOC_EXPORT __attribute__ ((visibility ("default")))
michael@0 22 #else
michael@0 23 # define MOZALLOC_EXPORT
michael@0 24 #endif
michael@0 25
michael@0 26 /**
michael@0 27 * Terminate this process in such a way that breakpad is triggered, if
michael@0 28 * at all possible.
michael@0 29 *
michael@0 30 * Note: MOZ_NORETURN seems to break crash stacks on ARM, so we don't
michael@0 31 * use that annotation there.
michael@0 32 */
michael@0 33 MOZALLOC_EXPORT
michael@0 34 #if !defined(__arm__)
michael@0 35 MOZ_NORETURN
michael@0 36 #endif
michael@0 37 void mozalloc_abort(const char* const msg);
michael@0 38
michael@0 39
michael@0 40 #endif /* ifndef mozilla_mozalloc_abort_h */

mercurial