call_with_eh_frame.h 952 B

1234567891011121314151617181920212223242526
  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.
  4. #ifndef BASE_MAC_CALL_WITH_EH_FRAME_H_
  5. #define BASE_MAC_CALL_WITH_EH_FRAME_H_
  6. #include "base/base_export.h"
  7. namespace base {
  8. namespace mac {
  9. // Invokes the specified block in a stack frame with a special exception
  10. // handler. This function creates an exception handling stack frame that
  11. // specifies a custom C++ exception personality routine, which terminates the
  12. // search for an exception handler at this frame.
  13. //
  14. // The purpose of this function is to prevent a try/catch statement in system
  15. // libraries, acting as a global exception handler, from handling exceptions
  16. // in such a way that disrupts the generation of useful stack traces.
  17. void BASE_EXPORT CallWithEHFrame(void (^block)(void));
  18. } // namespace mac
  19. } // namespace base
  20. #endif // BASE_MAC_CALL_WITH_EH_FRAME_H_