File tree Expand file tree Collapse file tree 5 files changed +8
-7
lines changed
Expand file tree Collapse file tree 5 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -897,7 +897,7 @@ v8::Local<v8::Context> Environment::context() const {
897897 return principal_realm ()->context ();
898898}
899899
900- Realm * Environment::principal_realm () const {
900+ PrincipalRealm * Environment::principal_realm () const {
901901 return principal_realm_.get ();
902902}
903903
Original file line number Diff line number Diff line change @@ -886,7 +886,7 @@ class Environment final : public MemoryRetainer {
886886 // Get the context with an explicit realm instead when possible.
887887 // Deprecate soon.
888888 inline v8::Local<v8::Context> context () const ;
889- inline Realm * principal_realm () const ;
889+ inline PrincipalRealm * principal_realm () const ;
890890
891891#if HAVE_INSPECTOR
892892 inline inspector::Agent* inspector_agent () const {
Original file line number Diff line number Diff line change 55
66#include " node_context_data.h"
77#include " node_realm.h"
8+ #include " util-inl.h"
89
910namespace node {
1011
@@ -46,6 +47,10 @@ inline v8::Isolate* Realm::isolate() const {
4647 return isolate_;
4748}
4849
50+ inline v8::Local<v8::Context> Realm::context () const {
51+ return PersistentToLocal::Strong (context_);
52+ }
53+
4954inline Realm::Kind Realm::kind () const {
5055 return kind_;
5156}
Original file line number Diff line number Diff line change @@ -295,10 +295,6 @@ void Realm::VerifyNoStrongBaseObjects() {
295295 });
296296}
297297
298- v8::Local<v8::Context> Realm::context () const {
299- return PersistentToLocal::Strong (context_);
300- }
301-
302298// Per-realm strong value accessors. The per-realm values should avoid being
303299// accessed across realms.
304300#define V (PropertyName, TypeName ) \
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ class Realm : public MemoryRetainer {
121121 inline Environment* env () const ;
122122 inline v8::Isolate* isolate () const ;
123123 inline Kind kind () const ;
124- virtual v8::Local<v8::Context> context () const ;
124+ inline virtual v8::Local<v8::Context> context () const ;
125125 inline bool has_run_bootstrapping_code () const ;
126126
127127 // Methods created using SetMethod(), SetPrototypeMethod(), etc. inside
You can’t perform that action at this time.
0 commit comments