summaryrefslogtreecommitdiff
path: root/src/node_internals.h
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2018-12-16 01:32:39 +0800
committerRich Trott <rtrott@gmail.com>2018-12-17 16:21:25 -0800
commit19a920564585f1c223fb137408d615932609da0b (patch)
tree36caaa8ccf156b25a98db745eee542c0629ac220 /src/node_internals.h
parent47ecf2060343705a26eaa7f7d0be242cb6d84cf8 (diff)
downloadandroid-node-v8-19a920564585f1c223fb137408d615932609da0b.tar.gz
android-node-v8-19a920564585f1c223fb137408d615932609da0b.tar.bz2
android-node-v8-19a920564585f1c223fb137408d615932609da0b.zip
process: move environment variable proxy code into node_env_var.cc
Instead of exposing all the NamedPropertyHandlerConfiguration() parameters in node_internals, simply expose a CreateEnvVarProxy() method that returns a Local<Value> that implements process.env, and mark all the property handlers static in node_env_var.cc. This makes the code more encapsulated. PR-URL: https://github.com/nodejs/node/pull/25067 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_internals.h')
-rw-r--r--src/node_internals.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/node_internals.h b/src/node_internals.h
index 9c0b8ac3a7..6fe1d9a80a 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -128,6 +128,9 @@ void RegisterSignalHandler(int signal,
#endif
bool SafeGetenv(const char* key, std::string* text);
+v8::Local<v8::Object> CreateEnvVarProxy(v8::Local<v8::Context> context,
+ v8::Isolate* isolate,
+ v8::Local<v8::Value> data);
std::string GetHumanReadableProcessName();
void GetHumanReadableProcessName(char (*name)[1024]);
@@ -716,16 +719,6 @@ void StopProfilerIdleNotifier(const v8::FunctionCallbackInfo<v8::Value>& args);
void Umask(const v8::FunctionCallbackInfo<v8::Value>& args);
void Uptime(const v8::FunctionCallbackInfo<v8::Value>& args);
-void EnvDeleter(v8::Local<v8::Name> property,
- const v8::PropertyCallbackInfo<v8::Boolean>& info);
-void EnvGetter(v8::Local<v8::Name> property,
- const v8::PropertyCallbackInfo<v8::Value>& info);
-void EnvSetter(v8::Local<v8::Name> property,
- v8::Local<v8::Value> value,
- const v8::PropertyCallbackInfo<v8::Value>& info);
-void EnvQuery(v8::Local<v8::Name> property,
- const v8::PropertyCallbackInfo<v8::Integer>& info);
-void EnvEnumerator(const v8::PropertyCallbackInfo<v8::Array>& info);
void DebugPortGetter(v8::Local<v8::Name> property,
const v8::PropertyCallbackInfo<v8::Value>& info);
void DebugPortSetter(v8::Local<v8::Name> property,