Chromium Code Reviews| Index: ppapi/proxy/url_response_info_resource.cc |
| diff --git a/ppapi/proxy/url_response_info_resource.cc b/ppapi/proxy/url_response_info_resource.cc |
| index 85dae9a1aef485c989fa39d30a674bd805ff8515..b7bc7e3fc5934b24594c8a1b2441c610c03da915 100644 |
| --- a/ppapi/proxy/url_response_info_resource.cc |
| +++ b/ppapi/proxy/url_response_info_resource.cc |
| @@ -4,7 +4,7 @@ |
| #include "ppapi/proxy/url_response_info_resource.h" |
| -#include "ppapi/proxy/ppb_file_ref_proxy.h" |
| +#include "ppapi/proxy/file_ref_resource.h" |
| #include "ppapi/shared_impl/var.h" |
| #include "ppapi/thunk/enter.h" |
| #include "ppapi/thunk/resource_creation_api.h" |
| @@ -62,8 +62,13 @@ PP_Var URLResponseInfoResource::GetProperty(PP_URLResponseProperty property) { |
| } |
| PP_Resource URLResponseInfoResource::GetBodyAsFileRef() { |
| - if (!body_as_file_ref_.get()) |
| - return 0; |
| + if (!body_as_file_ref_.get()) { |
| + PP_Resource r = FileRefResource::CreateFileRef( |
| + connection(), |
| + pp_instance(), |
| + data_.body_as_file_ref); |
| + body_as_file_ref_ = ScopedPPResource(r); |
|
dmichael (off chromium)
2013/08/07 22:19:13
(you could assign directly, though I'm okay with m
teravest
2013/08/08 00:50:06
Changed to assign directly instead.
|
| + } |
| PpapiGlobals::Get()->GetResourceTracker()->AddRefResource( |
| body_as_file_ref_.get()); |
| return body_as_file_ref_.get(); |