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

Unified Diff: src/shared/ppapi_proxy/object_serialize.cc

Issue 3391010: Update the PPAPI DEPS revision. This change included parameter profile chang... (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 10 years, 3 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 | « src/shared/ppapi_proxy/object_proxy.cc ('k') | src/shared/ppapi_proxy/plugin_globals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/shared/ppapi_proxy/object_serialize.cc
===================================================================
--- src/shared/ppapi_proxy/object_serialize.cc (revision 3312)
+++ src/shared/ppapi_proxy/object_serialize.cc (working copy)
@@ -212,7 +212,8 @@
bool DeserializeString(char* p,
PP_Var* var,
- uint32_t* element_size) {
+ uint32_t* element_size,
+ NaClSrpcChannel* channel) {
SerializedString* ss = reinterpret_cast<SerializedString*>(p);
uint32_t string_length = ss->fixed.u.string_length;
if (AddWouldOverflow(string_length, kStringRoundBase - 1)) {
@@ -222,7 +223,9 @@
uint32_t rounded_length = RoundedStringBytes(string_length);
if (0 == string_length) {
// Zero-length string. Rely on what the PPB_Var does.
- *var = VarInterface()->VarFromUtf8(ss->string_bytes, 0);
+ *var = VarInterface()->VarFromUtf8(LookupModuleIdForSrpcChannel(channel),
+ ss->string_bytes,
+ 0);
} else {
// We need to copy the string payload using memory allocated by
// NPN_MemAlloc.
@@ -233,7 +236,8 @@
} else {
memmove(copy, ss->string_bytes, string_length);
}
- *var = VarInterface()->VarFromUtf8(reinterpret_cast<const char*>(copy),
+ *var = VarInterface()->VarFromUtf8(LookupModuleIdForSrpcChannel(channel),
+ reinterpret_cast<const char*>(copy),
string_length);
}
// Compute the "element_size", or offset in the serialized form from
@@ -281,7 +285,7 @@
break;
}
case PP_VARTYPE_STRING:
- if (!DeserializeString(p, &vars[i], &element_size)) {
+ if (!DeserializeString(p, &vars[i], &element_size, channel)) {
return false;
}
break;
« no previous file with comments | « src/shared/ppapi_proxy/object_proxy.cc ('k') | src/shared/ppapi_proxy/plugin_globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698