Closed Bug 21728 Opened 25 years ago Closed 25 years ago

URLs load multiple times

Categories

(Core Graveyard :: Embedding: APIs, defect, P3)

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: warrensomebody, Assigned: mscott)

Details

Attachments

(1 file)

I was trying to get some bloat/leak stats by selecting the menu item QA ->
Bloat: Dump New Stats. What I found is that the about:bloat URL is loaded 3
times! This originates from the following menuitem in navigatorOverlay.xul:

      <menuitem value="&BloatDumpNewCmd.label;"
oncommand="window.content.location.href='about:bloat?new'"/>

I'll enclose the stack crawls. The first two stacks look identical and
originate from the SetLocationProperty js call. I would guess this is a
widget bug. The third comes from nsDocumentOpenInfo::OnStartRequest which calls
nsDocumentOpenInfo::DispatchContent -- this could be a url dispatching bug. So
maybe there are 2 bugs here.

There's a third bug which is that after creating 3 bloat log files, the wrong
file ends up being displayed in the end. I'll report that bug separately.

I tried it again selecting the QA -> Bug Writing menu item -- same sort of idea
-- but this one only got loaded twice. Those stacks look like the second and
third ones from the about:bloat case which I would guess to be a url
dispatching bug.

I think fixing this is important since it may induce other problems with normal
browser operation.

This was all done with this morning's build: 12/14/99.
Assignee: trudelle → mscott
Why was this assigned to XPToolkit?  Other menus items are handled once, so it
is more likely that this is an URL dispatching problem, as warren mentions.
reassigning to mscott.
I assigned this to toolkit because I think the first bug is with the menuitem
tag. It seems to be doing the same work twice.

But mscott needs to look at this too, because there seems to be something
broken in the url dispatcher causing the third load.
Component: XP Toolkit/Widgets → Embedding APIs
Summary: menuitems load URLs multiple times → URLs load multiple times
Ok, I see now that this is entirely a URL dispatching problem. The problem is
that nsWebShell.cpp line 1698 in nsWebShell::DoLoadURL it calls NS_OpenURI, and
then in the same function at line 1783 calls LoadDocument if aKickOffLoad is
true (and it defaults to true when called from nsWebShell::LoadURI line 1956).

Mscott's comment on this checkin was:

Bug #14928 --> phase one of uri dispatching landing. webshell is a
nsIURIContent Listener. r=travis.

Changing summary to: URLs load multiple times
from menuitems load URLs multiple times

I'm not sure what we want to do with this except verify it with the new
webshell stuff. Cc'ing travis.
Target Milestone: M14
Seems like a beta stopper
The url was not actually being loaded multiple times as in we weren't actually
requesting the document multiple times. But it was true that DoLoadURL gets
called twice when you load some urls (if the url got dispatched to this webshell
it was only called once). The extra call is necessary until we're done gutting
the doc loader and webshell.


I just wanted to clarify that we aren't physically trying to open the url more
than once. The NS_OpenURI method in there that warren was referring to only
applies to urls that are references to the current document loaded into the
webshell (i.e. with a #fooo) and we only call this once and kick out of the uri
load in this case.
QA Contact: claudius → paulmac
I added protocection in nsWebshell::DoContent so we only call DoLoadURL once per
webshell per url. Marking as fixed.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
I can't verify this w/o a debug build, warren can you look at this and mark it
verified? Thanks.
sorry for the spam, changing QA contact.
QA Contact: paulmac → jrgm
Updating QA Contact
QA Contact: jrgm → mdunn
verified as changed in source
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: