-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: move symbols binding into node_symbols.cc
PR-URL: #25163 Refs: #24961 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
- Loading branch information
1 parent
d7bc03e
commit fa74cd3
Showing
3 changed files
with
30 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include "env-inl.h" | ||
#include "node_binding.h" | ||
|
||
namespace node { | ||
|
||
using v8::Context; | ||
using v8::Local; | ||
using v8::Object; | ||
using v8::Value; | ||
|
||
namespace symbols { | ||
|
||
static void Initialize(Local<Object> target, | ||
Local<Value> unused, | ||
Local<Context> context, | ||
void* priv) { | ||
Environment* env = Environment::GetCurrent(context); | ||
#define V(PropertyName, StringValue) \ | ||
target \ | ||
->Set(env->context(), env->PropertyName()->Name(), env->PropertyName()) \ | ||
.FromJust(); | ||
PER_ISOLATE_SYMBOL_PROPERTIES(V) | ||
#undef V | ||
} | ||
|
||
} // namespace symbols | ||
} // namespace node | ||
|
||
NODE_MODULE_CONTEXT_AWARE_INTERNAL(symbols, node::symbols::Initialize) |