File tree 3 files changed +12
-1
lines changed
3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -542,6 +542,14 @@ inline bool Environment::abort_on_uncaught_exception() const {
542
542
return options_->abort_on_uncaught_exception ;
543
543
}
544
544
545
+ inline void Environment::set_force_context_aware (bool value) {
546
+ options_->force_context_aware = value;
547
+ }
548
+
549
+ inline bool Environment::force_context_aware () const {
550
+ return options_->force_context_aware ;
551
+ }
552
+
545
553
inline void Environment::set_abort_on_uncaught_exception (bool value) {
546
554
options_->abort_on_uncaught_exception = value;
547
555
}
Original file line number Diff line number Diff line change @@ -947,6 +947,9 @@ class Environment : public MemoryRetainer {
947
947
void PrintSyncTrace () const ;
948
948
inline void set_trace_sync_io (bool value);
949
949
950
+ inline void set_force_context_aware (bool value);
951
+ inline bool force_context_aware () const ;
952
+
950
953
// This stores whether the --abort-on-uncaught-exception flag was passed
951
954
// to Node.
952
955
inline bool abort_on_uncaught_exception () const ;
Original file line number Diff line number Diff line change @@ -461,7 +461,7 @@ void DLOpen(const FunctionCallbackInfo<Value>& args) {
461
461
462
462
if (mp != nullptr ) {
463
463
if (mp->nm_context_register_func == nullptr ) {
464
- if (env->options ()-> force_context_aware ) {
464
+ if (env->force_context_aware () ) {
465
465
dlib->Close ();
466
466
THROW_ERR_NON_CONTEXT_AWARE_DISABLED (env);
467
467
return false ;
You can’t perform that action at this time.
0 commit comments