| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 213188e commit abecdcb
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -72,8 +72,7 @@ void Realm::CreateProperties() { | |||
| 72 | 72 | CHECK(primordials->IsObject()); | |
| 73 | 73 | set_primordials(primordials.As<Object>()); | |
| 74 | 74 | ||
| 75 | - Local<String> prototype_string = | ||
| 76 | - FIXED_ONE_BYTE_STRING(isolate(), "prototype"); | ||
| 75 | + Local<String> prototype_string = env_->prototype_string(); | ||
| 77 | 76 | ||
| 78 | 77 | #define V(EnvPropertyName, PrimordialsPropertyName) \ | |
| 79 | 78 | { \ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1232,9 +1232,7 @@ void DatabaseSync::CustomFunction(const FunctionCallbackInfo<Value>& args) { | |||
| 1232 | 1232 | argc = -1; | |
| 1233 | 1233 | } else { | |
| 1234 | 1234 | Local<Value> js_len; | |
| 1235 | - if (!fn->Get(env->context(), | ||
| 1236 | - FIXED_ONE_BYTE_STRING(env->isolate(), "length")) | ||
| 1237 | - .ToLocal(&js_len)) { | ||
| 1235 | + if (!fn->Get(env->context(), env->length_string()).ToLocal(&js_len)) { | ||
| 1238 | 1236 | return; | |
| 1239 | 1237 | } | |
| 1240 | 1238 | argc = js_len.As<Int32>()->Value(); | |
@@ -1465,7 +1463,7 @@ void DatabaseSync::CreateSession(const FunctionCallbackInfo<Value>& args) { | |||
| 1465 | 1463 | ||
| 1466 | 1464 | Local<Object> options = args[0].As<Object>(); | |
| 1467 | 1465 | ||
| 1468 | - Local<String> table_key = FIXED_ONE_BYTE_STRING(env->isolate(), "table"); | ||
| 1466 | + Local<String> table_key = env->table_string(); | ||
| 1469 | 1467 | bool hasIt; | |
| 1470 | 1468 | if (!options->HasOwnProperty(env->context(), table_key).To(&hasIt)) { | |
| 1471 | 1469 | return; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -738,11 +738,10 @@ static void Initialize(Local<Object> target, | |||
| 738 | 738 | ||
| 739 | 739 | Local<FunctionTemplate> length_getter = | |
| 740 | 740 | FunctionTemplate::New(isolate, StorageLengthGetter); | |
| 741 | - ctor_tmpl->PrototypeTemplate()->SetAccessorProperty( | ||
| 742 | - FIXED_ONE_BYTE_STRING(isolate, "length"), | ||
| 743 | - length_getter, | ||
| 744 | - Local<FunctionTemplate>(), | ||
| 745 | - DontDelete); | ||
| 741 | + ctor_tmpl->PrototypeTemplate()->SetAccessorProperty(env->length_string(), | ||
| 742 | + length_getter, | ||
| 743 | + Local<FunctionTemplate>(), | ||
| 744 | + DontDelete); | ||
| 746 | 745 | ||
| 747 | 746 | SetProtoMethod(isolate, ctor_tmpl, "clear", Clear); | |
| 748 | 747 | SetProtoMethodNoSideEffect(isolate, ctor_tmpl, "getItem", GetItem); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -84,8 +84,7 @@ void LibuvStreamWrap::Initialize(Local<Object> target, | |||
| 84 | 84 | sw->InstanceTemplate()->Set(env->oncomplete_string(), v8::Null(isolate)); | |
| 85 | 85 | sw->InstanceTemplate()->Set(FIXED_ONE_BYTE_STRING(isolate, "callback"), | |
| 86 | 86 | v8::Null(isolate)); | |
| 87 | - sw->InstanceTemplate()->Set(FIXED_ONE_BYTE_STRING(isolate, "handle"), | ||
| 88 | - v8::Null(isolate)); | ||
| 87 | + sw->InstanceTemplate()->Set(env->handle_string(), v8::Null(isolate)); | ||
| 89 | 88 | ||
| 90 | 89 | sw->Inherit(AsyncWrap::GetConstructorTemplate(env)); | |
| 91 | 90 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments