Chromium Code Reviews| Index: Source/web/WebLocalFrameImpl.cpp |
| diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp |
| index 5e2b49ed4ad94f60b53136cab1ed99bba2dc580d..95d8e8b4a3f668257ab97d29b6a002bc4de5b0e3 100644 |
| --- a/Source/web/WebLocalFrameImpl.cpp |
| +++ b/Source/web/WebLocalFrameImpl.cpp |
| @@ -266,10 +266,13 @@ static void frameContentAsPlainText(size_t maxChars, LocalFrame* frame, StringBu |
| // string conversion. |
| for (TextIterator it(range->startPosition(), range->endPosition()); !it.atEnd(); it.advance()) { |
| it.text().appendTextToStringBuilder(output, 0, maxChars - output.length()); |
| - if (output.length() >= maxChars) |
| + if (output.length() >= maxChars) { |
| + range->dispose(); |
|
yosin_UTC9
2015/09/10 01:58:39
Please introduce |ScopedRangeObject|, or better na
sof
2015/09/10 06:07:49
We have ScopedDisposal<T>, which is arguably more
|
| return; // Filled up the buffer. |
| + } |
| } |
| } |
| + range->dispose(); |
| // The separator between frames when the frames are converted to plain text. |
| const LChar frameSeparator[] = { '\n', '\n' }; |