| Index: components/spellcheck/renderer/spellcheck_provider.cc
|
| diff --git a/components/spellcheck/renderer/spellcheck_provider.cc b/components/spellcheck/renderer/spellcheck_provider.cc
|
| index bd91fc57664670af07885ea74db512df75b5baa7..097d0c965683cfd6a8902033f879f1213a9e998d 100644
|
| --- a/components/spellcheck/renderer/spellcheck_provider.cc
|
| +++ b/components/spellcheck/renderer/spellcheck_provider.cc
|
| @@ -330,17 +330,10 @@ bool SpellCheckProvider::SatisfyRequestFromCache(
|
| if (start <= text_length && end <= text_length)
|
| ++result_size;
|
| }
|
| - if (result_size > 0) {
|
| - blink::WebVector<blink::WebTextCheckingResult> results(result_size);
|
| - for (size_t i = 0; i < result_size; ++i) {
|
| - results[i].decoration = last_results_[i].decoration;
|
| - results[i].location = last_results_[i].location;
|
| - results[i].length = last_results_[i].length;
|
| - results[i].replacement = last_results_[i].replacement;
|
| - }
|
| - completion->didFinishCheckingText(results);
|
| - return true;
|
| - }
|
| + blink::WebVector<blink::WebTextCheckingResult> results(last_results_.data(),
|
| + result_size);
|
| + completion->didFinishCheckingText(results);
|
| + return true;
|
| }
|
|
|
| return false;
|
|
|