Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(859)

Unified Diff: Source/core/editing/SpellChecker.cpp

Issue 19275006: Fix a use-after-free in spellcheck client (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebKit/chromium/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/SpellChecker.cpp
diff --git a/Source/core/editing/SpellChecker.cpp b/Source/core/editing/SpellChecker.cpp
index bfa17c3ac195014accf972c888741d3145c6537b..417dfd19c35c89b6a114b45d49c2ae295235c67c 100644
--- a/Source/core/editing/SpellChecker.cpp
+++ b/Source/core/editing/SpellChecker.cpp
@@ -89,16 +89,18 @@ void SpellCheckRequest::didSucceed(const Vector<TextCheckingResult>& results)
{
if (!m_checker)
return;
- m_checker->didCheckSucceed(m_requestData.sequence(), results);
+ SpellChecker* checker = m_checker;
m_checker = 0;
+ checker->didCheckSucceed(m_requestData.sequence(), results);
}
void SpellCheckRequest::didCancel()
{
if (!m_checker)
return;
- m_checker->didCheckCancel(m_requestData.sequence());
+ SpellChecker* checker = m_checker;
m_checker = 0;
+ checker->didCheckCancel(m_requestData.sequence());
}
void SpellCheckRequest::setCheckerAndSequence(SpellChecker* requester, int sequence)
« no previous file with comments | « Source/WebKit/chromium/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698