Some clean-ups
This commit is contained in:
parent
ec86c1ce11
commit
3860b922c7
|
@ -4,17 +4,16 @@
|
||||||
#include <v8.h>
|
#include <v8.h>
|
||||||
using namespace v8;
|
using namespace v8;
|
||||||
|
|
||||||
/* Unfortunately we have to depend on Node.js garbage */
|
/* Unfortunately we _have_ to depend on Node.js crap */
|
||||||
#include <node.h>
|
#include <node.h>
|
||||||
|
|
||||||
/* This is a very hot function ruined by illiteracy */
|
|
||||||
MaybeLocal<Value> CallJS(Isolate *isolate, Local<Function> f, int argc, Local<Value> *argv) {
|
MaybeLocal<Value> CallJS(Isolate *isolate, Local<Function> f, int argc, Local<Value> *argv) {
|
||||||
if (!experimental_fastcall) {
|
if (experimental_fastcall) {
|
||||||
/* Node.js is built by incompetent people who should never have touched a computer in the first place */
|
/* Fast path */
|
||||||
return node::MakeCallback(isolate, isolate->GetCurrentContext()->Global(), f, argc, argv, {0, 0});
|
|
||||||
} else {
|
|
||||||
/* Google LLC don't hire incompetent people to work on their stuff */
|
|
||||||
return f->Call(isolate->GetCurrentContext(), isolate->GetCurrentContext()->Global(), argc, argv);
|
return f->Call(isolate->GetCurrentContext(), isolate->GetCurrentContext()->Global(), argc, argv);
|
||||||
|
} else {
|
||||||
|
/* Slow path */
|
||||||
|
return node::MakeCallback(isolate, isolate->GetCurrentContext()->Global(), f, argc, argv, {0, 0});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue