summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/plugin_dispatcher.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi/proxy/plugin_dispatcher.cc')
-rw-r--r--ppapi/proxy/plugin_dispatcher.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/ppapi/proxy/plugin_dispatcher.cc b/ppapi/proxy/plugin_dispatcher.cc
index dba5253..3da15e9 100644
--- a/ppapi/proxy/plugin_dispatcher.cc
+++ b/ppapi/proxy/plugin_dispatcher.cc
@@ -42,10 +42,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),