[icedtea-web] RFC: Simple fix for PR838
Deepak Bhole
dbhole at redhat.com
Fri Jan 6 11:47:25 PST 2012
* Deepak Bhole <dbhole at redhat.com> [2011-12-21 16:57]:
> Attached patch fixes PR838.
>
> Given the nature of the issue and the simplicity of the fix, I also
> propose backporting to 1.0 and 1.1.
>
> ChangeLog:
> 2011-12-21 Deepak Bhole <dbhole at redhat.com>
>
> PR838: IcedTea plugin crashes with chrome browser when javascript is executed
> * plugin/icedteanp/IcedTeaPluginRequestProcessor.cc (eval): Added a check
> to ensure that the result pointer is valid before attempting to create an
> NPVariant from it.
>
> Okay for HEAD, 1.0 and 1.1?
>
ping?
> Cheers,
> Deepak
> diff -r c5faf63fc34e NEWS
> --- a/NEWS Wed Dec 21 09:46:46 2011 +0100
> +++ b/NEWS Wed Dec 21 16:53:51 2011 -0500
> @@ -21,6 +21,7 @@
> * Plugin
> - PR749: sun.applet.PluginStreamHandler#handleMessage(String) really slow
> - PR782: Support building against npapi-sdk as well
> + - PR838: IcedTea plugin crashes with chrome browser when javascript is executed
> - RH718693: MindTerm SSH Applet doesn't work
> Common
> - PR768: Signed applets/Web Start apps don't work with OpenJDK7 and up
> diff -r c5faf63fc34e plugin/icedteanp/IcedTeaPluginRequestProcessor.cc
> --- a/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc Wed Dec 21 09:46:46 2011 +0100
> +++ b/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc Wed Dec 21 16:53:51 2011 -0500
> @@ -243,7 +243,13 @@
>
> NPVariant* result_variant = (NPVariant*) IcedTeaPluginUtilities::stringToJSID(thread_data.result);
> std::string result_variant_jniid = std::string();
> - createJavaObjectFromVariant(instance, *result_variant, &result_variant_jniid);
> + if (result_variant)
> + {
> + createJavaObjectFromVariant(instance, *result_variant, &result_variant_jniid);
> + } else
> + {
> + result_variant_jniid = "0";
> + }
>
> IcedTeaPluginUtilities::constructMessagePrefix(0, reference, &response);
> response += " JavaScriptEval ";
More information about the distro-pkg-dev
mailing list