Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit 0cb4757

Browse files
Added comment describing the long stack counter
1 parent 1c421c5 commit 0cb4757

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

q.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,12 @@ Q.nextTick = nextTick;
522522
*/
523523
Q.longStackSupport = false;
524524

525+
/**
526+
* The counter is used to determine the stopping point for building
527+
* long stack traces. In makeStackTraceLong we walk backwards through
528+
* the linked list of promises, only stacks which were created before
529+
* the rejection are concatenated.
530+
*/
525531
var longStackCounter = 1;
526532

527533
// enable long stacks if Q_DEBUG is set

0 commit comments

Comments
 (0)