Commit bdbeb654 authored by dmichael's avatar dmichael Committed by Commit bot

PPAPI: Add a warning when URLRequest.SetProperty fails

BUG=440079
R=teravest

Review URL: https://codereview.chromium.org/798043003

Cr-Commit-Position: refs/heads/master@{#308158}
parent 4124592f
......@@ -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).";
Log(PP_LOGLEVEL_ERROR, error_msg);
}
return result;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment