Fix 0-length array bug

This commit is contained in:
Alex Hultman 2019-01-17 06:42:45 +01:00
parent 8e0860edcf
commit 04c8b5aba5
1 changed files with 2 additions and 3 deletions

View File

@ -12,8 +12,8 @@ struct HttpResponseWrapper {
}
// res.onData(JS function)
// res.onAborted
/* Takes nothing, returns nothing. Cb wants nothing returned. */
template <bool SSL>
static void res_onAborted(const FunctionCallbackInfo<Value> &args) {
/* This thing perfectly fits in with unique_function, and will Reset on destructor */
@ -22,8 +22,7 @@ struct HttpResponseWrapper {
getHttpResponse<SSL>(args)->onAborted([p = std::move(p)]() {
HandleScope hs(isolate);
Local<Value> argv[] = {};
Local<Function>::New(isolate, p)->Call(isolate->GetCurrentContext()->Global(), 0, argv);
Local<Function>::New(isolate, p)->Call(isolate->GetCurrentContext()->Global(), 0, nullptr);
});
args.GetReturnValue().Set(args.Holder());