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); |