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

Unified Diff: ppapi/proxy/plugin_var_serialization_rules.cc

Issue 9373032: PPAPI: Proxy VarArrayBuffer for out-of-process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge... again Created 8 years, 10 months 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 | « ppapi/proxy/interface_list.cc ('k') | ppapi/proxy/ppb_instance_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/plugin_var_serialization_rules.cc
diff --git a/ppapi/proxy/plugin_var_serialization_rules.cc b/ppapi/proxy/plugin_var_serialization_rules.cc
index 045663784e85cf846f050647630a778c1af300ff..461676f71f55005b0ee441bf2fe0847008e605bc 100644
--- a/ppapi/proxy/plugin_var_serialization_rules.cc
+++ b/ppapi/proxy/plugin_var_serialization_rules.cc
@@ -41,11 +41,11 @@ PP_Var PluginVarSerializationRules::BeginReceiveCallerOwned(
}
void PluginVarSerializationRules::EndReceiveCallerOwned(const PP_Var& var) {
- if (var.type == PP_VARTYPE_STRING) {
- // Destroy the string.
- var_tracker_->ReleaseVar(var);
- } else if (var.type == PP_VARTYPE_OBJECT) {
+ if (var.type == PP_VARTYPE_OBJECT) {
var_tracker_->StopTrackingObjectWithNoReference(var);
+ } else if (var.type >= PP_VARTYPE_STRING) {
+ // Release our reference to the local Var.
+ var_tracker_->ReleaseVar(var);
}
}
@@ -108,7 +108,7 @@ void PluginVarSerializationRules::EndSendPassRef(const PP_Var& var,
if (var.type == PP_VARTYPE_OBJECT) {
var_tracker_->ReleaseHostObject(
static_cast<PluginDispatcher*>(dispatcher), var);
- } else if (var.type == PP_VARTYPE_STRING) {
+ } else if (var.type >= PP_VARTYPE_STRING) {
var_tracker_->ReleaseVar(var);
}
}
« no previous file with comments | « ppapi/proxy/interface_list.cc ('k') | ppapi/proxy/ppb_instance_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698