fix: diagnostic reporting capabilities in Node.js (#23126)

This commit is contained in:
Shelley Vohr 2020-04-16 14:07:00 -07:00 коммит произвёл GitHub
Родитель 826e749e2b
Коммит d0f19d8369
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 18 добавлений и 8 удалений

Просмотреть файл

@ -7,10 +7,10 @@ This adds GN build files for Node, so we don't have to build with GYP.
diff --git a/BUILD.gn b/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..22d119036d12c396af935fe85ae18751e6d80562
index 0000000000000000000000000000000000000000..2d8952a1d23af0ab4b3e5de0e56ec1e30c77dd71
--- /dev/null
+++ b/BUILD.gn
@@ -0,0 +1,360 @@
@@ -0,0 +1,376 @@
+import("//electron/build/asar.gni")
+import("//v8/gni/v8.gni")
+
@ -18,6 +18,9 @@ index 0000000000000000000000000000000000000000..22d119036d12c396af935fe85ae18751
+ # Enable the V8 inspector protocol for use with node.
+ node_enable_inspector = true
+
+ # Enable diagnostic reporting withing Node.js
+ node_report = true
+
+ # Build node with SSL support.
+ # The variable is called "openssl" for parity with node's GYP build.
+ node_use_openssl = true
@ -123,6 +126,11 @@ index 0000000000000000000000000000000000000000..22d119036d12c396af935fe85ae18751
+ } else {
+ defines += [ "NODE_USE_V8_PLATFORM=0" ]
+ }
+ if (node_report) {
+ defines += [ "NODE_REPORT=1" ]
+ } else {
+ defines += [ "NODE_REPORT=0" ]
+ }
+}
+
+config("node_lib_config") {
@ -254,6 +262,14 @@ index 0000000000000000000000000000000000000000..22d119036d12c396af935fe85ae18751
+ libs += [ "CoreFoundation.framework" ]
+ }
+
+ if (node_report) {
+ sources += [
+ "src/node_report.cc",
+ "src/node_report_module.cc",
+ "src/node_report_utils.cc",
+ ]
+ }
+
+ if (node_enable_inspector) {
+ sources += [
+ "src/inspector_agent.cc",

Просмотреть файл

@ -206,12 +206,6 @@
"parallel/test-zlib-unused-weak",
"pseudo-tty/test-set-raw-mode-reset-process-exit",
"pseudo-tty/test-set-raw-mode-reset-signal",
"report/test-report-config",
"report/test-report-getreport",
"report/test-report-signal",
"report/test-report-uncaught-exception",
"report/test-report-writereport",
"report/test-report-worker",
"sequential/test-child-process-execsync",
"sequential/test-cpu-prof-default",
"sequential/test-cpu-prof-dir-absolute",