Index: ppapi/shared_impl/var_tracker.cc |
diff --git a/ppapi/shared_impl/var_tracker.cc b/ppapi/shared_impl/var_tracker.cc |
index 254c51ab579f3d71fefb3126be2c4c505083e5a1..bada0ab76dd137bfcb859cbe243b3adbc36446dd 100644 |
--- a/ppapi/shared_impl/var_tracker.cc |
+++ b/ppapi/shared_impl/var_tracker.cc |
@@ -13,6 +13,7 @@ |
#include "ppapi/shared_impl/host_resource.h" |
#include "ppapi/shared_impl/id_assignment.h" |
#include "ppapi/shared_impl/proxy_lock.h" |
+#include "ppapi/shared_impl/resource_var.h" |
#include "ppapi/shared_impl/var.h" |
namespace ppapi { |
@@ -234,6 +235,13 @@ PP_Var VarTracker::MakeArrayBufferPPVar(uint32 size_in_bytes, |
return array_buffer->GetPPVar(); |
} |
+PP_Var VarTracker::MakeResourcePPVar(PP_Resource pp_resource) { |
+ CheckThreadingPreconditions(); |
+ |
+ ResourceVar* resource_var = MakeResourceVar(pp_resource); |
+ return resource_var ? resource_var->GetPPVar() : PP_MakeNull(); |
+} |
+ |
std::vector<PP_Var> VarTracker::GetLiveVars() { |
CheckThreadingPreconditions(); |