summaryrefslogtreecommitdiffstats
path: root/gin/debug_impl.cc
diff options
context:
space:
mode:
authorjochen <jochen@chromium.org>2014-09-16 08:04:29 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-16 15:06:01 +0000
commit4879fd2c9e48ddadd001fed382163c26586476ce (patch)
treecd474722d17d4d0fd019d2c9542e58019f1051eb /gin/debug_impl.cc
parenta45fa2145d7c9740a4dd06bb8592310d538c866e (diff)
downloadchromium_src-4879fd2c9e48ddadd001fed382163c26586476ce.zip
chromium_src-4879fd2c9e48ddadd001fed382163c26586476ce.tar.gz
chromium_src-4879fd2c9e48ddadd001fed382163c26586476ce.tar.bz2
Move setup of code event handlers to gin
This will make sure that the handlers are set at the correct point during v8::Isolate construction BUG=none R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/567343002 Cr-Commit-Position: refs/heads/master@{#295066}
Diffstat (limited to 'gin/debug_impl.cc')
-rw-r--r--gin/debug_impl.cc34
1 files changed, 34 insertions, 0 deletions
diff --git a/gin/debug_impl.cc b/gin/debug_impl.cc
new file mode 100644
index 0000000..87a95fb
--- /dev/null
+++ b/gin/debug_impl.cc
@@ -0,0 +1,34 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "gin/debug_impl.h"
+
+namespace gin {
+
+namespace {
+v8::FunctionEntryHook g_entry_hook = NULL;
+v8::JitCodeEventHandler g_jit_code_event_handler = NULL;
+} // namespace
+
+// static
+void Debug::SetFunctionEntryHook(v8::FunctionEntryHook entry_hook) {
+ g_entry_hook = entry_hook;
+}
+
+// static
+void Debug::SetJitCodeEventHandler(v8::JitCodeEventHandler event_handler) {
+ g_jit_code_event_handler = event_handler;
+}
+
+// static
+v8::FunctionEntryHook DebugImpl::GetFunctionEntryHook() {
+ return g_entry_hook;
+}
+
+// static
+v8::JitCodeEventHandler DebugImpl::GetJitCodeEventHandler() {
+ return g_jit_code_event_handler;
+}
+
+} // namespace gin