+ Changed the way JS wrapper functions for Java instance methods are constructed.
Previously, these were computed the first time that an instance method was
accessed for a particular JavaObject and cached in the native, private portion
of that JavaObject. However, the required call to JS_AddRoot() causes an root
to appear as a link in a cyclical graph, leading to uncollectible objects, i.e.
the JavaObject has a root pointer to the function object and the function has
a parent that points back to the JavaObject. Now, we compute the functions
at the time a class is reflected and use JS_CloneFunctionObject() each time
a JS wrapper function is needed, which is slower, but avoids this GC problem.
git-svn-id: svn://10.0.0.236/trunk@5005 18797224-902f-48f8-a5cc-f745e15eee43
return the same Java object, both for efficiency and so that the '=='
operator works as expected in Java when comparing two JSObjects.
However, it is not possible to hold a reference to a Java object without
inhibiting GC of that object, at least not in a way that is portable
to all vendor's JVMs, i.e. a weak reference. So, for now, JSObject identity
is broken.
git-svn-id: svn://10.0.0.236/trunk@4782 18797224-902f-48f8-a5cc-f745e15eee43
- Revise exception handling runtime info (now called trynotes a la srcnotes)
for more efficient loop control under JSOP_THROW. Avoid all uses of catch
and throw while at it, to make C++ lusers happy.
- Combine JSStackFrame.exception with rval, and rename
JSStackFrame.exceptPending to be ...throwing.
- Optimize JS_TypeOfValue a bit.
- Name, control flow, whitespace, etc. cleanup.
git-svn-id: svn://10.0.0.236/trunk@4772 18797224-902f-48f8-a5cc-f745e15eee43
all element access expressions to strings, e.g. so that obj["3"] and
obj[3] refer to the same property for a JavaArray object.
= Return false when using 'delete' operator on JavaArray objects.
git-svn-id: svn://10.0.0.236/trunk@4714 18797224-902f-48f8-a5cc-f745e15eee43
means that we had to switch from using NSPR hash tables to a private version.
The new jsj_hash.c file is derived from plhash.c, but it provides for an additional
argument to be passed to the hash key comparison function. This capability
is used to pass in the JNIEnv pointer.
On shutdown, LiveConnect now removes all references to Java objects and classes,
so that the JVM might be able to GC them.
git-svn-id: svn://10.0.0.236/trunk@4706 18797224-902f-48f8-a5cc-f745e15eee43
Java objects, because otherwise at least one JVM is reticent about
GC'ing them.
git-svn-id: svn://10.0.0.236/trunk@4656 18797224-902f-48f8-a5cc-f745e15eee43
= Aggressively track and release JNI local references to constructed
Java objects, because otherwise at least one JVM is reticent about
GC'ing them.
git-svn-id: svn://10.0.0.236/trunk@4655 18797224-902f-48f8-a5cc-f745e15eee43
Added new targets (JavaScriptNoJSJ$D) to build JavaScript without JSJ dependency.
git-svn-id: svn://10.0.0.236/trunk@4611 18797224-902f-48f8-a5cc-f745e15eee43
that overloaded method resolution works the same as before, although probably
only with the Sun JVM, because this order isn't specified anywhere.
git-svn-id: svn://10.0.0.236/trunk@4561 18797224-902f-48f8-a5cc-f745e15eee43
command' hack - the resolver defined by js.c would get called to look
up 'assign' - and on Irix systems, it would find the 'assign' command
in the current path, and decide to define a function called 'assign'
in the global object that would run the assign command. Then when an
attempt was made to assign a property to the global object, the assign
command would get run, and unexpected behavior followed.
git-svn-id: svn://10.0.0.236/trunk@4461 18797224-902f-48f8-a5cc-f745e15eee43
hint of JSTYPE_NUMBER. This is a case that nobody cares about, but it's
used in a LiveConnect test case.
Added more registered Java packages for reduced server-roundtrips. Also,
loosened restrictions on accessing unregistered packages under "java" and
some of the other packages, in case Sun or somebody adds a "java.fooBar"
package.
git-svn-id: svn://10.0.0.236/trunk@4398 18797224-902f-48f8-a5cc-f745e15eee43