Browse Source

etw: use Isolate to SetJitCodeEventHandler

PR-URL: https://github.com/node-forward/node/pull/27
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
archived-io.js-v0.12
Rod Vagg 10 years ago
committed by Ben Noordhuis
parent
commit
b2b59febe8
  1. 13
      src/node_win32_etw_provider.cc

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

Loading…
Cancel
Save