Closed Bug 523129 Opened 10 years ago Closed 10 years ago
Context .show Document() doesn't work on 1 .9 .2 branch
Java's AppletContext.showDocument() method has stopped working for Java applets on the 1.9.2 branch. At first I thought this was caused by a bug in the JEP. Now I realize it's a bug in how I re-enabled OJI on the 1.9.2 branch (with the patch for bug 517355). I hope to have a patch for this later today. STR: 1) Load Sun's ImageMap sample applet at http://java.sun.com/applets/jdk/1.4/demo/applets/ImageMap/example1.html. 2) Click on the programmer's face. On the 1.9.1 and 1.9.0 branches, this takes you to http://java.sun.com/. On the 1.9.2 branch, nothing appears to happen when you do this. AppletContext.showDocument() is pretty commonly used by Java applets. So I consider this a major bug, and think it should block the FF 3.6 release. Another suite of applets that use AppletContext.showDocument() is at http://brittnysseafood.com/. All the menu items use it -- which means none of them work on the 1.9.2 branch.
Nice catch Steven. Do we have a list of probably other methods too we should check?
I'd say it's best to go through all the applets at bug 371084 comment #3 that are still accessible, plus Sun's demo applets at http://java.sun.com/applets/jdk/1.4/index.html. At some point I'll update the list at bug 371084 with the ones I currently test, plus notes on exactly what I test for. But it'll be a while before I have time for that. Well over half of the applets I test with are already in that list. I don't have a list of methods to check.
Here's a patch. The bug is that, in current code, nsPluginHost::GetURL() only QIs its pluginInst parameter against the nsIPluginInstance interface. The JEP's MRJPlugin.plugin implements nsIPluginInstanceOld -- not nsIPluginInstance. So when a JEP plugin instance (indirectly) calls nsPluginHost::GetURL() (via the obsolete nsIPluginManager "service"), it currently fails because GetURL()'s attempt to QI the pluginInst parameter fails. I've fixed this problem by also QIing pluginInst against the nsIPluginInstanceOld interface (if QIing against nsIPluginInstance fails). Then (if that succeeds) I find the instance of nsIPluginInstance that corresponds to the JEP's instantiation of nsIPluginInstanceOld. nsPluginHost::PostURL() needs the same change. A tryserver build will follow in a few hours.
Here's a tryserver build made with my patch: https://email@example.com/bugzilla523129-macosx.dmg
Steven: using the build in Comment 4 the link directs to the proper site when you click on the Programmer's face. (In reply to comment #4) > Here's a tryserver build made with my patch: > https://firstname.lastname@example.org/bugzilla523129-macosx.dmg
Flags: blocking1.9.2? → blocking1.9.2+
Priority: -- → P2
Target Milestone: --- → mozilla1.9.2
Comment on attachment 407133 [details] [diff] [review] Fix I'm going to rewrite this patch a bit and add comments. I should have another one in a few hours.
Here's my new patch. Though there aren't any substantive changes, I'll make a new tryserver build -- which should be available in a few hours.
Comment on attachment 407362 [details] [diff] [review] Patch rev1 (neaten up and add comments) Argh! Wrong patch. Correct one coming up.
Attachment #407133 - Attachment is obsolete: true
Tryserver build made with my rev1 patch: https://email@example.com/bugzilla523129-rev1-macosx.dmg
This tryserver build looks good. showDocument works fine.
Landed on the 1.9.2 branch: http://hg.mozilla.org/releases/mozilla-1.9.2/rev/d8e0dfccd5fc
Verified fixed with builds on 10.4, 10.5, and 10.6 like Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2b2pre) Gecko/20091022 Namoroka/3.6b2pre ID:20091022033608
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.