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

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

Issue 9187071: Lift the 64K message size limit for postMessage to/from NativeClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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
Index: ppapi/native_client/src/shared/ppapi_proxy/object_serialize.cc
===================================================================
--- ppapi/native_client/src/shared/ppapi_proxy/object_serialize.cc (revision 117568)
+++ ppapi/native_client/src/shared/ppapi_proxy/object_serialize.cc (working copy)
@@ -464,7 +464,7 @@
}
char* Serialize(const PP_Var* vars, uint32_t argc, uint32_t* length) {
- // Length needs to be set.
+ // Length needs to be returnable.
if (NULL == length) {
return NULL;
}
@@ -479,10 +479,10 @@
}
// Compute the size of the buffer. Zero indicates error.
uint32_t tmp_length = PpVarVectorSize(vars, argc);
- if (0 == tmp_length || tmp_length > *length) {
+ if (0 == tmp_length) {
return NULL;
}
- // Allocate the buffer, if the client didn't pass one.
+ // Allocate the buffer.
char* bytes = new char[tmp_length];
if (NULL == bytes) {
return NULL;

Powered by Google App Engine
This is Rietveld 408576698