Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: ppapi/proxy/url_request_info_resource.cc

Issue 798043003: PPAPI: Add a warning when URLRequest.SetProperty fails (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add include and namespace for IntToString Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/url_request_info_resource.cc
diff --git a/ppapi/proxy/url_request_info_resource.cc b/ppapi/proxy/url_request_info_resource.cc
index 19d02d726ce1d11f849ea0028c14ef3e6cd9d2d2..a1ba17cc085b7884dad912fe01eb9d3bda3e59c1 100644
--- a/ppapi/proxy/url_request_info_resource.cc
+++ b/ppapi/proxy/url_request_info_resource.cc
@@ -4,6 +4,7 @@
#include "ppapi/proxy/url_request_info_resource.h"
+#include "base/strings/string_number_conversions.h"
#include "ppapi/shared_impl/var.h"
#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/ppb_file_ref_api.h"
@@ -66,6 +67,14 @@ PP_Bool URLRequestInfoResource::SetProperty(PP_URLRequestProperty property,
default:
break;
}
+ if (!result) {
+ std::string error_msg("PPB_URLRequestInfo.SetProperty: Attempted to set a "
+ "value for PP_URLRequestProperty ");
+ error_msg += base::IntToString(property);
+ error_msg += ", but either this property type is invalid or its parameter "
+ "was inappropriate (e.g., the wrong type of PP_Var).";
teravest 2014/12/12 18:39:49 It should be easy to see if the passed property is
+ Log(PP_LOGLEVEL_ERROR, error_msg);
+ }
return result;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698