Closed Bug 523129 Opened 15 years ago Closed 15 years ago

Java's AppletContext.showDocument() doesn't work on 1.9.2 branch

Categories

(Core Graveyard :: Plug-ins, defect, P2)

1.9.2 Branch
All
macOS

Tracking

(status1.9.2 beta2-fixed)

VERIFIED FIXED
mozilla1.9.2
Tracking Status
status1.9.2 --- beta2-fixed

People

(Reporter: smichaud, Assigned: smichaud)

References

()

Details

(Keywords: verified1.9.2)

Attachments

(1 file, 2 obsolete files)

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.
Flags: blocking1.9.2?
Assignee: nobody → smichaud
Status: NEW → ASSIGNED
Blocks: 517355
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.
Attached patch Fix (obsolete) — Splinter Review
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.
Attachment #407133 - Flags: review?(joshmoz)
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://build.mozilla.org/tryserver-builds/smichaud@pobox.com-bugzilla523129/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.
Attachment #407133 - Flags: review?(joshmoz)
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.
Attachment #407362 - Flags: review?(joshmoz)
Attachment #407362 - Attachment is obsolete: true
Attachment #407362 - Flags: review?(joshmoz)
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
Attachment #407366 - Flags: review?(joshmoz) → review+
This tryserver build looks good. showDocument works fine.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
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
Keywords: verified1.9.2
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: