EVALUATION
This is a regression introduced late in the 6u10 cycle, likely by
6691927 in build 23 or 6706305 in build 26, but stemming back to
6663106 in build 13.
The rules for initiating JavaScript-to-Java and Java-to-JavaScript
calls (which will be formalized in the forthcoming new LiveConnect
specification) are:
- JavaScript-to-Java calls against a given applet block until that
applet has completed init(), or
- that applet initiates a Java-to-JavaScript call in init().
Barriers introduced with the above fixes were not obeying these rules,
leading to classic deadlock between the browser and attached JVM
instance in some situations.
The fix is twofold:
- If an applet makes a Java-to-JavaScript call in init(), allow
JavaScript-to-Java calls to be made against it.
- If a request comes to the browser from an applet to fetch the
JavaScript window object corresponding to the applet, drain the
queued up messages corresponding to JavaScript-to-Java calls,
which would otherwise occur when init() was completed.
|