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

Unified Diff: src/trusted/plugin/plugin.cc

Issue 5622003: Restructure the structs/unions involved in SRPC argument passing. This will... (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 10 years 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: src/trusted/plugin/plugin.cc
===================================================================
--- src/trusted/plugin/plugin.cc (revision 3867)
+++ src/trusted/plugin/plugin.cc (working copy)
@@ -66,7 +66,7 @@
}
params->outs()[0]->tag = NACL_SRPC_ARG_TYPE_OBJECT;
- params->outs()[0]->u.oval = shared_memory;
+ params->outs()[0]->arrays.oval = shared_memory;
return true;
}
@@ -78,7 +78,7 @@
}
// Plug the scriptable object into the return values.
params->outs()[0]->tag = NACL_SRPC_ARG_TYPE_OBJECT;
- params->outs()[0]->u.oval = plugin->socket_address()->AddRef();
+ params->outs()[0]->arrays.oval = plugin->socket_address()->AddRef();
return true;
}
@@ -118,7 +118,7 @@
// assign to the "src" property based on the supported sandbox.
bool SetNexesProperty(void* obj, plugin::SrpcParams* params) {
return reinterpret_cast<plugin::Plugin*>(obj)->
- SetNexesPropertyImpl(params->ins()[0]->u.sval.str);
+ SetNexesPropertyImpl(params->ins()[0]->arrays.str);
}
bool GetSrcProperty(void* obj, plugin::SrpcParams* params) {
@@ -126,7 +126,7 @@
const char* url = plugin->nacl_module_url().c_str();
PLUGIN_PRINTF(("GetSrcProperty ('src'='%s')\n", url));
if (NACL_NO_URL != plugin->nacl_module_url()) {
- params->outs()[0]->u.sval.str = strdup(url);
+ params->outs()[0]->arrays.str = strdup(url);
return true;
} else {
// No url to set 'src' to.
@@ -137,7 +137,7 @@
bool SetSrcProperty(void* obj, plugin::SrpcParams* params) {
PLUGIN_PRINTF(("SetSrcProperty ()\n"));
return reinterpret_cast<plugin::Plugin*>(obj)->
- SetSrcPropertyImpl(params->ins()[0]->u.sval.str);
+ SetSrcPropertyImpl(params->ins()[0]->arrays.str);
}
bool GetHeightProperty(void* obj, plugin::SrpcParams* params) {
@@ -197,7 +197,7 @@
// TODO(mseaborn): Handle strings containing NULLs. This might
// involve using a different SRPC type.
- char* utf8string = params->ins()[0]->u.sval.str;
+ char* utf8string = params->ins()[0]->arrays.str;
char* data;
size_t data_size;
if (!ByteStringFromUTF8(utf8string, strlen(utf8string), &data, &data_size)) {

Powered by Google App Engine
This is Rietveld 408576698