v8-wasm-trap-handler-win.h 1.0 KB

12345678910111213141516171819202122232425262728
  1. // Copyright 2018 the V8 project 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 V8_WASM_TRAP_HANDLER_WIN_H_
  5. #define V8_WASM_TRAP_HANDLER_WIN_H_
  6. #include <windows.h>
  7. #include "v8config.h" // NOLINT(build/include_directory)
  8. namespace v8 {
  9. /**
  10. * This function determines whether a memory access violation has been an
  11. * out-of-bounds memory access in WebAssembly. If so, it will modify the
  12. * exception parameter and add a return address where the execution can continue
  13. * after the exception handling, and return true. Otherwise the return value
  14. * will be false.
  15. *
  16. * The parameter to this function corresponds to the one passed to a Windows
  17. * vectored exception handler. Use this function only on Windows.
  18. *
  19. * \param exception An EXCEPTION_POINTERS* as provided to the exception handler.
  20. */
  21. V8_EXPORT bool TryHandleWebAssemblyTrapWindows(EXCEPTION_POINTERS* exception);
  22. } // namespace v8
  23. #endif // V8_WASM_TRAP_HANDLER_WIN_H_