mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
process: refactor global.queueMicrotask()
- Lazy load `async_hooks` in the implementation - Rename `process/next_tick.js` to `process/task_queues.js` and move the implementation of `global.queueMicrotask()` there since these methods are conceptually related to each other. - Move the bindings used by `global.queueMicrotask()` into `node_task_queue.cc` instead of the generic `node_util.cc` - Use `defineOperation` to define `global.queueMicrotask()` PR-URL: https://github.com/nodejs/node/pull/26523 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
cc2c07ce08
commit
8d669bbeb1
11 files changed
+92
-96
No files matched your search
@@ -13,7 +13,6 @@ using errors::TryCatchScope;
|
||||
using v8::Context;
|
||||
using v8::Exception;
|
||||
using v8::Function;
|
||||
using v8::FunctionCallbackInfo;
|
||||
using v8::HandleScope;
|
||||
using v8::Int32;
|
||||
using v8::Isolate;
|
||||
@@ -752,15 +751,4 @@ void FatalException(Isolate* isolate,
|
||||
}
|
||||
}
|
||||
|
||||
void FatalException(const FunctionCallbackInfo<Value>& args) {
|
||||
Isolate* isolate = args.GetIsolate();
|
||||
Environment* env = Environment::GetCurrent(isolate);
|
||||
if (env != nullptr && env->abort_on_uncaught_exception()) {
|
||||
Abort();
|
||||
}
|
||||
Local<Value> exception = args[0];
|
||||
Local<Message> message = Exception::CreateMessage(isolate, exception);
|
||||
FatalException(isolate, exception, message);
|
||||
}
|
||||
|
||||
} // namespace node
|
||||
Reference in new issue
Block a user