[icedtea-web] RFC: Patch to fix applet exit

Omair Majid omajid at redhat.com
Mon May 2 11:19:55 PDT 2011


On 05/02/2011 02:16 PM, Deepak Bhole wrote:
> * Omair Majid<omajid at redhat.com>  [2011-05-02 13:21]:
>> On 05/02/2011 11:56 AM, Deepak Bhole wrote:
>>> Hi,
>>>
>>> This patch addresses an issue cause by the tg.stop() call in
>>> PluginAppletViewer.appletClose().
>>>
>>> With the recent classloader sharing changes, applets from the same page
>>> have the same threadgroup. As a result if 2 copies are opened and one is
>>> closed, the other one stops too.
>>>
>>> With this patch, tg.stop() is no longer called and instead, the plugin
>>> will halt the VM after the last applet to guarantee that resources are
>>> freed eventually (the tg.stop was added because not all applets exit
>>> nicely on stop/dispose).
>>>
>>
>> It would be nice if this was improved so that threadgroups could be
>> terminated when all applets belonging to the threadgroup have
>> stopped.
>>
>
> Yep, I completely agree. However that is not possible about some
> redesign, which I would like to avoid for 1.1 as it is already branched.
>

Sure. I am fine with the patch as a quick fix. I was just pointing out 
that we should aim for a better fix later.

>
>>> ChangeLog:
>>> 2011-05-02  Deepak Bhole<dbhole at redhat.com>
>>>
>>>      * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
>>>      (appletClose): Do not try to stop threads, now that the loader is shared
>>>      and the thread group for applets on a page is identical. Call dispose from
>>>      invokeAndWait.
>>>      (appletSystemExit): Exit the VM when called.
>>>
>>> Okay for HEAD and 1.1?
>>>
>>
>> The patch looks fine to me. I believe the appcontext/threadgroup
>> changes were committed only to head. Is this patch needed for 1.1?
>>

Looks like you missed this part of the email. Is this patch needed for 1.1?

Thanks,
Omair



More information about the distro-pkg-dev mailing list