Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 733af61

Browse filesBrowse files
joyeecheungaddaleax
authored andcommitted
src: move symbols binding into node_symbols.cc
PR-URL: #25163 Refs: #24961 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
1 parent 0b1a9aa commit 733af61
Copy full SHA for 733af61

File tree

Expand file treeCollapse file tree

3 files changed

+30
-18
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+30
-18
lines changed
Open diff view settings
Collapse file

‎node.gyp‎

Copy file name to clipboardExpand all lines: node.gyp
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@
373373
'src/node_process.cc',
374374
'src/node_serdes.cc',
375375
'src/node_stat_watcher.cc',
376+
'src/node_symbols.cc',
376377
'src/node_trace_events.cc',
377378
'src/node_types.cc',
378379
'src/node_url.cc',
Collapse file

‎src/bootstrapper.cc‎

Copy file name to clipboardExpand all lines: src/bootstrapper.cc
-18Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -135,22 +135,4 @@ void SetupBootstrapObject(Environment* env,
135135
}
136136
#undef BOOTSTRAP_METHOD
137137

138-
namespace symbols {
139-
140-
void Initialize(Local<Object> target,
141-
Local<Value> unused,
142-
Local<Context> context,
143-
void* priv) {
144-
Environment* env = Environment::GetCurrent(context);
145-
#define V(PropertyName, StringValue) \
146-
target->Set(env->context(), \
147-
env->PropertyName()->Name(), \
148-
env->PropertyName()).FromJust();
149-
PER_ISOLATE_SYMBOL_PROPERTIES(V)
150-
#undef V
151-
}
152-
153-
} // namespace symbols
154138
} // namespace node
155-
156-
NODE_MODULE_CONTEXT_AWARE_INTERNAL(symbols, node::symbols::Initialize)
Collapse file

‎src/node_symbols.cc‎

Copy file name to clipboard
+29Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#include "env-inl.h"
2+
#include "node_binding.h"
3+
4+
namespace node {
5+
6+
using v8::Context;
7+
using v8::Local;
8+
using v8::Object;
9+
using v8::Value;
10+
11+
namespace symbols {
12+
13+
static void Initialize(Local<Object> target,
14+
Local<Value> unused,
15+
Local<Context> context,
16+
void* priv) {
17+
Environment* env = Environment::GetCurrent(context);
18+
#define V(PropertyName, StringValue) \
19+
target \
20+
->Set(env->context(), env->PropertyName()->Name(), env->PropertyName()) \
21+
.FromJust();
22+
PER_ISOLATE_SYMBOL_PROPERTIES(V)
23+
#undef V
24+
}
25+
26+
} // namespace symbols
27+
} // namespace node
28+
29+
NODE_MODULE_CONTEXT_AWARE_INTERNAL(symbols, node::symbols::Initialize)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.