debug_impl.cc 849 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2014 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. #include "gin/debug_impl.h"
  5. #include "build/build_config.h"
  6. #if BUILDFLAG(IS_WIN)
  7. #include "v8/include/v8-initialization.h"
  8. #endif
  9. namespace gin {
  10. namespace {
  11. v8::JitCodeEventHandler g_jit_code_event_handler = NULL;
  12. } // namespace
  13. // static
  14. void Debug::SetJitCodeEventHandler(v8::JitCodeEventHandler event_handler) {
  15. g_jit_code_event_handler = event_handler;
  16. }
  17. #if BUILDFLAG(IS_WIN)
  18. // static
  19. void Debug::SetUnhandledExceptionCallback(
  20. v8::UnhandledExceptionCallback callback) {
  21. v8::V8::SetUnhandledExceptionCallback(callback);
  22. }
  23. #endif
  24. // static
  25. v8::JitCodeEventHandler DebugImpl::GetJitCodeEventHandler() {
  26. return g_jit_code_event_handler;
  27. }
  28. } // namespace gin