Skip to content

Commit cde0e5f

Browse files
addaleaxtargos
authored andcommitted
src: reduce unnecessary includes
A forward declaration suffices and means that the tracing agent header and its dependencies don’t need to be included in nearly every Node.js file. PR-URL: #21867 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
1 parent ec9d529 commit cde0e5f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/env-inl.h

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#include "v8.h"
3333
#include "node_perf_common.h"
3434
#include "node_context_data.h"
35-
#include "tracing/agent.h"
3635
#include "node_worker.h"
3736

3837
#include <stddef.h>

src/env.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#include "v8.h"
3636
#include "node.h"
3737
#include "node_http2_state.h"
38-
#include "tracing/agent.h"
3938

4039
#include <list>
4140
#include <stdint.h>
@@ -55,6 +54,10 @@ namespace performance {
5554
class performance_state;
5655
}
5756

57+
namespace tracing {
58+
class Agent;
59+
}
60+
5861
namespace worker {
5962
class Worker;
6063
}

0 commit comments

Comments
 (0)