Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
src: cleanup remove use of NODE_WANT_INTERNALS
  • Loading branch information
Christopher J. Brody committed Dec 6, 2016
commit 500d1ccc46e22ef4ae0fe150bf77fadd843a9214
2 changes: 0 additions & 2 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@
'defines': [
'NODE_ARCH="<(target_arch)"',
'NODE_PLATFORM="<(OS)"',
'NODE_WANT_INTERNALS=1',
# Warn when using deprecated V8 APIs.
'V8_DEPRECATION_WARNINGS=1',
],
Expand Down Expand Up @@ -887,7 +886,6 @@
'GTEST_DONT_DEFINE_ASSERT_LE=1',
'GTEST_DONT_DEFINE_ASSERT_LT=1',
'GTEST_DONT_DEFINE_ASSERT_NE=1',
'NODE_WANT_INTERNALS=1',
],
'sources': [
'test/cctest/util.cc',
Expand Down
9 changes: 0 additions & 9 deletions src/async-wrap-inl.h
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
#ifndef SRC_ASYNC_WRAP_INL_H_
#define SRC_ASYNC_WRAP_INL_H_

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "async-wrap.h"
#include "base-object.h"
#include "base-object-inl.h"
#include "env.h"
#include "env-inl.h"
#include "node_internals.h"
#include "util.h"
#include "util-inl.h"
#include "v8.h"

namespace node {

Expand Down Expand Up @@ -51,6 +44,4 @@ inline v8::Local<v8::Value> AsyncWrap::MakeCallback(

} // namespace node

#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#endif // SRC_ASYNC_WRAP_INL_H_
6 changes: 2 additions & 4 deletions src/async-wrap.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#ifndef SRC_ASYNC_WRAP_H_
#define SRC_ASYNC_WRAP_H_

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "base-object.h"

#include "uv.h"

#include "v8.h"

#include <stdint.h>
Expand Down Expand Up @@ -97,6 +97,4 @@ void LoadAsyncWrapperInfo(Environment* env);

} // namespace node

#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#endif // SRC_ASYNC_WRAP_H_
5 changes: 0 additions & 5 deletions src/base-object-inl.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#ifndef SRC_BASE_OBJECT_INL_H_
#define SRC_BASE_OBJECT_INL_H_

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "base-object.h"
#include "env.h"
#include "env-inl.h"
#include "util.h"
#include "util-inl.h"
#include "v8.h"

namespace node {

Expand Down Expand Up @@ -70,6 +67,4 @@ inline void BaseObject::ClearWeak() {

} // namespace node

#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#endif // SRC_BASE_OBJECT_INL_H_
4 changes: 0 additions & 4 deletions src/base-object.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef SRC_BASE_OBJECT_H_
#define SRC_BASE_OBJECT_H_

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "v8.h"

namespace node {
Expand Down Expand Up @@ -50,6 +48,4 @@ class BaseObject {

} // namespace node

#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#endif // SRC_BASE_OBJECT_H_
7 changes: 2 additions & 5 deletions src/base64.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#ifndef SRC_BASE64_H_
#define SRC_BASE64_H_

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "util.h"

#include <stddef.h>

namespace node {

//// Base 64 ////
#define base64_encoded_size(size) ((size + 2 - ((size + 2) % 3)) / 3 * 4)

Expand Down Expand Up @@ -186,9 +185,7 @@ static size_t base64_encode(const char* src,

return dlen;
}
} // namespace node


#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
} // namespace node

#endif // SRC_BASE64_H_
6 changes: 0 additions & 6 deletions src/connect_wrap.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
#ifndef SRC_CONNECT_WRAP_H_
#define SRC_CONNECT_WRAP_H_

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "env.h"
#include "req-wrap.h"
#include "async-wrap.h"
#include "v8.h"

namespace node {

Expand All @@ -21,6 +17,4 @@ class ConnectWrap : public ReqWrap<uv_connect_t> {

} // namespace node

#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#endif // SRC_CONNECT_WRAP_H_
7 changes: 0 additions & 7 deletions src/connection_wrap.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
#ifndef SRC_CONNECTION_WRAP_H_
#define SRC_CONNECTION_WRAP_H_

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "env.h"
#include "stream_wrap.h"
#include "v8.h"

namespace node {

Expand All @@ -30,9 +26,6 @@ class ConnectionWrap : public StreamWrap {
UVType handle_;
};


} // namespace node

#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#endif // SRC_CONNECTION_WRAP_H_
9 changes: 2 additions & 7 deletions src/debug-agent.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@
#ifndef SRC_DEBUG_AGENT_H_
#define SRC_DEBUG_AGENT_H_

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "node_mutex.h"
#include "util.h"
#include "util-inl.h"
#include "uv.h"

#include "v8.h"
#include "v8-debug.h"

Expand Down Expand Up @@ -135,8 +131,7 @@ class Agent {
};

} // namespace debugger
} // namespace node

#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
} // namespace node

#endif // SRC_DEBUG_AGENT_H_
6 changes: 2 additions & 4 deletions src/env-inl.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#ifndef SRC_ENV_INL_H_
#define SRC_ENV_INL_H_

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "env.h"
#include "node.h"
#include "util.h"
#include "util-inl.h"

#include "uv.h"

#include "v8.h"

#include <stddef.h>
Expand Down Expand Up @@ -496,6 +496,4 @@ inline v8::Local<v8::Object> Environment::NewInternalFieldObject() {

} // namespace node

#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#endif // SRC_ENV_INL_H_
6 changes: 2 additions & 4 deletions src/env.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef SRC_ENV_H_
#define SRC_ENV_H_

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "ares.h"
#include "debug-agent.h"
#if HAVE_INSPECTOR
Expand All @@ -12,7 +10,9 @@
#include "req-wrap.h"
#include "tree.h"
#include "util.h"

#include "uv.h"

#include "v8.h"

#include <stdint.h>
Expand Down Expand Up @@ -598,6 +598,4 @@ class Environment {

} // namespace node

#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#endif // SRC_ENV_H_
7 changes: 1 addition & 6 deletions src/handle_wrap.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#ifndef SRC_HANDLE_WRAP_H_
#define SRC_HANDLE_WRAP_H_

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "async-wrap.h"
#include "util.h"

#include "uv.h"
#include "v8.h"

namespace node {

Expand Down Expand Up @@ -66,9 +64,6 @@ class HandleWrap : public AsyncWrap {
uv_handle_t* const handle_;
};


} // namespace node

#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#endif // SRC_HANDLE_WRAP_H_
1 change: 0 additions & 1 deletion src/inspector_socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include "util.h"
#include "util-inl.h"

#define NODE_WANT_INTERNALS 1
#include "base64.h"

#include "openssl/sha.h" // Sha-1 hash
Expand Down
7 changes: 0 additions & 7 deletions src/js_stream.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
#ifndef SRC_JS_STREAM_H_
#define SRC_JS_STREAM_H_

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "async-wrap.h"
#include "env.h"
#include "stream_base.h"
#include "v8.h"

namespace node {

Expand Down Expand Up @@ -50,6 +45,4 @@ class JSStream : public AsyncWrap, public StreamBase {

} // namespace node

#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#endif // SRC_JS_STREAM_H_
1 change: 0 additions & 1 deletion src/node_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define SRC_NODE_BUFFER_H_

#include "node.h"
#include "v8.h"

namespace node {

Expand Down
5 changes: 0 additions & 5 deletions src/node_constants.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#ifndef SRC_NODE_CONSTANTS_H_
#define SRC_NODE_CONSTANTS_H_

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "node.h"
#include "v8.h"

#if HAVE_OPENSSL
Expand Down Expand Up @@ -39,6 +36,4 @@ extern const char* default_cipher_list;
void DefineConstants(v8::Isolate* isolate, v8::Local<v8::Object> target);
} // namespace node

#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#endif // SRC_NODE_CONSTANTS_H_
9 changes: 1 addition & 8 deletions src/node_counters.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#ifndef SRC_NODE_COUNTERS_H_
#define SRC_NODE_COUNTERS_H_

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "node.h"
#include "env.h"

#ifdef HAVE_PERFCTR
#include "node_win32_perfctr_provider.h"
Expand All @@ -23,16 +21,11 @@
#define NODE_COUNT_SERVER_CONN_OPEN() do { } while (false)
#endif

#include "v8.h"
#include "env.h"

namespace node {

void InitPerfCounters(Environment* env, v8::Local<v8::Object> target);
void TermPerfCounters(v8::Local<v8::Object> target);

} // namespace node

#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#endif // SRC_NODE_COUNTERS_H_
6 changes: 0 additions & 6 deletions src/node_dtrace.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
#ifndef SRC_NODE_DTRACE_H_
#define SRC_NODE_DTRACE_H_

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "node.h"
#include "v8.h"
#include "env.h"

extern "C" {
/*
Expand Down Expand Up @@ -60,6 +56,4 @@ void InitDTrace(Environment* env, v8::Local<v8::Object> target);

} // namespace node

#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#endif // SRC_NODE_DTRACE_H_
5 changes: 0 additions & 5 deletions src/node_file.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#ifndef SRC_NODE_FILE_H_
#define SRC_NODE_FILE_H_

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "node.h"
#include "v8.h"

namespace node {
Expand All @@ -12,6 +9,4 @@ void InitFs(v8::Local<v8::Object> target);

} // namespace node

#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#endif // SRC_NODE_FILE_H_
4 changes: 0 additions & 4 deletions src/node_http_parser.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef SRC_NODE_HTTP_PARSER_H_
#define SRC_NODE_HTTP_PARSER_H_

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "v8.h"

#include "http_parser.h"
Expand All @@ -13,6 +11,4 @@ void InitHttpParser(v8::Local<v8::Object> target);

} // namespace node

#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#endif // SRC_NODE_HTTP_PARSER_H_
Loading