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>2019-04-21 07:47:32 +0300
committerJoyee Cheung <joyeec9h3@gmail.com>2020-07-18 06:15:57 +0300
commit1faf6f459f220bb67866f12b30626ef7856876ee (patch)
treed1308396c07e8289f8d987178c294141f4687889 /src/util.h
parentf04538761f5bb3c334d3c8d16d093ac0916ff3bc (diff)
src: snapshot Environment upon instantiation
This includes the initial Environment (without running bootstrap scripts) into the builtin snapshot 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/util.h')
-rw-r--r--src/util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 8b8a63adca9..71f3886365e 100644
--- a/src/util.h
+++ b/src/util.h
@@ -805,6 +805,7 @@ std::unique_ptr<T> static_unique_pointer_cast(std::unique_ptr<U>&& ptr) {
return std::unique_ptr<T>(static_cast<T*>(ptr.release()));
}
+#define MAYBE_FIELD_PTR(ptr, field) ptr == nullptr ? nullptr : &(ptr->field)
} // namespace node
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS