diff options
author | Luck <git@lucko.me> | 2018-05-29 01:01:30 +0100 |
---|---|---|
committer | Luck <git@lucko.me> | 2018-05-29 01:01:30 +0100 |
commit | bf72b1560340b48fc0958b3b2038ba13d49b7190 (patch) | |
tree | d3035fb87c625024144f1e5f4985c120b2fac030 /common/src/main/java/com | |
parent | a895841c1c9d8bc94651246d4645ede5b4d54d06 (diff) | |
download | spark-bf72b1560340b48fc0958b3b2038ba13d49b7190.tar.gz spark-bf72b1560340b48fc0958b3b2038ba13d49b7190.tar.bz2 spark-bf72b1560340b48fc0958b3b2038ba13d49b7190.zip |
Multiple fixes
* Fixed an issue which prevented links from being “clickable”
* Added a /spark alias
* Added a max stack depth limit to fix issues with rendering
Diffstat (limited to 'common/src/main/java/com')
-rw-r--r-- | common/src/main/java/com/sk89q/warmroast/StackNode.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/src/main/java/com/sk89q/warmroast/StackNode.java b/common/src/main/java/com/sk89q/warmroast/StackNode.java index f077309..8fd0661 100644 --- a/common/src/main/java/com/sk89q/warmroast/StackNode.java +++ b/common/src/main/java/com/sk89q/warmroast/StackNode.java @@ -36,6 +36,8 @@ import java.util.Map; */ public class StackNode implements Comparable<StackNode> { + private static final int MAX_STACK_DEPTH = 300; + /** * The name of this node */ @@ -87,6 +89,10 @@ public class StackNode implements Comparable<StackNode> { private void log(StackTraceElement[] elements, int skip, long time) { accumulateTime(time); + + if (skip >= MAX_STACK_DEPTH) { + return; + } if (elements.length - skip == 0) { return; |