Compare commits
2
Commits
cb123e3774
...
d07d6add04
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d07d6add04 | ||
|
|
1b30f15c02 |
+4
-1
@@ -612,10 +612,13 @@ function walk(root: RadixNode, search: Search, segs: string[]): void {
|
|||||||
stackDepths.push(depth + 1);
|
stackDepths.push(depth + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} catch (error) {
|
||||||
// A malformed `%` escape throws out of `decodeSegment` with frames still pending; drop them.
|
// A malformed `%` escape throws out of `decodeSegment` with frames still pending; drop them.
|
||||||
|
// Not in a `finally`: a normal walk already ends at `base`, and writing `length` on every lookup
|
||||||
|
// drops the arrays' storage, which cost D4 at 10 routes (FPRD-001 CARD-10).
|
||||||
stackNodes.length = base;
|
stackNodes.length = base;
|
||||||
stackDepths.length = base;
|
stackDepths.length = base;
|
||||||
|
throw error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user