https://bugs.webkit.org/show_bug.cgi?id=184883 introduced the ConditionalCrashOnOverflow handler which is used in StringBuilder so that it can do a runtime determination whether to crash on overflows or not. Technically, StringBuilder can be templatized with an OverflowHandler template parameter instead (just like CheckedArithmetic) and produce more efficient code. However, when I attempted this (to templatize StringBuilder), I ran into an issue of clang not exporting explicitly instantiated some StringBuilder methods (instantiated for CrashOnOverflow and for RecordOverflow handlers). As a result, clients of JavaScriptCore were not able to link to those methods. To work around this issue, I introduced the ConditionalCrashOnOverflow handler, thereby allowing StringBuilder to remain a plain class. If we can find a way to make clang export explicitly instantiated template methods, we should convert StringBuilder into a template and do away with the runtime shouldCrashOnOverflow checks in ConditionalCrashOnOverflow.