GeezerVison is showing github.com — src: cache context lookup in vectored io loops · nodejs/node@803ff7d
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: src/env-inl.h +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -898,7 +898,7 @@ v8::Local<v8::Context> Environment::context() const { |
898 | 898 | return principal_realm()->context(); |
899 | 899 | } |
900 | 900 |
|
901 | | -Realm* Environment::principal_realm() const { |
| 901 | +PrincipalRealm* Environment::principal_realm() const { |
902 | 902 | return principal_realm_.get(); |
903 | 903 | } |
904 | 904 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: src/env.h +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -886,7 +886,7 @@ class Environment final : public MemoryRetainer { |
886 | 886 | // Get the context with an explicit realm instead when possible. |
887 | 887 | // Deprecate soon. |
888 | 888 | inline v8::Local<v8::Context> context() const; |
889 | | - inline Realm* principal_realm() const; |
| 889 | + inline PrincipalRealm* principal_realm() const; |
890 | 890 |
|
891 | 891 | #if HAVE_INSPECTOR |
892 | 892 | inline inspector::Agent* inspector_agent() const { |
|
Collapse file
Copy file name to clipboardExpand all lines: src/node_realm-inl.h +5Lines changed: 5 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
5 | 5 |
|
6 | 6 | #include "node_context_data.h" |
7 | 7 | #include "node_realm.h" |
| 8 | +#include "util-inl.h" |
8 | 9 |
|
9 | 10 | namespace node { |
10 | 11 |
|
@@ -46,6 +47,10 @@ inline v8::Isolate* Realm::isolate() const { |
46 | 47 | return isolate_; |
47 | 48 | } |
48 | 49 |
|
| 50 | +inline v8::Local<v8::Context> Realm::context() const { |
| 51 | + return PersistentToLocal::Strong(context_); |
| 52 | +} |
| 53 | + |
49 | 54 | inline Realm::Kind Realm::kind() const { |
50 | 55 | return kind_; |
51 | 56 | } |
|
Collapse file
Copy file name to clipboardExpand all lines: src/node_realm.cc -4Lines changed: 0 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -295,10 +295,6 @@ void Realm::VerifyNoStrongBaseObjects() { |
295 | 295 | }); |
296 | 296 | } |
297 | 297 |
|
298 | | -v8::Local<v8::Context> Realm::context() const { |
299 | | - return PersistentToLocal::Strong(context_); |
300 | | -} |
301 | | - |
302 | 298 | // Per-realm strong value accessors. The per-realm values should avoid being |
303 | 299 | // accessed across realms. |
304 | 300 | #define V(PropertyName, TypeName) \ |
|
Collapse file
Copy file name to clipboardExpand all lines: src/node_realm.h +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -121,7 +121,7 @@ class Realm : public MemoryRetainer { |
121 | 121 | inline Environment* env() const; |
122 | 122 | inline v8::Isolate* isolate() const; |
123 | 123 | inline Kind kind() const; |
124 | | - virtual v8::Local<v8::Context> context() const; |
| 124 | + inline virtual v8::Local<v8::Context> context() const; |
125 | 125 | inline bool has_run_bootstrapping_code() const; |
126 | 126 |
|
127 | 127 | // Methods created using SetMethod(), SetPrototypeMethod(), etc. inside |
|