From b2b59febe8bf1d411e7d8faacd23789784aac1f0 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Sat, 18 Oct 2014 23:25:10 +1100 Subject: [PATCH] etw: use Isolate to SetJitCodeEventHandler PR-URL: https://github.com/node-forward/node/pull/27 Reviewed-By: Ben Noordhuis Reviewed-By: Fedor Indutny --- src/node_win32_etw_provider.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/node_win32_etw_provider.cc b/src/node_win32_etw_provider.cc index 849ea764e4..c228dd884c 100644 --- a/src/node_win32_etw_provider.cc +++ b/src/node_win32_etw_provider.cc @@ -127,10 +127,13 @@ void CodeAddressNotification(const JitCodeEvent* jevent) { void etw_events_change_async(uv_async_t* handle) { if (events_enabled > 0) { NODE_V8SYMBOL_RESET(); - V8::SetJitCodeEventHandler(v8::kJitCodeEventEnumExisting, - CodeAddressNotification); + v8::Isolate::GetCurrent()->SetJitCodeEventHandler( + v8::kJitCodeEventEnumExisting, + CodeAddressNotification); } else { - V8::SetJitCodeEventHandler(v8::kJitCodeEventDefault, NULL); + v8::Isolate::GetCurrent()->SetJitCodeEventHandler( + v8::kJitCodeEventDefault, + NULL); } } @@ -196,7 +199,9 @@ void shutdown_etw() { } events_enabled = 0; - V8::SetJitCodeEventHandler(v8::kJitCodeEventDefault, NULL); + v8::Isolate::GetCurrent()->SetJitCodeEventHandler( + v8::kJitCodeEventDefault, + NULL); if (advapi) { FreeLibrary(advapi);