Use appropriate EXPECT_EQ argument order for BookmarkModelTest assertions
[chromium-blink-merge.git] / gin / public / debug.h
blob0c24109f4009250f52885200cc2249448864bf51
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.
5 #ifndef GIN_PUBLIC_DEBUG_H_
6 #define GIN_PUBLIC_DEBUG_H_
8 #include "build/build_config.h"
9 #include "gin/gin_export.h"
10 #include "v8/include/v8.h"
12 namespace gin {
14 class GIN_EXPORT Debug {
15 public:
16 /* Installs a callback that is invoked on entry to every V8-generated
17 * function.
19 * This only affects IsolateHolder instances created after
20 * SetFunctionEntryHook was invoked.
22 static void SetFunctionEntryHook(v8::FunctionEntryHook entry_hook);
24 /* Installs a callback that is invoked each time jit code is added, moved,
25 * or removed.
27 * This only affects IsolateHolder instances created after
28 * SetJitCodeEventHandler was invoked.
30 static void SetJitCodeEventHandler(v8::JitCodeEventHandler event_handler);
32 #if defined(OS_WIN)
33 typedef void (__cdecl *CodeRangeCreatedCallback)(void*, size_t);
35 /* Sets a callback that is invoked for every new code range being created.
37 * On Win64, exception handling in jitted code is broken due to the fact
38 * that JS stack frames are not ABI compliant. It is possible to install
39 * custom handlers for the code range which holds the jitted code to work
40 * around this issue.
42 * https://code.google.com/p/v8/issues/detail?id=3598
44 static void SetCodeRangeCreatedCallback(CodeRangeCreatedCallback callback);
46 typedef void (__cdecl *CodeRangeDeletedCallback)(void*);
48 /* Sets a callback that is invoked for every previously registered code range
49 * when it is deleted.
51 static void SetCodeRangeDeletedCallback(CodeRangeDeletedCallback callback);
52 #endif
55 } // namespace gin
57 #endif // GIN_PUBLIC_DEBUG_H_