Closed Bug 106253 Opened 24 years ago Closed 23 years ago

Plugins aren't adding themselves to load groups

Categories

(Core Graveyard :: Plug-ins, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.0.1

People

(Reporter: jud, Assigned: rpotts)

References

Details

(Keywords: topembed+, Whiteboard: [ADT3 RTM][PATCH ON TRUNK][PL RTM])

Attachments

(6 files, 2 obsolete files)

This causes nsIWebProgressListener "document done" notifications to fire before a plugin is done (which is wrong; affects progress bar among other things). Here's the offending code. I'm hoping Rick has the best ideas on how to get the "right" load group in there :-) http://lxr.mozilla.org/seamonkey/source/modules/plugin/base/src/nsPluginHostImpl.cpp#5246
my suggestion is to get the loadgroup from the document. so, right after getting the document URL, i'd get the load group so... something like this: doc->GetDocumentLoadGroup(getter_AddRefs(loadGroup)); and then pass 'loadgroup' into NS_OpenURI(...). -- rick
Attached patch untested patch... (obsolete) — Splinter Review
Attached patch here is a more complete patch... (obsolete) — Splinter Review
Attachment #54688 - Attachment is obsolete: true
It is important to remember that this patch will defer the firing of the javascript onLoad event until *after* the URL referenced in the plugin tag is completely loaded. if this URL is big (ie. a video stream) then the onLoad event will not fire for a while :-) I believe that this is the correct behavior... but we should verify that this doesn't break backward compatability with NS4 and IE 5(-) -- rick
av, who can best verify this?
Probably me or peterl. Can you advise on how to see the initial problem best?
Blocks: 106411
*** Bug 92989 has been marked as a duplicate of this bug. ***
I tried this patch the other day as I thought it might fix bug 105780 which was is a problem on http://www.the-xfiles.com where the status bar will continually show the plugin loading. Looks good, but there's one missing // XXX: Null LoadGroup? in nsPluginStreamListenerPeer::SetUpCache(). I don't even recall what the purpose of this method is or if it's just bit rotted away. Andrei, do you?
Assignee: av → rpotts
Keywords: patch
OS: Linux → All
Hardware: PC → All
we're close here. av, what about SetUpCache()?
Target Milestone: --- → mozilla0.9.9
Keywords: topembed
Keywords: topembedtopembed+
Target Milestone: mozilla0.9.9 → mozilla1.0
Since this was topembed+, I've nominated it nsbeta1+ because of interest in bug 106411 .
Keywords: nsbeta1+
Rick, does this just need review?
Keywords: review
*** Bug 115998 has been marked as a duplicate of this bug. ***
when will this patch included in the nightly build ????
I guess my only question is whether this is the 'right thing to do' ?? In the case of a stream (or very large file) given to the plugin, the OnLoad event will not fire until AFTER the plugin has consumed all of the data... Is this the 4.x behavior? If so, then the patch does the 'right thing'... -- rick
when i look at my java example and the handling with IExplorer (Sorry, i know, it's not a reference but, but the platform intranets will be developed on :-((( ) then it's correct, that onInit will be fired when the applet is intialized.... there exist a lot of applications depend on onInit will be fired when the plugin is initialized. i don't know about shockwave and other plugins, but when a onInit handler reference them and they arn't initialized, there are the same problems with java... ( problems with javascript, that the method is not registered). if a site has a plugin referenced on the page, they need it for working with the site... there exists a lot of live-connect bugs.. this will solve some of them....
Attachment #54734 - Attachment is obsolete: true
This testcase uses the basic plugin in the previous attachment. It points to a src that will take a long time to download (lxr of nsCSSFrameConstructor.cpp) and fires an alert in the body's onload handler. The good news is that it looks like 4.x has the same behavior of firing the onLoad handler after the initial stream is done. I have not tested the other ways to create streams. However, I'm still getting the "Starting plugin..." message stuck in the status bar. Is this supposed to fix that too?
Attached file simple flash testcase
in this textfile you find 3 files, 2 html and 1 java... you get javascript errors when fireing onLoad before intializing.
adding adt1 to status whiteboard as per discussion with beppe.
Whiteboard: [ADT1]
Changing to ADT3 per ADT triage. This sounds more like an annoyance, than any real damage to the user. Can someone pls explain why this is important?
Summary: Plugins aren't adding themselves to load groups. → Plugins aren't adding themselves to load groups
Whiteboard: [ADT1] → [ADT3]
because a lot of web sites with plugins need the proper handling of the onLoad tag with for example java.... perhabs not in the internet zone, but in the intranet zone you will find a lot of examples, working with ie and java, but not with mozilla and java... because onLoad will not wait until java is intialized... so i think, its an important thing...
I'm still not sure if this bug is related to 108601 (we experience java/javascript-onload-problems, too). However severity of "our" onload-problem is set to critical. Thus I agree with Oliver that this is not an annoyance but a bug which has to be fixed.
personally, i think this is an important bug to fix... i beleive that another benifit of this patch is to allow plugin requests to be cancelled when a page transition occurs... Currently (in Nav 6.21) if a plugin is in the process of downloading a LARGE document, i believe the download continues even *after* the page load has been cancelled :-( -- rick
You've got my r=peterl on this approach. I think attachment 74092 [details] [diff] [review] does the right thing. This patch does not appear to fix bug 106411.
will this patch included to version 1 ??? target milestone is release 1...
Comment on attachment 74092 [details] [diff] [review] same patch updated to the trunk tip sr=jst
Attachment #74092 - Flags: superreview+
Comment on attachment 74092 [details] [diff] [review] same patch updated to the trunk tip carrying over peter's r=, and approving for 1.0 checkin.
Attachment #74092 - Flags: review+
Attachment #74092 - Flags: approval+
Since this fix delays the call to the onLoad handler until the plugin stream is complete, is this going to effect the results of the page-load performance tests?
Adding adt1.0.0 nomination keyword.
Keywords: adt1.0.0
to comment 30... >Since this fix delays the call to the onLoad handler until the plugin stream is >complete, is this going to effect the results of the page-load performance tests? perhabs it will have longer to give the control back to the user.. but for the end-user, the correct display of the page is more important i think...
Pls land this on the trunk to bake for a few days, have QA look, and make sure there are no regressions introduced, then come back to us for approval - ADT
Removing adt1.0.0. Pls renominate once it has been on the trunk a couple days, and been tested.
Keywords: adt1.0.0
the patch is checked into the trunk.
short question... why you don't add also java plugins to the load groups ???
Keywords: adt1.0.0
Shrir, can you test this fix and update the bug with your results. Thx.
bug 106411 hinders me from verifying this bug 'visually' if I understand this bug correctly. If there is any other way that I can check this, or someone can help in verifying this, I will appreciate it. Thanks !
Shrir, you can see this fix by having an event fired in your page's onLoad handler. Before this fix, onLoad would fire BEFORE the URL pointed to in the EMBED's SRC attrribute (or OBJECT's DATA) was completely downloaded. Now, with the fix, onLoad won't be fired until AFTER the plugin's "data" is done. We should do like 4.x now.
Confirmed that this works now. onLoad now only fires only after the plugin has loaded. verified fixed on trunk builds 0416. Attached two tescases work like Peter mentioned.
adt1.0.0+ (on ADTs behalf) approval for checkin to 1.0 branch. Pls check this into the 1.0 branch and trunk today. After, this has landed on the branch, pls add the fixed1.0.0 keyword.
Keywords: adt1.0.0adt1.0.0+
patch checked into the MOZILLA_1_0_0_BRANCH. marking fixed.
Status: NEW → RESOLVED
Closed: 24 years ago
Keywords: fixed1.0.0
Resolution: --- → FIXED
Re-opening this bug and backing out the patch from Mozilla 1.0 branch. This was causing a crash in RealPlugin when playing Real videos as described below: 1. Page has links to several Real videos and an embedded real plugin to display the videos. 2. Click on a link to play a video - as the content begins to load, click on another link to play a different video. 4. Crash. Requesting driver approval to back this out of mozilla 1.0 branch
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
a=dbaron to back out of 1.0 branch
Patch at http://bugzilla.mozilla.org/attachment.cgi?id=74092&action=view has been backed out from the Mozilla 1.0 branch. This bug is now reopened
Note: This was backed out of the 1.0 branch because of this Bugscape crasher: http://bugscape.mcom.com/show_bug.cgi?id=14295 Now the trunk is different than the 1.0 branch w.r.t when the document's onLoad handler fires with plugins on a page.
removing 'fixed 1.0.0' keyword since this was backed out of the branch.
Keywords: fixed1.0.0
Removing adt1.0.0+, becasue this has been reopened, and backed-out of 1.0.
Blocks: 143047
Keywords: adt1.0.0+
Whiteboard: [ADT3] → [ADT3 RTM]
Target Milestone: mozilla1.0 → mozilla1.0.1
Keywords: review
Whiteboard: [ADT3 RTM] → [ADT3 RTM][PATCH ON TRUNK][PL RTM]
*** Bug 121641 has been marked as a duplicate of this bug. ***
-->bringing bug status into sync with reality, the patch is already on the trunk. See the bugscape bug for the problem of Real crashing when the load group request is canceled.
Status: REOPENED → RESOLVED
Closed: 24 years ago23 years ago
Resolution: --- → FIXED
v
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: