[node] switch to NodeRequest member fn callback

For (hopefully) better performance than creating a new v8::Context to
wrap each callback while still avoiding leaking memory with v8::FunctionTemplate.

Adds a JavaScript shim in front of module.exports.Map to wrap the
req.respond API internally and preserve the public callback-passing
API, while still exporting the correct prototype.
This commit is contained in:
Thiago Marcos P. Santos
2016-06-29 21:35:24 +03:00
committed by Mike Morris
parent d6f667a5e7
commit edec56e6c5
8 changed files with 83 additions and 16 deletions

View File

@@ -23,7 +23,7 @@ public:
static Nan::Persistent<v8::Function> constructor;
static NAN_MODULE_INIT(Init);
static void Init(v8::Local<v8::Object> exports);
static void New(const Nan::FunctionCallbackInfo<v8::Value>&);
static void Load(const Nan::FunctionCallbackInfo<v8::Value>&);