DescriptioncreatePlainText(): avoid a 32k buffer allocation for empty ranges.
The pre-allocation of the StringBuilder is redundant if the range is
empty, hence avoid.
While here, simplify empty string builder testing also.
R=yosin
BUG=
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201212
Patch Set 1 #
Total comments: 4
Patch Set 2 : use early return instead #Patch Set 3 : simplify empty builder testing #Messages
Total messages: 11 (2 generated)
|