Chromium Code Reviews| Index: ppapi/proxy/ppb_instance_proxy.cc |
| diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc |
| index c68b28699598005f987d84c9d5c1cc0a31e1f435..ea974ef29db254c7426ca35a6f99d264e49bf7f0 100644 |
| --- a/ppapi/proxy/ppb_instance_proxy.cc |
| +++ b/ppapi/proxy/ppb_instance_proxy.cc |
| @@ -645,15 +645,9 @@ void PPB_Instance_Proxy::OnHostMsgLockMouse(PP_Instance instance) { |
| pp::CompletionCallback cb = callback_factory_.NewCallback( |
| &PPB_Instance_Proxy::MouseLockCompleteInHost, instance); |
| - EnterInstanceNoLock enter(instance); |
| - if (enter.failed()) { |
| - cb.Run(PP_ERROR_BADARGUMENT); |
| - return; |
| - } |
| - int32_t result = enter.functions()->LockMouse(instance, |
| - enter.callback()); |
|
dmichael (off chromium)
2012/07/02 17:34:16
Ugh, sorry for getting this wrong. I must have bee
|
| - if (result != PP_OK_COMPLETIONPENDING) |
| - cb.Run(result); |
| + EnterInstanceNoLock enter(instance, cb.pp_completion_callback()); |
| + if (enter.succeeded()) |
| + enter.SetResult(enter.functions()->LockMouse(instance, enter.callback())); |
| } |
| void PPB_Instance_Proxy::OnHostMsgUnlockMouse(PP_Instance instance) { |
| @@ -792,7 +786,7 @@ void PPB_Instance_Proxy::OnPluginMsgMouseLockComplete(PP_Instance instance, |
| GetInstanceData(instance); |
| if (!data) |
| return; // Instance was probably deleted. |
| - if (TrackedCallback::IsPending(data->mouse_lock_callback)) { |
| + if (!TrackedCallback::IsPending(data->mouse_lock_callback)) { |
| NOTREACHED(); |
| return; |
| } |