diff options
Diffstat (limited to 'chromium/base/win/atl_throw.cc')
-rw-r--r-- | chromium/base/win/atl_throw.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/chromium/base/win/atl_throw.cc b/chromium/base/win/atl_throw.cc new file mode 100644 index 00000000000..2da52e85e68 --- /dev/null +++ b/chromium/base/win/atl_throw.cc @@ -0,0 +1,25 @@ +// Copyright 2020 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/win/atl_throw.h" + +#include <winerror.h> + +#include "base/compiler_specific.h" +#include "base/debug/alias.h" +#include "base/immediate_crash.h" +#include "base/process/memory.h" + +namespace base { +namespace win { + +NOINLINE void __stdcall AtlThrowImpl(HRESULT hr) { + base::debug::Alias(&hr); + if (hr == E_OUTOFMEMORY) + base::TerminateBecauseOutOfMemory(0); + IMMEDIATE_CRASH(); +} + +} // namespace win +} // namespace base |