| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9121e94 commit b9136c0
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -124,6 +124,7 @@ | |||
| 124 | 124 | 'src/js_stream.cc', | |
| 125 | 125 | 'src/node.cc', | |
| 126 | 126 | 'src/node_buffer.cc', | |
| 127 | + 'src/node_config.cc', | ||
| 127 | 128 | 'src/node_constants.cc', | |
| 128 | 129 | 'src/node_contextify.cc', | |
| 129 | 130 | 'src/node_file.cc', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,36 @@ | |||
| 1 | + #include "node.h" | ||
| 2 | + #include "env.h" | ||
| 3 | + #include "env-inl.h" | ||
| 4 | + #include "util.h" | ||
| 5 | + #include "util-inl.h" | ||
| 6 | + | ||
| 7 | + | ||
| 8 | + namespace node { | ||
| 9 | + | ||
| 10 | + using v8::Context; | ||
| 11 | + using v8::Local; | ||
| 12 | + using v8::Object; | ||
| 13 | + using v8::Value; | ||
| 14 | + using v8::ReadOnly; | ||
| 15 | + | ||
| 16 | + // The config binding is used to provide an internal view of compile or runtime | ||
| 17 | + // config options that are required internally by lib/*.js code. This is an | ||
| 18 | + // alternative to dropping additional properties onto the process object as | ||
| 19 | + // has been the practice previously in node.cc. | ||
| 20 | + | ||
| 21 | + #define READONLY_BOOLEAN_PROPERTY(str) \ | ||
| 22 | + do { \ | ||
| 23 | + target->DefineOwnProperty(env->context(), \ | ||
| 24 | + OneByteString(env->isolate(), str), \ | ||
| 25 | + True(env->isolate()), ReadOnly).FromJust(); \ | ||
| 26 | + } while (0) | ||
| 27 | + | ||
| 28 | + void InitConfig(Local<Object> target, | ||
| 29 | + Local<Value> unused, | ||
| 30 | + Local<Context> context) { | ||
| 31 | + // Environment* env = Environment::GetCurrent(context); | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + } // namespace node | ||
| 35 | + | ||
| 36 | + NODE_MODULE_CONTEXT_AWARE_BUILTIN(config, node::InitConfig) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments