Skip to main content

JSObject Scope Problem (Next Generation Plugin)

5 replies [Last post]
jasuha1
Offline
Joined: 2007-12-27
Points: 0

There are also scope incompatibilities with the next generation plugin.

In Firefox, the things are worse. Iframes throw security exceptions with applets when created dynamically. Plus, applets should obey the z-order of the iframes they live in and should be clipped accordingly. Please add iframe releated test cases to your QA test program.

Message was edited by: jasuha1

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jasuha1
Offline
Joined: 2007-12-27
Points: 0

The real problem was the JSObject reference we cache for every applet is getting garbage collected if an applet is destroyed. Java plugin invalidates all cached JSObjects accross all applets. That is fine though. We can just call getWindow and reclaim it again.

Good news is, after correcting the JSObject isiue, we saw that next gen plugin functions okey. However, the scope problem remains. Plus applets are still do not regard the z-order of iframes in Firefox. The flash plugin on the other hand can obey the z-order if made transparent. If you guys also support transparency with the next gen plugin, the z-order problem may just go away.

I will be posting other problems I find with Next Gen plugin. Now I have to solve this scrope problem for good.

regards

Message was edited by: jasuha1

Message was edited by: jasuha1

jasuha1
Offline
Joined: 2007-12-27
Points: 0

The scope problem was not a scope problem. It was a bug in our code old plugins didn't complain about. It now all works fine with Next Generation Plugin. However, again the z-ordering problem with Firefox browser remains. I will file a bug report to Sun's bug database for that hopefully they would find a solution for it until the release.

The transparency I have mentioned earlier is a good thing and may put more muscle to the Java plugin against competitive(at least partially) technologies such as Flash. And probably will solve the z-ordering problem. If I remember correctly it is the wmode="transparent" parameter from the Object element which needs to be implemented.

I am impressed with you all, the next gen plugin really works well. I believe when you remove the debugging and test code, it will be much more faster. On the other hand, the startup is still slow. I didnt feel any improvement especially on Firefox. I even feel a slow down on initial startup on IE 6.0. Hopefully these are beta version glitches because the plugin itself is promising.

thanks and regards

jasuha1
Offline
Joined: 2007-12-27
Points: 0

Unfortunately, we were unaware that the next gen plugin was meant for Firefox 3.0. All the problems I was afraid of in this thread is there with Firefox 3.0 latest beta. The applets are jailed into the iframe they live in when liveconnect is used. JSObject eval can not access to the top. For the starter here is what we get from the javascript console;

Error: uncaught exception: [Exception... "Security Manager vetoed action" nsresult: "0x80570027 (NS_ERROR_XPC_SECURITY_MANAGER_VETO)" location: "JS frame ::

This may be related to an applet being dynamically added to a dynamically created iframe document. Applet was not instantiated at all.

jasuha1
Offline
Joined: 2007-12-27
Points: 0

We have solved the Exception problem in Firefox. it is the scope related. scripts evaluated by the JSObject can not access "top" and "window" objects when in iframe. Iframes are all dynamically created and applets point to the same server as the top level document does. This was no problem in any of the old plugins with Firefox.

kbr
Offline
Joined: 2003-06-16
Points: 0

I believe we've discussed this in the Java Plug-In forum, and I received your test case via email, but if not, please post further questions in the Java Plug-In forum. Thanks.