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..eaa7c2d2194ecf524942957eeddb7731e7306ab0 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,14 +18,16 @@ namespace thunk { |
namespace { |
PP_Resource Create(PP_Resource directory_ref) { |
+ ppapi::ProxyAutoLock lock; |
Resource* object = |
PpapiGlobals::Get()->GetResourceTracker()->GetResource(directory_ref); |
if (!object) |
return 0; |
- EnterResourceCreation enter(object->pp_instance()); |
+ EnterResourceCreationNoLock enter(object->pp_instance()); |
if (enter.failed()) |
return 0; |
- return enter.functions()->CreateDirectoryReader(directory_ref); |
+ return enter.functions()->CreateDirectoryReader( |
+ object->pp_instance(), directory_ref); |
} |
PP_Bool IsDirectoryReader(PP_Resource resource) { |