Index: gin/public/debug.h |
diff --git a/gin/public/debug.h b/gin/public/debug.h |
index f668b8237a6f24e30619f625710bf5135d47d556..0c24109f4009250f52885200cc2249448864bf51 100644 |
--- a/gin/public/debug.h |
+++ b/gin/public/debug.h |
@@ -5,6 +5,7 @@ |
#ifndef GIN_PUBLIC_DEBUG_H_ |
#define GIN_PUBLIC_DEBUG_H_ |
+#include "build/build_config.h" |
#include "gin/gin_export.h" |
#include "v8/include/v8.h" |
@@ -27,6 +28,28 @@ class GIN_EXPORT Debug { |
* SetJitCodeEventHandler was invoked. |
*/ |
static void SetJitCodeEventHandler(v8::JitCodeEventHandler event_handler); |
+ |
+#if defined(OS_WIN) |
+ typedef void (__cdecl *CodeRangeCreatedCallback)(void*, size_t); |
+ |
+ /* Sets a callback that is invoked for every new code range being created. |
+ * |
+ * On Win64, exception handling in jitted code is broken due to the fact |
+ * that JS stack frames are not ABI compliant. It is possible to install |
+ * custom handlers for the code range which holds the jitted code to work |
+ * around this issue. |
+ * |
+ * https://code.google.com/p/v8/issues/detail?id=3598 |
+ */ |
+ static void SetCodeRangeCreatedCallback(CodeRangeCreatedCallback callback); |
+ |
+ typedef void (__cdecl *CodeRangeDeletedCallback)(void*); |
+ |
+ /* Sets a callback that is invoked for every previously registered code range |
+ * when it is deleted. |
+ */ |
+ static void SetCodeRangeDeletedCallback(CodeRangeDeletedCallback callback); |
+#endif |
}; |
} // namespace gin |