diff --git a/src/Utilities.h b/src/Utilities.h index 999712c..036567b 100644 --- a/src/Utilities.h +++ b/src/Utilities.h @@ -4,17 +4,16 @@ #include using namespace v8; -/* Unfortunately we have to depend on Node.js garbage */ +/* Unfortunately we _have_ to depend on Node.js crap */ #include -/* This is a very hot function ruined by illiteracy */ MaybeLocal CallJS(Isolate *isolate, Local f, int argc, Local *argv) { - if (!experimental_fastcall) { - /* Node.js is built by incompetent people who should never have touched a computer in the first place */ - 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 */ + if (experimental_fastcall) { + /* Fast path */ 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}); } }