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);