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

Unified Diff: ppapi/proxy/plugin_dispatcher.cc

Issue 8226009: Remove the proxy callback tracker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: PostMessage define. Created 9 years, 2 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
Index: ppapi/proxy/plugin_dispatcher.cc
diff --git a/ppapi/proxy/plugin_dispatcher.cc b/ppapi/proxy/plugin_dispatcher.cc
index 2bed85969f0620eef890216a07a27a616c371de7..a45cc12d983bf0d95e144cfdde27aaf833a4c451 100644
--- a/ppapi/proxy/plugin_dispatcher.cc
+++ b/ppapi/proxy/plugin_dispatcher.cc
@@ -43,10 +43,18 @@ InstanceToDispatcherMap* g_instance_to_dispatcher = NULL;
} // namespace
InstanceData::InstanceData()
- : fullscreen(PP_FALSE), flash_fullscreen(PP_FALSE) {
+ : fullscreen(PP_FALSE),
+ flash_fullscreen(PP_FALSE),
+ mouse_lock_callback(PP_BlockUntilComplete()) {
memset(&position, 0, sizeof(position));
}
+InstanceData::~InstanceData() {
+ // Run any pending mouse lock callback to prevent leaks.
+ if (mouse_lock_callback.func)
+ PP_RunAndClearCompletionCallback(&mouse_lock_callback, PP_ERROR_ABORTED);
+}
+
PluginDispatcher::PluginDispatcher(base::ProcessHandle remote_process_handle,
GetInterfaceFunc get_interface)
: Dispatcher(remote_process_handle, get_interface),

Powered by Google App Engine
This is Rietveld 408576698