Mercurial > hg > release > icedtea-web-1.4
changeset 674:45ebf2dfa902
removed java call to obtain jvm args for plugin
* /plugin/icedteanp/IcedTeaNPPlugin.cc: (get_jvm_args)
Java call replaced by call to recently added read_deploy_property_value
function.
author | Jiri Vanek <jvanek@redhat.com> |
---|---|
date | Wed, 17 Apr 2013 09:45:53 +0200 |
parents | bd86740a226d |
children | e866698141e7 |
files | ChangeLog plugin/icedteanp/IcedTeaNPPlugin.cc |
diffstat | 2 files changed, 12 insertions(+), 37 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Apr 12 10:04:36 2013 -0400 +++ b/ChangeLog Wed Apr 17 09:45:53 2013 +0200 @@ -1,3 +1,10 @@ +2013-04-17 Jiri Vanek <jvanek@redhat.com> + + removed java call to obtain jvm args for plugin + * /plugin/icedteanp/IcedTeaNPPlugin.cc: (get_jvm_args) + Java call replaced by call to recently added read_deploy_property_value + function. + 2013-04-12 Adam Domurad <adomurad@redhat.com> * netx/net/sourceforge/jnlp/security/appletextendedsecurity/ExtendedAppletSecurityHelp.java:
--- a/plugin/icedteanp/IcedTeaNPPlugin.cc Fri Apr 12 10:04:36 2013 -0400 +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc Wed Apr 17 09:45:53 2013 +0200 @@ -1472,45 +1472,13 @@ std::vector<std::string*>* get_jvm_args() { - std::vector < std::string> commands; - gchar *output = NULL; + std::string output; std::vector<std::string*>* tokenOutput = NULL; - - commands.push_back(get_plugin_executable()); - commands.push_back(PLUGIN_BOOTCLASSPATH); - commands.push_back("-classpath"); - commands.push_back(get_plugin_rt_jar()); - commands.push_back("net.sourceforge.jnlp.controlpanel.CommandLine"); - commands.push_back("get"); - commands.push_back("deployment.plugin.jvm.arguments"); - - std::vector<gchar*> vector_gchar = IcedTeaPluginUtilities::vectorStringToVectorGchar(&commands); - gchar **command_line_args = &vector_gchar[0]; - - if (!g_spawn_sync(NULL, command_line_args, NULL, - (GSpawnFlags) G_SPAWN_STDERR_TO_DEV_NULL, NULL, NULL, &output, NULL, NULL, - &channel_error)) - { - PLUGIN_ERROR("Failed to get JVM arguments set for plugin."); - output = NULL; - return NULL; + bool args_defined = read_deploy_property_value("deployment.plugin.jvm.arguments", output); + if (!args_defined){ + return new std::vector<std::string*>(); } - - tokenOutput = IcedTeaPluginUtilities::strSplit(output, " \n"); - - //If deployment.plugin.jvm.arguments is undefined, the output will simply be 'null' - //We remove this so it's not mistakenly used as a jvm argument. - if (!tokenOutput->empty() && *tokenOutput->at(0) =="null") - { - delete tokenOutput->at(0); - tokenOutput->erase(tokenOutput->begin()); - } - - //Free memory - g_free(output); - output = NULL; - command_line_args = NULL; - + tokenOutput = IcedTeaPluginUtilities::strSplit(output.c_str(), " \n"); return tokenOutput; }