node-inspector / v8-profiler

node bindings for the v8 profiler
BSD 2-Clause "Simplified" License
1.13k stars 134 forks source link

Support node 10 #123

Open roberttod opened 6 years ago

roberttod commented 6 years ago

v8::TryCatch has been removed in the v8 engine shipped with node 10 so node-pre-gyp fails in the compilation step. Not sure what the alternative is, but below is the line of code causing the issue. Seems like it would be a fairly simple fix (to someone more intimate with v8 than I am).

https://github.com/node-inspector/v8-profiler/blob/master/src/heap_profiler.cc#L16

hyj1991 commented 6 years ago

change v8::TryCatch to Nan::TryCatch will be ok

tlhunter commented 5 years ago

Other errors will appear after applying @hyj1991's suggestion:

../src/heap_graph_node.cc:69:24: error: no matching function for call to ‘v8::Object::Has(int32_t&)’
hyj1991 commented 5 years ago

@tlhunter

src/heap_graph_node.cc:69: change if (_cache->Has(_id)) { to if (_cache->Has(Nan::New<Number>(_id))) {

also you can try v8-profiler-next