| Index: ppapi/proxy/ppb_instance_proxy.cc
|
| diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc
|
| index 4009a19f0db93df1599051dd8ca3eedf3e21ced1..e3948f06aafff92afb3f569434592a47a7954a01 100644
|
| --- a/ppapi/proxy/ppb_instance_proxy.cc
|
| +++ b/ppapi/proxy/ppb_instance_proxy.cc
|
| @@ -56,6 +56,10 @@ namespace proxy {
|
|
|
| namespace {
|
|
|
| +const char kSerializationError[] = "Failed to convert a PostMessage "
|
| + "argument from a PP_Var to a Javascript value. It may have cycles or be of "
|
| + "an unsupported type.";
|
| +
|
| InterfaceProxy* CreateInstanceProxy(Dispatcher* dispatcher) {
|
| return new PPB_Instance_Proxy(dispatcher);
|
| }
|
| @@ -933,6 +937,12 @@ void PPB_Instance_Proxy::OnHostMsgPostMessage(
|
| PP_Instance instance,
|
| SerializedVarReceiveInput message) {
|
| EnterInstanceNoLock enter(instance);
|
| + if (!message.is_valid_var()) {
|
| + PpapiGlobals::Get()->LogWithSource(
|
| + instance, PP_LOGLEVEL_ERROR, std::string(), kSerializationError);
|
| + return;
|
| + }
|
| +
|
| if (enter.succeeded())
|
| enter.functions()->PostMessage(instance,
|
| message.GetForInstance(dispatcher(),
|
|
|