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

Unified Diff: Source/WebCore/Modules/intents/IntentRequest.cpp

Issue 9479030: Merge 108724 - Don't clear IntentRequest callback pointers on stop() (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 10 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/WebCore/Modules/intents/IntentRequest.h ('k') | Tools/DumpRenderTree/chromium/WebViewHost.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/Modules/intents/IntentRequest.cpp
===================================================================
--- Source/WebCore/Modules/intents/IntentRequest.cpp (revision 109043)
+++ Source/WebCore/Modules/intents/IntentRequest.cpp (working copy)
@@ -52,24 +52,26 @@
, m_intent(intent)
, m_successCallback(successCallback)
, m_errorCallback(errorCallback)
+ , m_stopped(false)
{
}
void IntentRequest::contextDestroyed()
{
ContextDestructionObserver::contextDestroyed();
- m_successCallback.clear();
- m_errorCallback.clear();
+ m_stopped = true;
}
void IntentRequest::stop()
{
- m_successCallback.clear();
- m_errorCallback.clear();
+ m_stopped = true;
}
void IntentRequest::postResult(SerializedScriptValue* data)
{
+ if (m_stopped)
+ return;
+
// Callback could lead to deletion of this.
RefPtr<IntentRequest> protector(this);
@@ -84,6 +86,9 @@
void IntentRequest::postFailure(SerializedScriptValue* data)
{
+ if (m_stopped)
+ return;
+
// Callback could lead to deletion of this.
RefPtr<IntentRequest> protector(this);
« no previous file with comments | « Source/WebCore/Modules/intents/IntentRequest.h ('k') | Tools/DumpRenderTree/chromium/WebViewHost.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698