From 457603e96194b4858ad715f9faacb3ad7fec7f35 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Wed, 19 Dec 2018 18:44:14 +0800 Subject: src: move process.nextTick and promise setup into node_task_queue.cc This patch: - Moves the process.nextTick and promise setup C++ code into node_task_queue.cc which is exposed as `internalBinding('task_queue')` - Makes `lib/internal/process/promises.js` and `lib/internal/process/next_tick.js` as side-effect-free as possible - Removes the bootstrapper object being passed into `bootstrap/node.js`, let `next_tick.js` and `promises.js` load whatever they need from `internalBinding('task_queue')` instead. - Rename `process._tickCallback` to `runNextTicks` internally for clarity but still expose it as `process._tickCallback`. PR-URL: https://github.com/nodejs/node/pull/25163 Refs: https://github.com/nodejs/node/issues/24961 Reviewed-By: Ruben Bridgewater Reviewed-By: Anatoli Papirovski --- src/env.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/env.h') diff --git a/src/env.h b/src/env.h index 934c160197..c999b258c5 100644 --- a/src/env.h +++ b/src/env.h @@ -358,7 +358,7 @@ constexpr size_t kFsStatsBufferLength = kFsStatsFieldsNumber * 2; V(performance_entry_template, v8::Function) \ V(pipe_constructor_template, v8::FunctionTemplate) \ V(process_object, v8::Object) \ - V(promise_handler_function, v8::Function) \ + V(promise_reject_callback, v8::Function) \ V(promise_wrap_template, v8::ObjectTemplate) \ V(sab_lifetimepartner_constructor_template, v8::FunctionTemplate) \ V(script_context_constructor_template, v8::FunctionTemplate) \ @@ -373,7 +373,7 @@ constexpr size_t kFsStatsBufferLength = kFsStatsFieldsNumber * 2; V(tty_constructor_template, v8::FunctionTemplate) \ V(udp_constructor_function, v8::Function) \ V(url_constructor_function, v8::Function) \ - V(write_wrap_template, v8::ObjectTemplate) \ + V(write_wrap_template, v8::ObjectTemplate) class Environment; -- cgit v1.2.3