Fix 0-length array bug
This commit is contained in:
parent
8e0860edcf
commit
04c8b5aba5
@ -12,8 +12,8 @@ struct HttpResponseWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// res.onData(JS function)
|
// res.onData(JS function)
|
||||||
// res.onAborted
|
|
||||||
|
|
||||||
|
/* Takes nothing, returns nothing. Cb wants nothing returned. */
|
||||||
template <bool SSL>
|
template <bool SSL>
|
||||||
static void res_onAborted(const FunctionCallbackInfo<Value> &args) {
|
static void res_onAborted(const FunctionCallbackInfo<Value> &args) {
|
||||||
/* This thing perfectly fits in with unique_function, and will Reset on destructor */
|
/* 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)]() {
|
getHttpResponse<SSL>(args)->onAborted([p = std::move(p)]() {
|
||||||
HandleScope hs(isolate);
|
HandleScope hs(isolate);
|
||||||
|
|
||||||
Local<Value> argv[] = {};
|
Local<Function>::New(isolate, p)->Call(isolate->GetCurrentContext()->Global(), 0, nullptr);
|
||||||
Local<Function>::New(isolate, p)->Call(isolate->GetCurrentContext()->Global(), 0, argv);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
args.GetReturnValue().Set(args.Holder());
|
args.GetReturnValue().Set(args.Holder());
|
||||||
|
Loading…
Reference in New Issue
Block a user