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-03-08 11:34:46 +0300
committerJoyee Cheung <joyeec9h3@gmail.com>2019-03-12 02:03:53 +0300
commit0a3bcdd26108bb29045a557bc555c3a53c244a55 (patch)
treeb510257ef03b0ad2d04ed9c597677b39bce0405c /src/node_binding.cc
parent963ee0bc736008e01d80fbad973f80fd021735fd (diff)
src: refactor coverage connection
- Refactor the C++ class to be resuable for other types of profiles - Move the try-catch block around coverage collection callback to be inside the callback to silence potential JSON or write errors. - Use Function::Call instead of MakeCallback to call the coverage message callback since it does not actually need async hook handling. This way we no longer needs to disable the async hooks when writing the coverage results. - Renames `lib/internal/coverage-gen/with_profiler.js` to `lib/internal/profiler.js` because it is now the only way to generate coverage. PR-URL: https://github.com/nodejs/node/pull/26513 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Coe <bencoe@gmail.com>
Diffstat (limited to 'src/node_binding.cc')
-rw-r--r--src/node_binding.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/node_binding.cc b/src/node_binding.cc
index 7b87ba6bffd..9599cf956b9 100644
--- a/src/node_binding.cc
+++ b/src/node_binding.cc
@@ -23,9 +23,9 @@
#endif
#if HAVE_INSPECTOR
-#define NODE_BUILTIN_COVERAGE_MODULES(V) V(coverage)
+#define NODE_BUILTIN_PROFILER_MODULES(V) V(profiler)
#else
-#define NODE_BUILTIN_COVERAGE_MODULES(V)
+#define NODE_BUILTIN_PROFILER_MODULES(V)
#endif
// A list of built-in modules. In order to do module registration
@@ -85,7 +85,7 @@
NODE_BUILTIN_OPENSSL_MODULES(V) \
NODE_BUILTIN_ICU_MODULES(V) \
NODE_BUILTIN_REPORT_MODULES(V) \
- NODE_BUILTIN_COVERAGE_MODULES(V)
+ NODE_BUILTIN_PROFILER_MODULES(V)
// This is used to load built-in modules. Instead of using
// __attribute__((constructor)), we call the _register_<modname>