Skip to content

Commit 5ddee99

Browse files
committed
fixup! fixup! fixup! async_hooks: improve resource stack performance
1 parent 078c427 commit 5ddee99

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/env.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,10 @@ class AsyncHooks : public MemoryRetainer {
678678
inline AliasedFloat64Array& async_id_fields();
679679
inline AliasedFloat64Array& async_ids_stack();
680680
inline v8::Local<v8::Array> js_execution_async_resources();
681+
// Returns the native executionAsyncResource value at stack index `index`.
682+
// Resources provided on the JS side are not stored on the native stack,
683+
// in which case an empty `Local<>` is returned.
684+
// The `js_execution_async_resources` array contains the value in that case.
681685
inline v8::Local<v8::Object> native_execution_async_resource(size_t index);
682686

683687
inline v8::Local<v8::String> provider_string(int idx);

0 commit comments

Comments
 (0)