| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 041f3a3 commit 70ad676
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -89,14 +89,15 @@ class JSGraph : public EmbedderGraph { | |||
| 89 | 89 | MaybeLocal<Array> CreateObject() const { | |
| 90 | 90 | EscapableHandleScope handle_scope(isolate_); | |
| 91 | 91 | Local<Context> context = isolate_->GetCurrentContext(); | |
| 92 | + Environment* env = Environment::GetCurrent(context); | ||
| 92 | 93 | ||
| 93 | 94 | std::unordered_map<Node*, Local<Object>> info_objects; | |
| 94 | 95 | Local<Array> nodes = Array::New(isolate_, nodes_.size()); | |
| 95 | 96 | Local<String> edges_string = FIXED_ONE_BYTE_STRING(isolate_, "edges"); | |
| 96 | 97 | Local<String> is_root_string = FIXED_ONE_BYTE_STRING(isolate_, "isRoot"); | |
| 97 | - Local<String> name_string = FIXED_ONE_BYTE_STRING(isolate_, "name"); | ||
| 98 | - Local<String> size_string = FIXED_ONE_BYTE_STRING(isolate_, "size"); | ||
| 99 | - Local<String> value_string = FIXED_ONE_BYTE_STRING(isolate_, "value"); | ||
| 98 | + Local<String> name_string = env->name_string(); | ||
| 99 | + Local<String> size_string = env->size_string(); | ||
| 100 | + Local<String> value_string = env->value_string(); | ||
| 100 | 101 | Local<String> wraps_string = FIXED_ONE_BYTE_STRING(isolate_, "wraps"); | |
| 101 | 102 | Local<String> to_string = FIXED_ONE_BYTE_STRING(isolate_, "to"); | |
| 102 | 103 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -74,7 +74,7 @@ MaybeLocal<Object> CreateProcessObject(Environment* env) { | |||
| 74 | 74 | Local<Context> context = env->context(); | |
| 75 | 75 | ||
| 76 | 76 | Local<FunctionTemplate> process_template = FunctionTemplate::New(isolate); | |
| 77 | - process_template->SetClassName(FIXED_ONE_BYTE_STRING(isolate, "process")); | ||
| 77 | + process_template->SetClassName(env->process_string()); | ||
| 78 | 78 | Local<Function> process_ctor; | |
| 79 | 79 | Local<Object> process; | |
| 80 | 80 | if (!process_template->GetFunction(context).ToLocal(&process_ctor) || | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -78,7 +78,7 @@ void LibuvStreamWrap::Initialize(Local<Object> target, | |||
| 78 | 78 | // - callback | |
| 79 | 79 | // - handle | |
| 80 | 80 | sw->InstanceTemplate()->Set( | |
| 81 | - FIXED_ONE_BYTE_STRING(env->isolate(), "oncomplete"), | ||
| 81 | + env->oncomplete_string(), | ||
| 82 | 82 | v8::Null(env->isolate())); | |
| 83 | 83 | sw->InstanceTemplate()->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "callback"), | |
| 84 | 84 | v8::Null(env->isolate())); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments