File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -513,6 +513,14 @@ inline bool Environment::abort_on_uncaught_exception() const {
513
513
return options_->abort_on_uncaught_exception ;
514
514
}
515
515
516
+ inline void Environment::set_force_context_aware (bool value) {
517
+ options_->force_context_aware = value;
518
+ }
519
+
520
+ inline bool Environment::force_context_aware () const {
521
+ return options_->force_context_aware ;
522
+ }
523
+
516
524
inline void Environment::set_abort_on_uncaught_exception (bool value) {
517
525
options_->abort_on_uncaught_exception = value;
518
526
}
Original file line number Diff line number Diff line change @@ -1068,6 +1068,9 @@ class Environment : public MemoryRetainer {
1068
1068
void PrintSyncTrace () const ;
1069
1069
inline void set_trace_sync_io (bool value);
1070
1070
1071
+ inline void set_force_context_aware (bool value);
1072
+ inline bool force_context_aware () const ;
1073
+
1071
1074
// This stores whether the --abort-on-uncaught-exception flag was passed
1072
1075
// to Node.
1073
1076
inline bool abort_on_uncaught_exception () const ;
Original file line number Diff line number Diff line change @@ -470,7 +470,7 @@ void DLOpen(const FunctionCallbackInfo<Value>& args) {
470
470
471
471
if (mp != nullptr ) {
472
472
if (mp->nm_context_register_func == nullptr ) {
473
- if (env->options ()-> force_context_aware ) {
473
+ if (env->force_context_aware () ) {
474
474
dlib->Close ();
475
475
THROW_ERR_NON_CONTEXT_AWARE_DISABLED (env);
476
476
return false ;
You can’t perform that action at this time.
0 commit comments