Run microtasks after calling JS

This commit is contained in:
Alex Hultman 2019-03-01 19:04:13 +01:00
parent 42c66b2f00
commit 06e987db04

View File

@ -85,6 +85,9 @@ void Main(Local<Object> exports) {
/* I guess we store this statically */
isolate = exports->GetIsolate();
/* We want this */
isolate->SetMicrotasksPolicy(MicrotasksPolicy::kAuto);
/* Register our own nextTick handlers */
uWS::Loop::defaultLoop()->setPostHandler([](uWS::Loop *) {
processNextTickQueueImpl(isolate);