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

Unified Diff: ppapi/thunk/ppb_directory_reader_thunk.cc

Issue 11958033: Implement Pepper proxy for PPB_DirectoryReader (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix DirectoryReader creation thunk (crbug/171539) Created 7 years, 11 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/thunk/ppb_directory_reader_thunk.cc
diff --git a/ppapi/thunk/ppb_directory_reader_thunk.cc b/ppapi/thunk/ppb_directory_reader_thunk.cc
index 8ff54e9e7b8b96c11218a8f8b2fde3cf80cb8413..0d8015922f533d2a0e8469d2cb6729c4fb091ba9 100644
--- a/ppapi/thunk/ppb_directory_reader_thunk.cc
+++ b/ppapi/thunk/ppb_directory_reader_thunk.cc
@@ -5,6 +5,7 @@
#include "ppapi/c/dev/ppb_directory_reader_dev.h"
#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/pp_errors.h"
+#include "ppapi/shared_impl/proxy_lock.h"
#include "ppapi/shared_impl/tracked_callback.h"
#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/thunk.h"
@@ -17,11 +18,12 @@ namespace thunk {
namespace {
PP_Resource Create(PP_Resource directory_ref) {
+ ppapi::ProxyAutoLock lock;
Resource* object =
PpapiGlobals::Get()->GetResourceTracker()->GetResource(directory_ref);
if (!object)
yzshen1 2013/01/24 21:55:43 You could move this check into CreateDirectoryRead
nhiroki 2013/01/25 12:27:17 I see. I removed GetResource() from CreateDirector
return 0;
- EnterResourceCreation enter(object->pp_instance());
+ EnterResourceCreationNoLock enter(object->pp_instance());
if (enter.failed())
return 0;
return enter.functions()->CreateDirectoryReader(directory_ref);
« ppapi/proxy/directory_reader_resource.cc ('K') | « ppapi/thunk/interfaces_ppb_public_dev.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698