-
bmeurer authored
Previously the String constructor and the Symbol.prototype.toString methods had to compute the descriptive string for a Symbol on the fly, which can produce a lot of garbage when this happens a lot, i.e. when the String representation of a Symbol is used often. Now instead of doing this on-demand we can just do it upfront when creating the Symbol. That way we also ensure that we won't throw an exception when accessing the descriptive string of a Symbol, due to potential String length overflow, but have the exception during Symbol creation upfront, which is a lot less surprising behavior. BUG=v8:6278,v8:6344,v8:6350 TBR=mlippautz@chromium.org R=ishell@chromium.org Review-Url: https://codereview.chromium.org/2900703002 Cr-Commit-Position: refs/heads/master@{#45479}
e8757382