There is a bug in the JavaMembers class called to wrap a Java object.
In JavaMembers.lookup(), code was added to override the static type. The
code works in the case of an Enumeration returning an Object which would
have to be casted to the appropriate type.
The code does not work when the static type is an interface. In this case,
the interface class is the one which should be reflected, not a parent class
of the dynamic type. A simple staticType.isInterface() check around the
parent traversal code fixes the problem.
Jeff
I have found a couple problems with running Rhino 1.5R2 in a heavily
multi-threaded environment. The attached patches fix the problems.
- org.mozilla.javascript.optimizer.InvokerImpl - This class was accessing
the shared classNumber outside of the synchronized block.
- org.mozilla.javascript.optimizer.OptClassNameHelper - The reset method was
not synchronized. It needs to be because the class using the classNames map
is synchronized and does not handle nulling of the variable while it's
looping on the map.
Jeff
sr=waterson
a=asa
modules/plugin/base/src/nsIPluginInstanceOwner.h
modules/plugin/base/src/nsPluginHostImpl.cpp
modules/plugin/base/src/nsPluginHostImpl.h
modules/plugin/base/src/nsPluginViewer.cpp
modules/oji/src/nsJVMManager.cpp
modules/oji/src/nsJVMManager.h
layout/html/base/src/nsObjectFrame.cpp
xpfe/global/resources/locale/en-US/region.properties
Here's what I did to fix this bug.
I pestered Rick Potts about the problem of
nsIWebBrowserChrome->SetStatus() not being synchronous. He fixed that
under bug 97227.
Taking advantage of Rick's fix to 97227, I modified
nsIPluginInstanceOwner to have new method, ShowStatus(const PRUnichar
*aStatusMsg). This is necessary to allow for localized messages to be
posted from the plugin, such as "Starting plugin for type
application/x-java-vm" or "Beginnen steckbar f�r Art
application/x-java-vm".
I modified all the implementations of nsIPluginInstanceOwner:
layout/html/base/src/nsObjectFrame.cpp
modules/plugin/base/src/nsPluginViewer.cpp
I inserted a call to nsIPluginInstanceOwner->ShowStatus() at the part
just before the big "whole damn app freezes when starting java" thing
happens.
I also modifed nsJVMManager.cpp ShowJavaConsole() to do the same. These
are the two places I know of now that can start java.
make dump tree function taka a param
remove bogus _cache dance
add matchesScriptRecord method to breakpoint record
only do the icode replacement if the breakpoint is enabled in addScriptRecord
change string concats to getMsg calls, to make bidi more better
don't duplicate setBreakpoints()s efforts by checking for matching files in onInputBreak
reimpliment onInputFBreak
remove onInputFClear. future breakpoints can now be cleared wit the standard clear command.
remove dead onScriptCreated function