Merge pull request #6707 from electron/auto-run-micro-tasks
Revert Node's call of SetAutorunMicrotasks(false)
This commit is contained in:
commit
230943d425
1 changed files with 5 additions and 0 deletions
|
@ -173,6 +173,11 @@ node::Environment* NodeBindings::CreateEnvironment(
|
||||||
context->GetIsolate(), uv_default_loop(), context,
|
context->GetIsolate(), uv_default_loop(), context,
|
||||||
args.size(), c_argv.get(), 0, nullptr);
|
args.size(), c_argv.get(), 0, nullptr);
|
||||||
|
|
||||||
|
// Node turns off AutorunMicrotasks, but we need it in web pages to match the
|
||||||
|
// behavior of Chrome.
|
||||||
|
if (!is_browser_)
|
||||||
|
context->GetIsolate()->SetAutorunMicrotasks(true);
|
||||||
|
|
||||||
mate::Dictionary process(context->GetIsolate(), env->process_object());
|
mate::Dictionary process(context->GetIsolate(), env->process_object());
|
||||||
process.Set("type", process_type);
|
process.Set("type", process_type);
|
||||||
process.Set("resourcesPath", resources_path);
|
process.Set("resourcesPath", resources_path);
|
||||||
|
|
Loading…
Reference in a new issue