Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraisinten <raisinten@gmail.com>2020-11-15 18:24:12 +0300
committerDaniel Bevenius <daniel.bevenius@gmail.com>2020-11-19 07:43:44 +0300
commit091f0d1a9ef0652a95b1aca42a047646913d63c4 (patch)
tree8f3d023bd0fcbe8149794ce877e4d03019a46961 /src/node_env_var.cc
parentd6d4721f3b2825a095c98dd1ffb9dd764367ea18 (diff)
src: refactor using-declarations node_env_var.cc
PR-URL: https://github.com/nodejs/node/pull/36128 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'src/node_env_var.cc')
-rw-r--r--src/node_env_var.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/node_env_var.cc b/src/node_env_var.cc
index 1cf959a6095..45f2967f4b0 100644
--- a/src/node_env_var.cc
+++ b/src/node_env_var.cc
@@ -10,6 +10,8 @@ namespace node {
using v8::Array;
using v8::Boolean;
using v8::Context;
+using v8::DontDelete;
+using v8::DontEnum;
using v8::EscapableHandleScope;
using v8::HandleScope;
using v8::Integer;
@@ -26,6 +28,7 @@ using v8::Object;
using v8::ObjectTemplate;
using v8::PropertyCallbackInfo;
using v8::PropertyHandlerFlags;
+using v8::ReadOnly;
using v8::String;
using v8::Value;
@@ -93,10 +96,10 @@ Maybe<std::string> RealEnvStore::Get(const char* key) const {
}
if (ret >= 0) { // Env key value fetch success.
- return v8::Just(std::string(*val, init_sz));
+ return Just(std::string(*val, init_sz));
}
- return v8::Nothing<std::string>();
+ return Nothing<std::string>();
}
MaybeLocal<String> RealEnvStore::Get(Isolate* isolate,
@@ -141,9 +144,9 @@ int32_t RealEnvStore::Query(const char* key) const {
#ifdef _WIN32
if (key[0] == '=') {
- return static_cast<int32_t>(v8::ReadOnly) |
- static_cast<int32_t>(v8::DontDelete) |
- static_cast<int32_t>(v8::DontEnum);
+ return static_cast<int32_t>(ReadOnly) |
+ static_cast<int32_t>(DontDelete) |
+ static_cast<int32_t>(DontEnum);
}
#endif
@@ -191,7 +194,7 @@ Local<Array> RealEnvStore::Enumerate(Isolate* isolate) const {
return Array::New(isolate, env_v.out(), env_v_index);
}
-std::shared_ptr<KVStore> KVStore::Clone(v8::Isolate* isolate) const {
+std::shared_ptr<KVStore> KVStore::Clone(Isolate* isolate) const {
HandleScope handle_scope(isolate);
Local<Context> context = isolate->GetCurrentContext();
@@ -211,7 +214,7 @@ std::shared_ptr<KVStore> KVStore::Clone(v8::Isolate* isolate) const {
Maybe<std::string> MapKVStore::Get(const char* key) const {
Mutex::ScopedLock lock(mutex_);
auto it = map_.find(key);
- return it == map_.end() ? v8::Nothing<std::string>() : v8::Just(it->second);
+ return it == map_.end() ? Nothing<std::string>() : Just(it->second);
}
MaybeLocal<String> MapKVStore::Get(Isolate* isolate, Local<String> key) const {