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: create per isolate proxy env template · nodejs/node@11b3e47

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • env.cc
    • node_env_var.cc
    • node_process.h
    • node_realm.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/env.cc‎

Copy file name to clipboardExpand all lines: src/env.cc
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ void IsolateData::CreateProperties() {
504504
binding::CreateInternalBindingTemplates(this);
505505

506506
contextify::ContextifyContext::InitializeGlobalTemplates(this);
507+
CreateEnvProxyTemplate(this);
507508
}
508509

509510
constexpr uint16_t kDefaultCppGCEmebdderID = 0x90de;
Collapse file

‎src/node_env_var.cc‎

Copy file name to clipboardExpand all lines: src/node_env_var.cc
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,8 @@ static void EnvDefiner(Local<Name> property,
456456
}
457457
}
458458

459-
void CreateEnvProxyTemplate(Isolate* isolate, IsolateData* isolate_data) {
459+
void CreateEnvProxyTemplate(IsolateData* isolate_data) {
460+
Isolate* isolate = isolate_data->isolate();
460461
HandleScope scope(isolate);
461462
if (!isolate_data->env_proxy_template().IsEmpty()) return;
462463
Local<FunctionTemplate> env_proxy_ctor_template =
Collapse file

‎src/node_process.h‎

Copy file name to clipboardExpand all lines: src/node_process.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class MemoryTracker;
1515
class ExternalReferenceRegistry;
1616
class Realm;
1717

18-
void CreateEnvProxyTemplate(v8::Isolate* isolate, IsolateData* isolate_data);
18+
void CreateEnvProxyTemplate(IsolateData* isolate_data);
1919

2020
// Most of the time, it's best to use `console.error` to write
2121
// to the process.stderr stream. However, in some cases, such as
Collapse file

‎src/node_realm.cc‎

Copy file name to clipboardExpand all lines: src/node_realm.cc
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,11 @@ MaybeLocal<Value> PrincipalRealm::BootstrapRealm() {
344344
return MaybeLocal<Value>();
345345
}
346346

347+
// Setup process.env proxy.
347348
Local<String> env_string = FIXED_ONE_BYTE_STRING(isolate_, "env");
348349
Local<Object> env_proxy;
349-
CreateEnvProxyTemplate(isolate_, env_->isolate_data());
350-
if (!env_->env_proxy_template()->NewInstance(context()).ToLocal(&env_proxy) ||
350+
if (!isolate_data()->env_proxy_template()->NewInstance(context()).ToLocal(
351+
&env_proxy) ||
351352
process_object()->Set(context(), env_string, env_proxy).IsNothing()) {
352353
return MaybeLocal<Value>();
353354
}

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.