Closed
Bug 75623
Opened 24 years ago
Closed 24 years ago
OnStartDocumentLoad() can be called >1 time
Categories
(Core :: DOM: Navigation, defect)
Core
DOM: Navigation
Tracking
()
RESOLVED
FIXED
People
(Reporter: waterson, Assigned: adamlock)
Details
Attachments
(3 files)
3.81 KB,
patch
|
Details | Diff | Splinter Review | |
4.94 KB,
patch
|
Details | Diff | Splinter Review | |
3.78 KB,
patch
|
Details | Diff | Splinter Review |
nsDocLoader::OnStartRequest() has logic that seems to be incorrect.
Specifically, I'm seeing OnStartDocumentLoad() called on a document more than
one time. What appears to be happening is that...
1. The main document's load group has no more URLs, but for some reason still
considers itself to be busy. (My test case has three IFRAMEs; maybe it
has something to do with that.)
2. The scrollbars on one of the IFRAMEs gets painted. This kicks off an image
load to get the scrollbar's background image.
3. The load group's active count goes from zero to one.
This screws up the layout regression tests, and maybe other stuff. I think the
fix is simple; specifically, be sure to check that the load flags are set such
that this is a nsIRequest::LOAD_DOCUMENT_URI.
Reporter | ||
Comment 1•24 years ago
|
||
Reporter | ||
Comment 2•24 years ago
|
||
Sorry the patch is messy. It also includes what I believe to be valid cleanup:
the docloader shouldn't assume that requests are channels. (See bug 75576, e.g.)
The stuff relevant to this bug is moving the code that retrieves the |loadFlags|
in OnStartRequest(), and the additional check to make sure we're doing an
nsIRequest::LOAD_DOCUMENT_URI before calling OnStartDocumentLoad().
Reporter | ||
Comment 3•24 years ago
|
||
Comment 4•24 years ago
|
||
these changes look good and safe to me chris. sr=mscott
Comment 5•24 years ago
|
||
Instead of:
+ *getter_Copies(aStr) = nsCRT::strdup(NS_ConvertUCS2toUTF8(name).get());
you should use:
*getter_Copies(aStr) = ToNewUTF8String(nsLocalString(name));
That saves you a copy (#include "nsReadableUtils.h").
Reporter | ||
Comment 6•24 years ago
|
||
Reporter | ||
Comment 7•24 years ago
|
||
Fix checked in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 8•24 years ago
|
||
Sorry for the bustage. I did a half-assed job of incorporating jag's
recommendation.
You need to log in
before you can comment on or make changes to this bug.
Description
•