| Index: webkit/plugins/ppapi/ppb_flash_impl.cc
|
| ===================================================================
|
| --- webkit/plugins/ppapi/ppb_flash_impl.cc (revision 89672)
|
| +++ webkit/plugins/ppapi/ppb_flash_impl.cc (working copy)
|
| @@ -10,6 +10,7 @@
|
| #include "base/time.h"
|
| #include "googleurl/src/gurl.h"
|
| #include "ppapi/c/private/ppb_flash.h"
|
| +#include "ppapi/thunk/enter.h"
|
| #include "webkit/plugins/ppapi/common.h"
|
| #include "webkit/plugins/ppapi/plugin_delegate.h"
|
| #include "webkit/plugins/ppapi/plugin_module.h"
|
| @@ -18,6 +19,9 @@
|
| #include "webkit/plugins/ppapi/resource_tracker.h"
|
| #include "webkit/plugins/ppapi/var.h"
|
|
|
| +using ppapi::thunk::EnterResource;
|
| +using ppapi::thunk::PPB_URLRequestInfo_API;
|
| +
|
| namespace webkit {
|
| namespace ppapi {
|
|
|
| @@ -48,10 +52,11 @@
|
| int32_t Navigate(PP_Resource request_id,
|
| const char* target,
|
| bool from_user_action) {
|
| - scoped_refptr<PPB_URLRequestInfo_Impl> request(
|
| - Resource::GetAs<PPB_URLRequestInfo_Impl>(request_id));
|
| - if (!request)
|
| + EnterResource<PPB_URLRequestInfo_API> enter(request_id, true);
|
| + if (enter.failed())
|
| return PP_ERROR_BADRESOURCE;
|
| + PPB_URLRequestInfo_Impl* request =
|
| + static_cast<PPB_URLRequestInfo_Impl*>(enter.object());
|
|
|
| if (!target)
|
| return PP_ERROR_BADARGUMENT;
|
|
|