Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 1bc80d27d1d7761ad7b010a5749ffa804592b519..7c145585986205969eb073bd1c895675f5012529 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -624,7 +624,8 @@ ResourceConstraints::ResourceConstraints() |
: max_young_space_size_(0), |
max_old_space_size_(0), |
max_executable_size_(0), |
- stack_limit_(NULL) { } |
+ stack_limit_(NULL), |
+ is_memory_constrained_() { } |
bool SetResourceConstraints(ResourceConstraints* constraints) { |
@@ -645,6 +646,10 @@ bool SetResourceConstraints(ResourceConstraints* constraints) { |
uintptr_t limit = reinterpret_cast<uintptr_t>(constraints->stack_limit()); |
isolate->stack_guard()->SetStackLimit(limit); |
} |
+ if (constraints->is_memory_constrained().has_value) { |
+ isolate->set_is_memory_constrained( |
+ constraints->is_memory_constrained().value); |
+ } |
return true; |
} |