| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #include "AppRuntime.h" | ||
| #include <napi/env.h> | ||
|
|
||
| namespace Babylon | ||
| { | ||
| void AppRuntime::RunEnvironmentTier(const char*) | ||
| { | ||
| // All Hermes runtime + napi_env setup is encapsulated inside the napi | ||
| // library's env_hermes.cc (see Napi::Attach/Detach). Keeping the | ||
| // engine-specific machinery there avoids dragging Hermes headers into | ||
| // AppRuntime's translation unit. | ||
| Napi::Env env = Napi::Attach(); | ||
|
|
||
| Run(env); | ||
|
|
||
| Napi::Detach(env); | ||
| } | ||
|
|
||
| void AppRuntime::DrainMicrotasks(Napi::Env env) | ||
| { | ||
| // Hermes does not auto-drain its job queue. Promise continuations, | ||
| // queueMicrotask callbacks, and pending NAPI finalizers all run via | ||
| // Runtime::drainJobs(). We pump it after each user callback so async | ||
| // code (Promises, Mocha's async tests, polyfill schedulers, etc.) | ||
| // observes the same "between turns" semantics it gets on V8/Chakra. | ||
| Napi::DrainJobs(env); | ||
| } | ||
| } |
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.