[Groonga-commit] nroonga/nroonga at 8c412ca [master] Fix using Nan::Callback

Back to archive index

abetomo null+****@clear*****
Thu Sep 7 17:28:32 JST 2017


abetomo	2017-09-07 17:28:32 +0900 (Thu, 07 Sep 2017)

  New Revision: 8c412cabcb1fcf3904d3f87d1dba887129306fdf
  https://github.com/nroonga/nroonga/commit/8c412cabcb1fcf3904d3f87d1dba887129306fdf

  Merged e41f6af: Merge pull request #17 from abetomo/fix_callback

  Message:
    Fix using Nan::Callback

  Modified files:
    src/nroonga.cc

  Modified: src/nroonga.cc (+3 -2)
===================================================================
--- src/nroonga.cc    2017-09-07 17:27:56 +0900 (4d893cb)
+++ src/nroonga.cc    2017-09-07 17:28:32 +0900 (3f27ab0)
@@ -119,8 +119,9 @@ void Database::CommandAfter(uv_work_t* req) {
     argv[1] = Nan::NewBuffer(baton->result, baton->result_length)
         .ToLocalChecked();
   }
-  Nan::New<v8::Function>(baton->callback)
-      ->Call(Nan::GetCurrentContext()->Global(), 2, argv);
+  Nan::Callback callback(Nan::New<v8::Function>(baton->callback));
+  callback.Call(2, argv);
+
   grn_ctx_fin(&baton->context);
   delete baton;
 }
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20170907/f50c54cf/attachment-0001.htm 



More information about the Groonga-commit mailing list
Back to archive index