1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/mac/call_with_eh_frame.h"
9 #include "build/build_config.h"
14 _Unwind_Reason_Code
CxxPersonalityRoutine(
16 _Unwind_Action actions
,
17 uint64_t exceptionClass
,
18 struct _Unwind_Exception
* exceptionObject
,
19 struct _Unwind_Context
* context
) {
20 // Tell libunwind that this is the end of the stack. When it encounters the
21 // CallWithEHFrame, it will stop searching for an exception handler. The
22 // result is that no exception handler has been found higher on the stack,
23 // and any that are lower on the stack (e.g. in CFRunLoopRunSpecific), will
24 // now be skipped. Since this is reporting the end of the stack, and no
25 // exception handler will have been found, std::terminate() will be called.
26 return _URC_END_OF_STACK
;
30 // No iOS assembly implementation exists, so just call the block directly.
31 void CallWithEHFrame(void (^block
)(void)) {