Skip to content

Commit b9c03ae

Browse files
committed
src/node_errors: document re-entrancy guard
1 parent 955d7e4 commit b9c03ae

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/node_errors.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ static std::string GetErrorSource(Isolate* isolate,
191191

192192
static std::atomic<bool> is_in_oom{false};
193193
static thread_local std::atomic<bool> is_retrieving_js_stacktrace{false};
194+
// This is thread-local because it only guards re-entrancy within the current
195+
// thread's uncaught-exception path; no cross-thread synchronization is needed.
194196
static thread_local bool is_in_uncaught_exception = false;
195197
MaybeLocal<StackTrace> GetCurrentStackTrace(Isolate* isolate, int frame_count) {
196198
if (isolate == nullptr) {

0 commit comments

Comments
 (0)