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
path: root/src/env.h
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-08-10 01:51:51 +0300
committerMichaƫl Zasso <targos@protonmail.com>2019-08-15 10:50:22 +0300
commitc44ee7a14a400c8bdc80b31848234f5f55351690 (patch)
tree9d9b4def9ffddcf56057caabcdf2212c55cce92d /src/env.h
parent8dae8d12dff4c3b6454fb36c91cef2f9f8d663df (diff)
http2: only call into JS when necessary for session events
For some JS events, it only makes sense to call into JS when there are listeners for the event in question. The overhead is noticeable if a lot of these events are emitted during the lifetime of a session. To reduce this overhead, keep track of whether any/how many JS listeners are present, and if there are none, skip calls into JS altogether. This is part of performance improvements to mitigate CVE-2019-9513. PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/env.h')
-rw-r--r--src/env.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/env.h b/src/env.h
index ada3d4f9d8d..9a0f98e121b 100644
--- a/src/env.h
+++ b/src/env.h
@@ -230,6 +230,7 @@ constexpr size_t kFsStatsBufferLength =
V(family_string, "family") \
V(fatal_exception_string, "_fatalException") \
V(fd_string, "fd") \
+ V(fields_string, "fields") \
V(file_string, "file") \
V(fingerprint256_string, "fingerprint256") \
V(fingerprint_string, "fingerprint") \