2018-11-30 22:52:05 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
2018-11-30 18:39:55 +03:00
|
|
|
* vim: sw=2 ts=4 et :
|
2010-04-21 00:12:02 +04:00
|
|
|
*/
|
2012-05-21 15:12:37 +04:00
|
|
|
/* 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/. */
|
2010-04-21 00:12:02 +04:00
|
|
|
|
2017-03-23 02:43:11 +03:00
|
|
|
#include <exception>
|
2011-08-31 22:05:20 +04:00
|
|
|
#include "mozalloc_abort.h"
|
|
|
|
|
2017-03-23 02:43:11 +03:00
|
|
|
static void __cdecl RaiseHandler(const std::exception& e) {
|
|
|
|
mozalloc_abort(e.what());
|
2016-02-25 04:00:10 +03:00
|
|
|
}
|
|
|
|
|
2017-03-23 02:43:11 +03:00
|
|
|
static struct StaticScopeStruct final {
|
|
|
|
StaticScopeStruct() { std::exception::_Set_raise_handler(RaiseHandler); }
|
|
|
|
} StaticScopeInvoke;
|