GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: replace FIXED_ONE_BYTE_STRING with Environment-cached strings · nodejs/node@26b40ba

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • node_realm.cc
    • node_sqlite.cc
    • node_webstorage.cc
    • stream_wrap.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/node_realm.cc‎

Copy file name to clipboardExpand all lines: src/node_realm.cc
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ void Realm::CreateProperties() {
5252
CHECK(primordials->IsObject());
5353
set_primordials(primordials.As<Object>());
5454

55-
Local<String> prototype_string =
56-
FIXED_ONE_BYTE_STRING(isolate(), "prototype");
55+
Local<String> prototype_string = env_->prototype_string();
5756

5857
#define V(EnvPropertyName, PrimordialsPropertyName) \
5958
{ \
Collapse file

‎src/node_sqlite.cc‎

Copy file name to clipboardExpand all lines: src/node_sqlite.cc
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,9 +1215,7 @@ void DatabaseSync::CustomFunction(const FunctionCallbackInfo<Value>& args) {
12151215
argc = -1;
12161216
} else {
12171217
Local<Value> js_len;
1218-
if (!fn->Get(env->context(),
1219-
FIXED_ONE_BYTE_STRING(env->isolate(), "length"))
1220-
.ToLocal(&js_len)) {
1218+
if (!fn->Get(env->context(), env->length_string()).ToLocal(&js_len)) {
12211219
return;
12221220
}
12231221
argc = js_len.As<Int32>()->Value();
@@ -1448,7 +1446,7 @@ void DatabaseSync::CreateSession(const FunctionCallbackInfo<Value>& args) {
14481446

14491447
Local<Object> options = args[0].As<Object>();
14501448

1451-
Local<String> table_key = FIXED_ONE_BYTE_STRING(env->isolate(), "table");
1449+
Local<String> table_key = env->table_string();
14521450
bool hasIt;
14531451
if (!options->HasOwnProperty(env->context(), table_key).To(&hasIt)) {
14541452
return;
Collapse file

‎src/node_webstorage.cc‎

Copy file name to clipboardExpand all lines: src/node_webstorage.cc
+4-5Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -741,11 +741,10 @@ static void Initialize(Local<Object> target,
741741

742742
Local<FunctionTemplate> length_getter =
743743
FunctionTemplate::New(isolate, StorageLengthGetter);
744-
ctor_tmpl->PrototypeTemplate()->SetAccessorProperty(
745-
FIXED_ONE_BYTE_STRING(isolate, "length"),
746-
length_getter,
747-
Local<FunctionTemplate>(),
748-
DontDelete);
744+
ctor_tmpl->PrototypeTemplate()->SetAccessorProperty(env->length_string(),
745+
length_getter,
746+
Local<FunctionTemplate>(),
747+
DontDelete);
749748

750749
SetProtoMethod(isolate, ctor_tmpl, "clear", Clear);
751750
SetProtoMethodNoSideEffect(isolate, ctor_tmpl, "getItem", GetItem);
Collapse file

‎src/stream_wrap.cc‎

Copy file name to clipboardExpand all lines: src/stream_wrap.cc
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ void LibuvStreamWrap::Initialize(Local<Object> target,
8484
sw->InstanceTemplate()->Set(env->oncomplete_string(), v8::Null(isolate));
8585
sw->InstanceTemplate()->Set(FIXED_ONE_BYTE_STRING(isolate, "callback"),
8686
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));
8988

9089
sw->Inherit(AsyncWrap::GetConstructorTemplate(env));
9190

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.