Debian Codegraph @

memory/mozalloc/msvc_raise_wrappers.cpp

raw
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim: sw=2 ts=4 et :
3 */
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7
8 #include <exception>
9 #include "mozalloc_abort.h"
10
11 static void __cdecl RaiseHandler(const std::exception& e) {
12 mozalloc_abort(e.what());
13 }
14
15 MOZ_RUNINIT static struct StaticScopeStruct final {
16 StaticScopeStruct() { std::exception::_Set_raise_handler(RaiseHandler); }
17 } StaticScopeInvoke;