summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexandre Ferrando <alferpal@gmail.com>2019-11-07 20:34:36 +0100
committerAnna Henningsen <anna@addaleax.net>2019-11-28 23:21:08 +0100
commit7686b5a34f9146bb44919d1cd73214c2d86de44c (patch)
treea30035eb05b623487ec7f1e94245883edd88aaf6 /src
parentf5ef7cd22231987a73af9f02cc5f6c80b6dbbd9b (diff)
downloadandroid-node-v8-7686b5a34f9146bb44919d1cd73214c2d86de44c.tar.gz
android-node-v8-7686b5a34f9146bb44919d1cd73214c2d86de44c.tar.bz2
android-node-v8-7686b5a34f9146bb44919d1cd73214c2d86de44c.zip
src: cleanup unused headers
Node codebase has evolved a lot in the more than 10 years of its existence. As more features (and code) have been added, changed, removed, it's sometimes hard to keep track of what gets used and what not. This commits attempts to clean some of those potentially left-over headers using suggestions from include-what-you-use Refs: https://github.com/nodejs/node/issues/27531 PR-URL: https://github.com/nodejs/node/pull/30328 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/api/encoding.cc1
-rw-r--r--src/api/utils.cc2
-rw-r--r--src/async_wrap.cc1
-rw-r--r--src/connect_wrap.cc4
-rw-r--r--src/connect_wrap.h2
-rw-r--r--src/connection_wrap.h1
-rw-r--r--src/debug_utils.cc1
-rw-r--r--src/env.cc1
-rw-r--r--src/fs_event_wrap.cc1
-rw-r--r--src/handle_wrap.cc1
-rw-r--r--src/js_stream.cc1
-rw-r--r--src/js_stream.h1
-rw-r--r--src/module_wrap.h6
-rw-r--r--src/node_binding.h3
-rw-r--r--src/node_buffer.cc1
-rw-r--r--src/node_errors.h2
-rw-r--r--src/node_watchdog.h1
-rw-r--r--src/stream_wrap.h1
-rw-r--r--src/string_bytes.h2
-rw-r--r--src/string_decoder-inl.h1
-rw-r--r--src/tracing/agent.h6
-rw-r--r--src/udp_wrap.h1
22 files changed, 11 insertions, 30 deletions
diff --git a/src/api/encoding.cc b/src/api/encoding.cc
index 21d3275097..fa872f8b76 100644
--- a/src/api/encoding.cc
+++ b/src/api/encoding.cc
@@ -1,5 +1,4 @@
#include "node.h"
-#include "env-inl.h"
#include "string_bytes.h"
#include "util-inl.h"
#include "v8.h"
diff --git a/src/api/utils.cc b/src/api/utils.cc
index da7281a68f..f07f9bea23 100644
--- a/src/api/utils.cc
+++ b/src/api/utils.cc
@@ -1,6 +1,4 @@
#include "node.h"
-#include "node_internals.h"
-#include "util-inl.h"
#include <csignal>
diff --git a/src/async_wrap.cc b/src/async_wrap.cc
index 8410dd2e0d..58d89225e0 100644
--- a/src/async_wrap.cc
+++ b/src/async_wrap.cc
@@ -27,7 +27,6 @@
#include "util-inl.h"
#include "v8.h"
-#include "v8-profiler.h"
using v8::Context;
using v8::DontDelete;
diff --git a/src/connect_wrap.cc b/src/connect_wrap.cc
index dacdf72da7..e1d34c11a7 100644
--- a/src/connect_wrap.cc
+++ b/src/connect_wrap.cc
@@ -1,14 +1,12 @@
#include "connect_wrap.h"
-
-#include "env-inl.h"
#include "req_wrap-inl.h"
-#include "util-inl.h"
namespace node {
using v8::Local;
using v8::Object;
+class Environment;
ConnectWrap::ConnectWrap(Environment* env,
Local<Object> req_wrap_obj,
diff --git a/src/connect_wrap.h b/src/connect_wrap.h
index 88221b7746..eaa5330257 100644
--- a/src/connect_wrap.h
+++ b/src/connect_wrap.h
@@ -3,10 +3,8 @@
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
-#include "env.h"
#include "req_wrap-inl.h"
#include "async_wrap.h"
-#include "v8.h"
namespace node {
diff --git a/src/connection_wrap.h b/src/connection_wrap.h
index db74dc5df4..e91b2ab35b 100644
--- a/src/connection_wrap.h
+++ b/src/connection_wrap.h
@@ -4,7 +4,6 @@
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
#include "stream_wrap.h"
-#include "v8.h"
namespace node {
diff --git a/src/debug_utils.cc b/src/debug_utils.cc
index a55936f4e7..4e52feb69d 100644
--- a/src/debug_utils.cc
+++ b/src/debug_utils.cc
@@ -1,6 +1,5 @@
#include "debug_utils.h"
#include "env-inl.h"
-#include "util-inl.h"
#ifdef __POSIX__
#if defined(__linux__)
diff --git a/src/env.cc b/src/env.cc
index 9034c4e069..7f7c51c13c 100644
--- a/src/env.cc
+++ b/src/env.cc
@@ -7,7 +7,6 @@
#include "node_errors.h"
#include "node_file.h"
#include "node_internals.h"
-#include "node_native_module.h"
#include "node_options-inl.h"
#include "node_process.h"
#include "node_v8_platform-inl.h"
diff --git a/src/fs_event_wrap.cc b/src/fs_event_wrap.cc
index 5033f027b1..8a75f0557c 100644
--- a/src/fs_event_wrap.cc
+++ b/src/fs_event_wrap.cc
@@ -21,7 +21,6 @@
#include "async_wrap-inl.h"
#include "env-inl.h"
-#include "util-inl.h"
#include "node.h"
#include "handle_wrap.h"
#include "string_bytes.h"
diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc
index 198b0456e7..f5d622fc25 100644
--- a/src/handle_wrap.cc
+++ b/src/handle_wrap.cc
@@ -23,7 +23,6 @@
#include "async_wrap-inl.h"
#include "env-inl.h"
#include "util-inl.h"
-#include "node.h"
namespace node {
diff --git a/src/js_stream.cc b/src/js_stream.cc
index 23bdb9b489..a67fd37dbd 100644
--- a/src/js_stream.cc
+++ b/src/js_stream.cc
@@ -2,7 +2,6 @@
#include "async_wrap.h"
#include "env-inl.h"
-#include "node_buffer.h"
#include "node_errors.h"
#include "stream_base-inl.h"
#include "util-inl.h"
diff --git a/src/js_stream.h b/src/js_stream.h
index 460ac23bc9..d96b3d0062 100644
--- a/src/js_stream.h
+++ b/src/js_stream.h
@@ -5,7 +5,6 @@
#include "async_wrap.h"
#include "stream_base.h"
-#include "v8.h"
namespace node {
diff --git a/src/module_wrap.h b/src/module_wrap.h
index ef20d255e9..bee4000d16 100644
--- a/src/module_wrap.h
+++ b/src/module_wrap.h
@@ -6,10 +6,12 @@
#include <unordered_map>
#include <string>
#include <vector>
-#include "node_url.h"
-#include "base_object-inl.h"
+#include "base_object.h"
namespace node {
+
+class Environment;
+
namespace loader {
enum ScriptType : int {
diff --git a/src/node_binding.h b/src/node_binding.h
index dd94fab36a..42f3c5b8d0 100644
--- a/src/node_binding.h
+++ b/src/node_binding.h
@@ -10,9 +10,6 @@
#include "node.h"
#define NAPI_EXPERIMENTAL
#include "node_api.h"
-#include "util.h"
-#include "uv.h"
-#include "v8.h"
enum {
NM_F_BUILTIN = 1 << 0, // Unused.
diff --git a/src/node_buffer.cc b/src/node_buffer.cc
index d87d38334a..8641270eae 100644
--- a/src/node_buffer.cc
+++ b/src/node_buffer.cc
@@ -28,7 +28,6 @@
#include "string_bytes.h"
#include "string_search.h"
#include "util-inl.h"
-#include "v8-profiler.h"
#include "v8.h"
#include <cstring>
diff --git a/src/node_errors.h b/src/node_errors.h
index f6fca6c690..6080aa93db 100644
--- a/src/node_errors.h
+++ b/src/node_errors.h
@@ -3,8 +3,6 @@
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
-#include "node.h"
-#include "util.h"
#include "env.h"
#include "v8.h"
diff --git a/src/node_watchdog.h b/src/node_watchdog.h
index d26f022d84..0fc133a96c 100644
--- a/src/node_watchdog.h
+++ b/src/node_watchdog.h
@@ -24,7 +24,6 @@
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
-#include "v8.h"
#include "uv.h"
#include "node_mutex.h"
#include <vector>
diff --git a/src/stream_wrap.h b/src/stream_wrap.h
index 37f5af4606..816f557ee6 100644
--- a/src/stream_wrap.h
+++ b/src/stream_wrap.h
@@ -26,7 +26,6 @@
#include "stream_base.h"
#include "handle_wrap.h"
-#include "string_bytes.h"
#include "v8.h"
namespace node {
diff --git a/src/string_bytes.h b/src/string_bytes.h
index 6ffdc47db7..5ef05fc48c 100644
--- a/src/string_bytes.h
+++ b/src/string_bytes.h
@@ -27,7 +27,7 @@
// Decodes a v8::Local<v8::String> or Buffer to a raw char*
#include "v8.h"
-#include "env.h"
+#include "env-inl.h"
namespace node {
diff --git a/src/string_decoder-inl.h b/src/string_decoder-inl.h
index 8a04211906..e7c0abb515 100644
--- a/src/string_decoder-inl.h
+++ b/src/string_decoder-inl.h
@@ -4,7 +4,6 @@
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
#include "string_decoder.h"
-#include "util.h"
namespace node {
diff --git a/src/tracing/agent.h b/src/tracing/agent.h
index a129f954d7..7ee1b417c6 100644
--- a/src/tracing/agent.h
+++ b/src/tracing/agent.h
@@ -3,7 +3,6 @@
#include "libplatform/v8-tracing.h"
#include "uv.h"
-#include "v8.h"
#include "util.h"
#include "node_mutex.h"
@@ -12,6 +11,11 @@
#include <string>
#include <unordered_map>
+namespace v8 {
+class ConvertableToTraceFormat;
+class TracingController;
+} // namespace v8
+
namespace node {
namespace tracing {
diff --git a/src/udp_wrap.h b/src/udp_wrap.h
index 6375ac2d1b..2026dd1dee 100644
--- a/src/udp_wrap.h
+++ b/src/udp_wrap.h
@@ -24,7 +24,6 @@
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
-#include "async_wrap.h"
#include "handle_wrap.h"
#include "uv.h"
#include "v8.h"