Index: webkit/plugins/ppapi/ppb_url_response_info_impl.cc |
diff --git a/webkit/plugins/ppapi/ppb_url_response_info_impl.cc b/webkit/plugins/ppapi/ppb_url_response_info_impl.cc |
index fa35c0d2fa2b1126aec8735834f4754fd81f3681..eb5e2ff77b6fc5ba84e3a5da883ccc45c569790b 100644 |
--- a/webkit/plugins/ppapi/ppb_url_response_info_impl.cc |
+++ b/webkit/plugins/ppapi/ppb_url_response_info_impl.cc |
@@ -74,8 +74,8 @@ bool PPB_URLResponseInfo_Impl::Initialize(const WebURLResponse& response) { |
WebString file_path = response.downloadFilePath(); |
if (!file_path.isEmpty()) { |
- body_ = new PPB_FileRef_Impl(pp_instance(), |
- webkit_glue::WebStringToFilePath(file_path)); |
+ body_ = PPB_FileRef_Impl::CreateExternal( |
+ pp_instance(), webkit_glue::WebStringToFilePath(file_path)); |
} |
return true; |
} |
@@ -114,7 +114,6 @@ PP_Var PPB_URLResponseInfo_Impl::GetProperty(PP_URLResponseProperty property) { |
PP_Resource PPB_URLResponseInfo_Impl::GetBodyAsFileRef() { |
if (!body_.get()) |
return 0; |
- body_->AddRef(); // AddRef for the caller. |
return body_->GetReference(); |
} |