Skip to content

Commit

Permalink
etw: use Isolate to SetJitCodeEventHandler
Browse files Browse the repository at this point in the history
PR-URL: node-forward/node#27
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Fedor Indutny <[email protected]>
  • Loading branch information
rvagg authored and bnoordhuis committed Oct 18, 2014
1 parent 05daf5f commit b2b59fe
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/node_win32_etw_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b2b59fe

Please sign in to comment.