jochen | 4879fd2c | 2014-09-16 15:04:29 | [diff] [blame] | 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 | |
| 5 | #include "gin/debug_impl.h" |
| 6 | |
| 7 | namespace gin { |
| 8 | |
| 9 | namespace { |
jochen | 4879fd2c | 2014-09-16 15:04:29 | [diff] [blame] | 10 | v8::JitCodeEventHandler g_jit_code_event_handler = NULL; |
| 11 | } // namespace |
| 12 | |
| 13 | // static |
jochen | 4879fd2c | 2014-09-16 15:04:29 | [diff] [blame] | 14 | void Debug::SetJitCodeEventHandler(v8::JitCodeEventHandler event_handler) { |
| 15 | g_jit_code_event_handler = event_handler; |
| 16 | } |
| 17 | |
jochen | 284435c | 2014-10-02 13:08:23 | [diff] [blame] | 18 | #if defined(OS_WIN) |
| 19 | // static |
Paolo Severini | fb4ab3b | 2019-04-16 00:17:49 | [diff] [blame] | 20 | void Debug::SetUnhandledExceptionCallback( |
| 21 | v8::UnhandledExceptionCallback callback) { |
| 22 | v8::V8::SetUnhandledExceptionCallback(callback); |
jochen | 284435c | 2014-10-02 13:08:23 | [diff] [blame] | 23 | } |
| 24 | #endif |
| 25 | |
jochen | 4879fd2c | 2014-09-16 15:04:29 | [diff] [blame] | 26 | // static |
jochen | 4879fd2c | 2014-09-16 15:04:29 | [diff] [blame] | 27 | v8::JitCodeEventHandler DebugImpl::GetJitCodeEventHandler() { |
| 28 | return g_jit_code_event_handler; |
| 29 | } |
| 30 | |
jochen | 4879fd2c | 2014-09-16 15:04:29 | [diff] [blame] | 31 | } // namespace gin |