Index: ppapi/proxy/host_var_serialization_rules.cc |
diff --git a/ppapi/proxy/host_var_serialization_rules.cc b/ppapi/proxy/host_var_serialization_rules.cc |
index 52b2cbcc6b3a1696fbba658337d296577f104e9e..d6b5677e59c899dc8365ebe7cd4e2cbd2ffb872a 100644 |
--- a/ppapi/proxy/host_var_serialization_rules.cc |
+++ b/ppapi/proxy/host_var_serialization_rules.cc |
@@ -35,8 +35,8 @@ PP_Var HostVarSerializationRules::BeginReceiveCallerOwned( |
} |
void HostVarSerializationRules::EndReceiveCallerOwned(const PP_Var& var) { |
- if (var.type == PP_VARTYPE_STRING) { |
- // Destroy the string. |
+ if (var.type != PP_VARTYPE_OBJECT && var.type >= PP_VARTYPE_STRING) { |
+ // Release our reference to the local Var. |
PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(var); |
} |
} |