memory/mozalloc/msvc_raise_wrappers.cpp
author Ed Lee <edilee@mozilla.com>
Fri, 03 Nov 2017 12:08:30 -0700
changeset 443416 def95432b0a17a1b29bef1e6aea9305d69572fb9
parent 417382 37e047b6187f8a2cc9ce30268d42977e679db84e
child 508163 6f3709b3878117466168c40affa7bca0b60cf75b
permissions -rw-r--r--
Bug 1413550 - Add per-platform styles, per-locale html and bug fixes to Activity Stream. r=k88hudson MozReview-Commit-ID: I7Y4nfrAvLL

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 * vim: sw=4 ts=4 et :
 */
/* 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/. */

#include <exception>
#include "mozalloc_abort.h"

static void __cdecl
RaiseHandler(const std::exception& e)
{
    mozalloc_abort(e.what());
}

static struct StaticScopeStruct final {
    StaticScopeStruct() {
        std::exception::_Set_raise_handler(RaiseHandler);
    }
} StaticScopeInvoke;