tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

msvc_raise_wrappers.cpp (632B)


      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 #include "mozilla/Attributes.h"
     11 
     12 static void __cdecl RaiseHandler(const std::exception& e) {
     13  mozalloc_abort(e.what());
     14 }
     15 
     16 MOZ_RUNINIT static struct StaticScopeStruct final {
     17  StaticScopeStruct() { std::exception::_Set_raise_handler(RaiseHandler); }
     18 } StaticScopeInvoke;