Chromium Code Reviews| Index: ppapi/native_client/src/shared/ppapi_proxy/browser_callback.cc |
| diff --git a/ppapi/native_client/src/shared/ppapi_proxy/browser_callback.cc b/ppapi/native_client/src/shared/ppapi_proxy/browser_callback.cc |
| index 5f5e7c36e8df810bfb20b1b652f90d43c4fedf3e..6849a8e8db44acb42f1b1d264b7799c9a4492ee6 100644 |
| --- a/ppapi/native_client/src/shared/ppapi_proxy/browser_callback.cc |
| +++ b/ppapi/native_client/src/shared/ppapi_proxy/browser_callback.cc |
| @@ -136,6 +136,12 @@ struct PP_CompletionCallback MakeRemoteCompletionCallback( |
| if (var) |
| *var = &remote_callback->read_var; |
| + // If caller requires to copy data at completion, the callback must be |
| + // asynchronous. Because the copy is performed in RunRemoteCallback. |
| + if ((bytes_to_read > 0 && buffer != NULL) || var) |
| + return PP_MakeCompletionCallback( |
| + RunRemoteCallback, remote_callback.release()); |
|
dmichael (off chromium)
2012/03/21 19:16:47
This is going to affect URLLoader::ReadResponseBod
|
| + |
| return PP_MakeOptionalCompletionCallback( |
| RunRemoteCallback, remote_callback.release()); |
| } |