Skip to content

Commit

Permalink
Merge pull request #5 from hyj1991/master
Browse files Browse the repository at this point in the history
fix: takeSnapshot segfaults on Node 8 (node-inspector#112)
  • Loading branch information
carlevans719 authored Sep 19, 2017
2 parents 7b21140 + ff4f6fe commit 609607b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/heap_profiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ namespace nodex {
Local<String> title = info[0]->ToString();
#endif

#if (NODE_MODULE_VERSION > 0x002C)
#if (NODE_MODULE_VERSION > 0x0038)
const HeapSnapshot* snapshot = v8::Isolate::GetCurrent()->GetHeapProfiler()->TakeHeapSnapshot();
#elif (NODE_MODULE_VERSION > 0x002C)
const HeapSnapshot* snapshot = v8::Isolate::GetCurrent()->GetHeapProfiler()->TakeHeapSnapshot(control);
#elif (NODE_MODULE_VERSION > 0x000B)
const HeapSnapshot* snapshot = v8::Isolate::GetCurrent()->GetHeapProfiler()->TakeHeapSnapshot(title, control);
Expand Down

0 comments on commit 609607b

Please # to comment.