[RFC] Single threaded JSRuntime in Firefox 10

pcpa at mandriva.com.br pcpa at mandriva.com.br
Sat Feb 18 14:29:30 PST 2012


> * Deepak Bhole <dbhole at redhat.com> [2012-02-16 17:59]:
>> * Deepak Bhole <dbhole at redhat.com> [2012-02-16 14:53]:
>> > * Thomas Meyer <thomas at m3y3r.de> [2012-02-03 20:20]:
>> > > Hello,

  I just tested it replacing the adaptation of the patch as in
http://icedtea.classpath.org/bugzilla/attachment.cgi?id=659
with PR820.patch and it also corrects the problem for me.

>> > > please have a look at this first patch that fixes the sendMember() and
>> > > eval() methods for firefox 10:
>> > >
>> >
>> > Hi Thomas,
>> >
>> > I don't think these will actually fix the issue. The issue is
>> > intermittent, so your fixes are probably just reducing the frequency.
>> >
>> > The problem is the use of the browser_function.* functions from non-JS
>> > threads.
>> >
>> > I am working on a patch to resolve it. However your patch is still a
>> > good re-factor and I think it would make a good addition on top :)
>> >
>> > I'll reply back after I've posted the fix.
>> >
>>
>> Sorry, scratch that. Looking at your fixes closer, I see you have moved
>> the browser calls to the functions that are guaranteed to execute on
>> main JS engine thread.
>>
>> I will take a look at this first thing tomorrow and fix up anything left
>> by patch 1 and 2.
>>
>
> Hi Thomas,
>
> I have reviewed your changes and found an issue (nothing you did wrong,
> your fixes just exposed it) related to array processing (in
> createJavaObjectFromVariant()).
>
> I have attached a final patch that has your fixes + that fix + fixes to
> finalize as they all go hand in hand.
>
> sendWindow() does not need a fix because it always runs on the main
> thread. I just changed finalize() to do the same as neither can create a
> chain of recursive calls.
>
> New patch attached.
>
> Again, thank you very much for the patch! :)
>
> If there are no comments by Tuesday, I think it should be okay to push.
>
> Cheers,
> Deepak

  The only issue I had, when testing that it was not crashing when
scrolling, was when having 4 plots it crashed one of the applets,
but not the others, and when "evaluating" it again it did work,
as well as showing other plots:


$ sage
----------------------------------------------------------------------
| Sage Version 4.8, Release Date: 2012-01-20                         |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: #notebook(open_viewer=False)
sage: #notebook()
sage: notebook()
The notebook files are stored in: sage_notebook.sagenb
**************************************************
*                                                *
* Open your web browser to http://localhost:8000 *
*                                                *
**************************************************
2012-02-18 20:22:09-0200 [-] Log opened.
2012-02-18 20:22:09-0200 [-] twistd 10.1.0 (/usr/bin/python 2.7.2) starting up.
2012-02-18 20:22:09-0200 [-] reactor class:
twisted.internet.selectreactor.SelectReactor.
2012-02-18 20:22:09-0200 [-] twisted.web2.channel.http.HTTPFactory starting on 8000
2012-02-18 20:22:09-0200 [-] Starting factory
<twisted.web2.channel.http.HTTPFactory instance at 0x7fcdbd971dd0>
Could not determine mimetype for file:
http://localhost:8000/?startup_token=2a7b5d0c88fdde43123de38feec234f2
Could not determine mimetype for file:
http://localhost:8000/?startup_token=2a7b5d0c88fdde43123de38feec234f2
java version "1.7.0_b147-icedtea"
OpenJDK Runtime Environment (Mandriva-2.0.3-x86_64)
OpenJDK 64-Bit Server VM (build 21.0-b17, mixed mode)
2012-02-18 20:23:10-0200 [HTTPChannel,7,127.0.0.1] Request error: Connection to
the other side was lost in a non-clean fashion.
2012-02-18 20:23:12-0200 [HTTPChannel,6,127.0.0.1] Request error: Connection to
the other side was lost in a non-clean fashion.
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
        at org.jmol.shape.MeshCollection.setVisibilityFlags(Unknown Source)
        at org.jmol.viewer.ShapeManager.setModelVisibility(Unknown Source)
        at org.jmol.viewer.Viewer.setModelVisibility(Unknown Source)
        at org.jmol.viewer.Viewer.renderScreenImage(Unknown Source)
        at org.jmol.applet.Jmol.update(Unknown Source)
        at org.jmol.applet.Jmol.paint(Unknown Source)
        at org.jmol.appletwrapper.AppletWrapper.paint(Unknown Source)
        at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
        at sun.awt.X11.XRepaintArea.paintComponent(XRepaintArea.java:73)
        at sun.awt.RepaintArea.paint(RepaintArea.java:240)
        at sun.awt.X11.XComponentPeer.handleEvent(XComponentPeer.java:587)
        at java.awt.Component.dispatchEventImpl(Component.java:4936)
        at java.awt.Container.dispatchEventImpl(Container.java:2287)
        at java.awt.Component.dispatchEvent(Component.java:4686)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
        at java.awt.EventQueue.access$000(EventQueue.java:101)
        at java.awt.EventQueue$3.run(EventQueue.java:666)
        at java.awt.EventQueue$3.run(EventQueue.java:664)
        at java.security.AccessController.doPrivileged(Native Method)
        at
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
        at java.awt.EventQueue$4.run(EventQueue.java:680)
        at java.awt.EventQueue$4.run(EventQueue.java:678)
        at java.security.AccessController.doPrivileged(Native Method)
        at
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
        at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
        at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

  I think it happened due to scrolling the page, to see if
other applets were "alive", while it was rendering/loading
one.

Paulo




More information about the distro-pkg-dev mailing list