Closed
Bug 241592
Opened 21 years ago
Closed 21 years ago
page with flash object and unsized image never finishes loading
Categories
(Core :: Layout: Images, Video, and HTML Frames, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: danm.moz, Assigned: jst)
References
Details
(Keywords: fixed1.7, regression, testcase)
Attachments
(3 files)
602 bytes,
text/html
|
Details | |
626 bytes,
text/html
|
Details | |
5.05 KB,
patch
|
darin.moz
:
review+
brendan
:
superreview+
brendan
:
approval1.7+
|
Details | Diff | Splinter Review |
A simple page containing nothing but an embedded flash object and an image never
finishes loading if you don't have flash installed, and the image has no size
attributes. It's a somewhat contrived example, but it's curious that giving the
image a size fixes the problem. (This is why I've initially assigned this bug to
the layout component).
You'll have to uninstall Flash. (On my (WinXP) system, just hide
../program/plugins/NPSWF32.dll). Page never finishes loading.
This one does finish loading. The only difference is this:
<img src="http://www.creditunionsrock.com/logos/curocksbutton.gif"
- align="absmiddle">
+ width="100" height="66" align="absmiddle">
More notes: the |align| attribute has no effect. Also for best results, quit and
relaunch between tests. (Sometimes Mozilla will finish loading the "doesn't
load" example after having successfully loaded the "does load" example. But not
always.) I'm using a 20040423 Mozilla 1.8a trunk homebuild.
This looks like bug 241431.
Heh. Yeah, I missed that bug because I was searching for "flash" and
"image|gif|jpg" which was kind of dumb now that I think about it. Anyway these
two bugs do seem very similar. But my attempt to alter a local copy of
anandtech's site so that all its images had explicit sizes didn't help it finish
loading. I may have missed something; it's a big page and an example of image
overuse gone bad.
These two bugs are related. This one may be the same; it's at least a subset.
I'm marking this one dependent and adding a note to that other bug.
Depends on: 241431
Assignee | ||
Comment 6•21 years ago
|
||
*** Bug 241431 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 7•21 years ago
|
||
The reason for this was that since bug 216218 was fixed the browser kept
feeding the default plugin data forever since the default plugin never killed
the stream (it used to just die before due to unimplemented code that just
happened to kill a stream if it wasn't able to write data to a plugin). This
patch makes our default plugin kill the stream whenever its handed data on a
stream, and it also makes calling NPN_DestroyStream() always cancle the stream,
even if the stream is not suspended.
Assignee | ||
Updated•21 years ago
|
Attachment #147415 -
Flags: superreview?(brendan)
Attachment #147415 -
Flags: review?(darin)
Assignee | ||
Updated•21 years ago
|
Comment 8•21 years ago
|
||
- if (mIsSuspended && NS_FAILED(status)) {
+ if (NS_FAILED(status)) {
// We're suspended, and the stream was destroyed, or died for some
// reason. Make sure we cancel the suspended request.
the comment seems to be outdated now
Assignee | ||
Comment 9•21 years ago
|
||
Good catch, I updated the comment to say:
// The stream was destroyed, or died for some reason. Make sure we
// cancel the underlying request.
Comment 10•21 years ago
|
||
Comment on attachment 147415 [details] [diff] [review]
Make the default plugin kill the stream its given, and make killing a stream really kill it.
> ns4xPluginStreamListener::OnStopBinding(nsIPluginStreamInfo* pluginInfo,
...
>- if (mIsSuspended && NS_FAILED(status)) {
>+ if (NS_FAILED(status)) {
> // We're suspended, and the stream was destroyed, or died for some
> // reason. Make sure we cancel the suspended request.
nit: the comment needs to be updated. maybe just start with "The stream
was destroyed,..."
r=darin
Attachment #147415 -
Flags: review?(darin) → review+
Comment 11•21 years ago
|
||
doh! i should have read the last two comments before posting :-)
Comment 12•21 years ago
|
||
Comment on attachment 147415 [details] [diff] [review]
Make the default plugin kill the stream its given, and make killing a stream really kill it.
sr+a=me for 1.7, this is ok for rc2.
/be
Attachment #147415 -
Flags: superreview?(brendan)
Attachment #147415 -
Flags: superreview+
Attachment #147415 -
Flags: approval1.7+
Comment 13•21 years ago
|
||
one more thing:
NPP_PLUGIN_LOG(PLUGIN_LOG_NOISY,
("NPP Write called: this=%p, npp=%p, pos=%d, len=%d, "
"buf=%s, return(written)=%d, url=%s\n",
this, npp, streamPosition, numtowrite,
ptrStreamBuffer, writeCount, mNPStream.url));
+ if (!mStreamStarted) {
+ // The plugin called NPN_DestroyStream() from within
+ // NPP_WriteReady(), kill the stream.
Should the comment here say NPP_Write instead of NPP_WriteReady?
Assignee | ||
Comment 14•21 years ago
|
||
Fix checked in on the trunk.
Assignee | ||
Comment 15•21 years ago
|
||
Fixed on the branch now too.
Assignee | ||
Comment 16•21 years ago
|
||
(In reply to comment #13)
> one more thing:
> NPP_PLUGIN_LOG(PLUGIN_LOG_NOISY,
> ("NPP Write called: this=%p, npp=%p, pos=%d, len=%d, "
> "buf=%s, return(written)=%d, url=%s\n",
> this, npp, streamPosition, numtowrite,
> ptrStreamBuffer, writeCount, mNPStream.url));
>
> + if (!mStreamStarted) {
> + // The plugin called NPN_DestroyStream() from within
> + // NPP_WriteReady(), kill the stream.
>
> Should the comment here say NPP_Write instead of NPP_WriteReady?
Yes, you're right. Fixed.
Updated•21 years ago
|
Flags: blocking1.7?
Updated•7 years ago
|
Product: Core → Core Graveyard
Updated•7 years ago
|
Product: Core Graveyard → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•