diff options
Diffstat (limited to 'webkit/plugins/ppapi/ppb_url_loader_impl.cc')
-rw-r--r-- | webkit/plugins/ppapi/ppb_url_loader_impl.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/webkit/plugins/ppapi/ppb_url_loader_impl.cc b/webkit/plugins/ppapi/ppb_url_loader_impl.cc index 378d789..27ec617 100644 --- a/webkit/plugins/ppapi/ppb_url_loader_impl.cc +++ b/webkit/plugins/ppapi/ppb_url_loader_impl.cc @@ -273,6 +273,13 @@ int32_t PPB_URLLoader_Impl::Open(PPB_URLRequestInfo_Impl* request, return PP_ERROR_FAILED; loader_->loadAsynchronously(web_request, this); + // Check for immediate failure; The AssociatedURLLoader will call our + // didFail method synchronously for certain kinds of access violations + // so we must return an error to the caller. + // TODO(bbudge) Modify the underlying AssociatedURLLoader to only call + // back asynchronously. + if (done_status_ == PP_ERROR_FAILED) + return PP_ERROR_NOACCESS; request_info_ = scoped_refptr<PPB_URLRequestInfo_Impl>(request); |