| Index: ppapi/shared_impl/ppb_file_ref_shared.cc
|
| diff --git a/ppapi/shared_impl/ppb_file_ref_shared.cc b/ppapi/shared_impl/ppb_file_ref_shared.cc
|
| index 64268b3b5c04500db796b16415adcc3680163196..118f45ce6e51869437d7f3fb578ec0fa3adf8b36 100644
|
| --- a/ppapi/shared_impl/ppb_file_ref_shared.cc
|
| +++ b/ppapi/shared_impl/ppb_file_ref_shared.cc
|
| @@ -9,23 +9,16 @@
|
|
|
| namespace ppapi {
|
|
|
| -PPB_FileRef_Shared::PPB_FileRef_Shared(const InitAsImpl&,
|
| +PPB_FileRef_Shared::PPB_FileRef_Shared(ResourceObjectType type,
|
| const PPB_FileRef_CreateInfo& info)
|
| - : Resource(info.resource.instance()),
|
| - create_info_(info) {
|
| - // Should not have been passed a host resource for the trusted constructor.
|
| - DCHECK(info.resource.is_null());
|
| -
|
| - // Resource's constructor assigned a PP_Resource, so we can fill out our
|
| - // host resource now.
|
| - create_info_.resource = host_resource();
|
| - DCHECK(!create_info_.resource.is_null());
|
| -}
|
| -
|
| -PPB_FileRef_Shared::PPB_FileRef_Shared(const InitAsProxy&,
|
| - const PPB_FileRef_CreateInfo& info)
|
| - : Resource(info.resource),
|
| + : Resource(type, info.resource),
|
| create_info_(info) {
|
| + if (type == OBJECT_IS_IMPL) {
|
| + // Resource's constructor assigned a PP_Resource, so we can fill out our
|
| + // host resource now.
|
| + create_info_.resource = host_resource();
|
| + DCHECK(!create_info_.resource.is_null());
|
| + }
|
| }
|
|
|
| PPB_FileRef_Shared::~PPB_FileRef_Shared() {
|
|
|