Skip to content

Commit 3e26be9

Browse files
committed
src: fix extra includes of "env.h" and "env-inl.h"
Due to how the Environment class is used throughout the codebase, there are a log of includes referencing eitehr env.h or env-inl.h. This commit cleans up the remaining extra includes of 'env.h' or 'env-inl.h' and adds forward declarations of the Environment class. PR-URL: #32293 Refs: #27531
1 parent 86f146a commit 3e26be9

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

src/node_crypto_common.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
55

6-
#include "env.h"
76
#include "node_crypto.h"
87
#include "v8.h"
98
#include <openssl/ssl.h>
@@ -13,6 +12,9 @@
1312
#include <unordered_map>
1413

1514
namespace node {
15+
16+
class Environment;
17+
1618
namespace crypto {
1719

1820
// OPENSSL_free is a macro, so we need a wrapper function.

src/node_http_common-inl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include "node_http_common.h"
55
#include "node.h"
66
#include "node_mem-inl.h"
7-
#include "env-inl.h"
87
#include "v8.h"
98

109
#include <algorithm>

src/node_sockaddr.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
55

6-
#include "env.h"
76
#include "memory_tracker.h"
87
#include "node.h"
98
#include "uv.h"
@@ -14,6 +13,8 @@
1413

1514
namespace node {
1615

16+
class Environment;
17+
1718
class SocketAddress : public MemoryRetainer {
1819
public:
1920
struct Hash {

src/stream_base-inl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include "stream_base.h"
77

88
#include "node.h"
9-
#include "env-inl.h"
109
#include "v8.h"
1110

1211
namespace node {

0 commit comments

Comments
 (0)