Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2020-04-21 21:57:16 +0300
committerJoyee Cheung <joyeec9h3@gmail.com>2020-07-18 06:23:21 +0300
commit7a447bcd54f5e153d14da377963541349d7bda09 (patch)
treef2a91589e92c88d10c2a73919847a5c056599089 /src/node_errors.cc
parentb1c3909bd766327a569c2e4279a4670454f3f9db (diff)
src: snapshot node
This runs `lib/internal/bootstrap/node.js` before creating the builtin snapshot and deserialize the loaders from the snapshot in deserialization mode. PR-URL: https://github.com/nodejs/node/pull/32984 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Diffstat (limited to 'src/node_errors.cc')
-rw-r--r--src/node_errors.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/node_errors.cc b/src/node_errors.cc
index 813bc3fd8e0..dc6d20b500c 100644
--- a/src/node_errors.cc
+++ b/src/node_errors.cc
@@ -3,9 +3,10 @@
#include "debug_utils-inl.h"
#include "node_errors.h"
+#include "node_external_reference.h"
#include "node_internals.h"
-#include "node_report.h"
#include "node_process.h"
+#include "node_report.h"
#include "node_v8_platform-inl.h"
#include "util-inl.h"
@@ -852,6 +853,14 @@ static void TriggerUncaughtException(const FunctionCallbackInfo<Value>& args) {
errors::TriggerUncaughtException(isolate, exception, message, from_promise);
}
+void RegisterExternalReferences(ExternalReferenceRegistry* registry) {
+ registry->Register(SetPrepareStackTraceCallback);
+ registry->Register(EnableSourceMaps);
+ registry->Register(SetEnhanceStackForFatalException);
+ registry->Register(NoSideEffectsToString);
+ registry->Register(TriggerUncaughtException);
+}
+
void Initialize(Local<Object> target,
Local<Value> unused,
Local<Context> context,
@@ -1023,3 +1032,4 @@ void TriggerUncaughtException(Isolate* isolate, const v8::TryCatch& try_catch) {
} // namespace node
NODE_MODULE_CONTEXT_AWARE_INTERNAL(errors, node::errors::Initialize)
+NODE_MODULE_EXTERNAL_REFERENCE(errors, node::errors::RegisterExternalReferences)