TooTallNate / ref

Turn Buffer instances into "pointers"
http://tootallnate.github.com/ref
453 stars 141 forks source link

NAN 2.0 support #33

Closed unbornchikken closed 9 years ago

unbornchikken commented 9 years ago

NAN 2.0 support implemented, all test passed.

However it won't install under io.js 3.0 as a root (development project), because its weak (dev)dependency is still missing its NAN 2.0 support.

I think you should merge it ASAP, because node-ffi NAN 2.0 PR is blocked because of that. Unfortunately I don't have time to update weak.

TooTallNate commented 9 years ago

node-weak nan v2 update in https://github.com/TooTallNate/node-weak/pull/54, though with a breaking API change that we may need to tweak the tests to account for.

TooTallNate commented 9 years ago

Getting a segmentation fault on iojs v3 https://travis-ci.org/TooTallNate/ref/jobs/76015021

TooTallNate commented 9 years ago
Process 13763 stopped
* thread #1: tid = 0x1ffad, 0x00007fff961ccc82 libsystem_kernel.dylib`__kill + 10, name = 'npm', queue = 'com.apple.main-thread', stop reason = signal SIGSEGV
    frame #0: 0x00007fff961ccc82 libsystem_kernel.dylib`__kill + 10
libsystem_kernel.dylib`__kill:
->  0x7fff961ccc82 <+10>: jae    0x7fff961ccc8c            ; <+20>
    0x7fff961ccc84 <+12>: movq   %rax, %rdi
    0x7fff961ccc87 <+15>: jmp    0x7fff961c8c53            ; cerror_nocancel
    0x7fff961ccc8c <+20>: retq
(lldb) bt 1
* thread #1: tid = 0x1ffad, 0x00007fff961ccc82 libsystem_kernel.dylib`__kill + 10, name = 'npm', queue = 'com.apple.main-thread', stop reason = signal SIGSEGV
  * frame #0: 0x00007fff961ccc82 libsystem_kernel.dylib`__kill + 10
    frame #1: 0x000000010068f2ab node`uv_kill + 9
    frame #2: 0x0000000100620e30 node`node::Kill(v8::FunctionCallbackInfo<v8::Value> const&) + 175
    frame #3: 0x000000010017b24e node`v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) + 158
    frame #4: 0x000000010019e66c node`v8::internal::MaybeHandle<v8::internal::Object> v8::internal::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>&) + 1084
    frame #5: 0x00000001001a103d node`v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) + 61
    frame #6: 0x00003a4851a060bb
    frame #7: 0x00003a4851cf3925
    frame #8: 0x00003a4851cf34de
    frame #9: 0x00003a4851a7f092
    frame #10: 0x00003a4851a7eadb
    frame #11: 0x00003a4851a19455
    frame #12: 0x00003a4851cf3354
    frame #13: 0x00003a4851a7f092
    frame #14: 0x00003a4851a7eadb
    frame #15: 0x00003a4851a19455
    frame #16: 0x00003a4851cf30e8
    frame #17: 0x00003a4851cf2e59
    frame #18: 0x00003a4851a19c7d
    frame #19: 0x00003a4851a189e2
    frame #20: 0x00000001002b705c node`v8::internal::Invoke(bool, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) + 732
    frame #21: 0x0000000100165424 node`v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) + 276
    frame #22: 0x000000010061584d node`node::AsyncWrap::MakeCallback(v8::Local<v8::Function>, int, v8::Local<v8::Value>*) + 653
    frame #23: 0x0000000100652182 node`node::ProcessWrap::OnExit(uv_process_s*, long long, int) + 260
    frame #24: 0x000000010068f216 node`uv__chld + 338
    frame #25: 0x0000000100690291 node`uv__signal_event + 133
    frame #26: 0x0000000100697c11 node`uv__io_poll + 1581
    frame #27: 0x000000010068a0d4 node`uv_run + 335
    frame #28: 0x0000000100626aea node`node::Start(int, char**) + 422
    frame #29: 0x0000000100001234 node`start + 52
unbornchikken commented 9 years ago

Yeah, I've accidentally tested it on io.js 2.5 instead of 3.0. Lemme fix this. @kkoopa thanks for the review, I'm updating those. Please note that it is extremely hard to convert stuff to the new api, because there is no guide available, I'm using wild guesses depending on that the autocomplete gives. Your help and suggestions are really needed everywhere, thanks again.