Commit 6c9464a6 authored by Xiaocheng Hu's avatar Xiaocheng Hu Committed by Commit Bot

Fix a raw pointer use-after-free in test runner

This patch clears the |last_requested_text_checking_completion_| raw
pointer in test runner's mock spellchecker after calling
DidCancelCheckingText() (which deletes itself), so that it won't be
reused after free via the RequestResolved() callback.

Bug: 749949
Change-Id: Id4f62ad4be7f94e65259fae0125223d7599e7257
Reviewed-on: https://chromium-review.googlesource.com/594837Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490839}
parent b442dfac
......@@ -71,6 +71,7 @@ void SpellCheckClient::RequestCheckingOfText(
if (last_requested_text_checking_completion_) {
last_requested_text_checking_completion_->DidCancelCheckingText();
last_requested_text_checking_completion_ = nullptr;
RequestResolved();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment