Closed
Bug 166085
Opened 23 years ago
Closed 23 years ago
Assertion constructing about: URIs [@nsAboutProtocolHandler:122]
Categories
(Core :: Networking, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: nallen, Assigned: andreas.otte)
References
()
Details
(Keywords: assertion, regression)
Attachments
(2 files, 1 obsolete file)
6.20 KB,
patch
|
bzbarsky
:
review+
darin.moz
:
superreview+
brendan
:
approval+
|
Details | Diff | Splinter Review |
1.15 KB,
patch
|
bzbarsky
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
Win2k 0901 trunk
Assertion on startup when frame loader constructs about:blank URI.
###!!! ASSERTION: base url passed into about protocol handler: '!aBaseURI', file
x:/mozilla/netwerk/protocol/about/src/nsAboutProtocolHandler.cpp, line 122
nsAboutProtocolHandler::NewURI(nsAboutProtocolHandler * const 0x0101a328, const
nsACString & {...}, const char * 0x0012deac, nsIURI * 0x01484250, nsIURI * *
0x0012e044) line 122 + 29 bytes
nsIOService::NewURI(nsIOService * const 0x00fe3028, const nsACString & {...},
const char * 0x0012deac, nsIURI * 0x01484250, nsIURI * * 0x0012e044) line 744 +
39 bytes
NS_NewURI(nsIURI * * 0x0012e044, const nsACString & {...}, const char *
0x0012deac, nsIURI * 0x01484250, nsIIOService * 0x00fe3028) line 105 + 28 bytes
NS_NewURI(nsIURI * * 0x0012e044, const nsAString & {...}, const char *
0x0012deac, nsIURI * 0x01484250, nsIIOService * 0x00000000) line 115 + 35 bytes
nsFrameLoader::LoadFrame(nsFrameLoader * const 0x03905a08) line 179 + 140 bytes
nsHTMLFrameInnerFrame::GetDocShell(nsIDocShell * * 0x0012e120) line 975 + 26
bytes
nsHTMLFrameInnerFrame::ShowDocShell(nsIPresContext * 0x01627798) line 1020 + 32
bytes
nsHTMLFrameInnerFrame::Init(nsHTMLFrameInnerFrame * const 0x038326cc,
nsIPresContext * 0x01627798, nsIContent * 0x0389dc00, nsIFrame * 0x03095484,
nsIStyleContext * 0x03832708, nsIFrame * 0x00000000) line 1173
nsHTMLFrameOuterFrame::Init(nsHTMLFrameOuterFrame * const 0x03095484,
nsIPresContext * 0x01627798, nsIContent * 0x0389dc00, nsIFrame * 0x03832590,
nsIStyleContext * 0x03832678, nsIFrame * 0x00000000) line 391 + 33 bytes
nsCSSFrameConstructor::InitAndRestoreFrame(nsIPresContext * 0x01627798,
nsFrameConstructorState & {...}, nsIContent * 0x0389dc00, nsIFrame *
0x03832590, nsIStyleContext * 0x03832678, nsIFrame * 0x00000000, nsIFrame *
0x03095484) line 6756 + 32 bytes
nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell * 0x015c43e0,
nsIPresContext * 0x01627798, nsFrameConstructorState & {...}, nsIContent *
0x0389dc00, nsIFrame * 0x03832590, nsIAtom * 0x00fedcc8, int 8, nsIStyleContext
* 0x03832678, nsFrameItems & {...}, int 0, int & 0) line 5802
nsCSSFrameConstructor::ConstructFrameInternal(nsIPresShell * 0x015c43e0,
nsIPresContext * 0x01627798, nsFrameConstructorState & {...}, nsIContent *
0x0389dc00, nsIFrame * 0x03832590, nsIAtom * 0x00fedcc8, int 8, nsIStyleContext
* 0x03832678, nsFrameItems & {...}, int 0) line 7374 + 57 bytes
nsCSSFrameConstructor::ConstructFrame(nsIPresShell * 0x015c43e0, nsIPresContext
* 0x01627798, nsFrameConstructorState & {...}, nsIContent * 0x0389dc00,
nsIFrame * 0x03832590, nsFrameItems & {...}) line 7258 + 56 bytes
nsCSSFrameConstructor::ProcessChildren(nsIPresShell * 0x015c43e0,
nsIPresContext * 0x01627798, nsFrameConstructorState & {...}, nsIContent *
0x0317c328, nsIFrame * 0x03832590, int 0, nsFrameItems & {...}, int 0,
nsTableCreator * 0x00000000) line 12245 + 66 bytes
nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell * 0x015c43e0,
nsIPresContext * 0x01627798, nsFrameConstructorState & {...}, nsIContent *
0x0317c328, nsIFrame * 0x038c30dc, nsIAtom * 0x00ff0e60, int 8, nsIStyleContext
* 0x038324e0, nsFrameItems & {...}, int 0, int & 0) line 5823 + 47 bytes
nsCSSFrameConstructor::ConstructFrameInternal(nsIPresShell * 0x015c43e0,
nsIPresContext * 0x01627798, nsFrameConstructorState & {...}, nsIContent *
0x0317c328, nsIFrame * 0x038c30dc, nsIAtom * 0x00ff0e60, int 8, nsIStyleContext
* 0x03832050, nsFrameItems & {...}, int 0) line 7374 + 57 bytes
nsCSSFrameConstructor::ConstructFrame(nsIPresShell * 0x015c43e0, nsIPresContext
* 0x01627798, nsFrameConstructorState & {...}, nsIContent * 0x0317c328,
nsIFrame * 0x038c30dc, nsFrameItems & {...}) line 7258 + 56 bytes
nsCSSFrameConstructor::ProcessChildren(nsIPresShell * 0x015c43e0,
nsIPresContext * 0x01627798, nsFrameConstructorState & {...}, nsIContent *
0x03888368, nsIFrame * 0x038c30dc, int 0, nsFrameItems & {...}, int 0,
nsTableCreator * 0x00000000) line 12245 + 66 bytes
nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell * 0x015c43e0,
nsIPresContext * 0x01627798, nsFrameConstructorState & {...}, nsIContent *
0x03888368, nsIFrame * 0x03883b60, nsIAtom * 0x00fef478, int 8, nsIStyleContext
* 0x03883c5c, nsFrameItems & {...}, int 1, int & 0) line 5823 + 47 bytes
nsCSSFrameConstructor::ConstructFrameInternal(nsIPresShell * 0x015c43e0,
nsIPresContext * 0x01627798, nsFrameConstructorState & {...}, nsIContent *
0x03888368, nsIFrame * 0x03883b60, nsIAtom * 0x00fef478, int 8, nsIStyleContext
* 0x03883c5c, nsFrameItems & {...}, int 1) line 7374 + 57 bytes
nsCSSFrameConstructor::ConstructFrameInternal(nsIPresShell * 0x015c43e0,
nsIPresContext * 0x01627798, nsFrameConstructorState & {...}, nsIContent *
0x03888368, nsIFrame * 0x03883b60, nsIAtom * 0x00ff0dd0, int 8, nsIStyleContext
* 0x03883c5c, nsFrameItems & {...}, int 0) line 7326 + 56 bytes
nsCSSFrameConstructor::ConstructFrame(nsIPresShell * 0x015c43e0, nsIPresContext
* 0x01627798, nsFrameConstructorState & {...}, nsIContent * 0x03888368,
nsIFrame * 0x03883b60, nsFrameItems & {...}) line 7258 + 56 bytes
nsCSSFrameConstructor::ContentInserted(nsCSSFrameConstructor * const
0x015c42b8, nsIPresContext * 0x01627798, nsIContent * 0x02dc1b20, nsIContent *
0x03888368, int -1, nsILayoutHistoryState * 0x00000000, int 0) line 9156
StyleSetImpl::ContentInserted(StyleSetImpl * const 0x015c40f0, nsIPresContext *
0x01627798, nsIContent * 0x02dc1b20, nsIContent * 0x03888368, int -1) line 1537
PresShell::ContentInserted(PresShell * const 0x015c43e8, nsIDocument *
0x01528c88, nsIContent * 0x02dc1b20, nsIContent * 0x03888368, int -1) line 5238
+ 53 bytes
nsXBLResourceLoader::NotifyBoundElements() line 294
nsXBLResourceLoader::StyleSheetLoaded(nsXBLResourceLoader * const 0x038d4f58,
nsICSSStyleSheet * 0x038b20d0, int 1) line 209
CSSLoaderImpl::InsertSheetInDoc(nsICSSStyleSheet * 0x038b20d0, int 2,
nsIContent * 0x00000000, int 1, nsICSSLoaderObserver * 0x038d4f58) line 1455
InsertPendingSheet(void * 0x038fda48, void * 0x038b1b78) line 1020
nsVoidArray::EnumerateForwards(int (void *, void *)* 0x0171a2b0
InsertPendingSheet(void *, void *), void * 0x038b1b78) line 660 + 21 bytes
CSSLoaderImpl::Cleanup(URLKey & {...}, SheetLoadData * 0x038a6b90) line 1084
CSSLoaderImpl::SheetComplete(nsICSSStyleSheet * 0x00000000, SheetLoadData *
0x038a6b90) line 1186
CSSLoaderImpl::ParseSheet(nsIUnicharInputStream * 0x03886ed0, SheetLoadData *
0x038a6b90, int & 1, nsICSSStyleSheet * & 0x038b20d0) line 1221
CSSLoaderImpl::DidLoadStyle(nsIUnicharStreamLoader * 0x038b4058,
nsIUnicharInputStream * 0x03886ed0, SheetLoadData * 0x038a6b90, unsigned int 0)
line 1249 + 50 bytes
SheetLoadData::OnStreamComplete(SheetLoadData * const 0x038a6b90,
nsIUnicharStreamLoader * 0x038b4058, nsISupports * 0x00000000, unsigned int 0,
nsIUnicharInputStream * 0x03886ed0) line 1008
nsUnicharStreamLoader::OnStopRequest(nsUnicharStreamLoader * const 0x038b405c,
nsIRequest * 0x038b8110, nsISupports * 0x00000000, unsigned int 0) line 187
nsJARChannel::OnStopRequest(nsJARChannel * const 0x038b8114, nsIRequest *
0x038b8314, nsISupports * 0x00000000, unsigned int 0) line 606 + 49 bytes
nsOnStopRequestEvent::HandleEvent() line 213
nsARequestObserverEvent::HandlePLEvent(PLEvent * 0x038e7344) line 116
PL_HandleEvent(PLEvent * 0x038e7344) line 643 + 10 bytes
PL_ProcessPendingEvents(PLEventQueue * 0x00f51598) line 573 + 9 bytes
_md_EventReceiverProc(HWND__ * 0x00d30148, unsigned int 49327, unsigned int 0,
long 16061848) line 1308 + 9 bytes
USER32! 77e3a290()
USER32! 77e145b1()
USER32! 77e15b1d()
nsAppShellService::Run(nsAppShellService * const 0x0102f330) line 472
main1(int 1, char * * 0x00276ce8, nsISupports * 0x00000000) line 1513 + 32 bytes
main(int 1, char * * 0x00276ce8) line 1877 + 37 bytes
mainCRTStartup() line 338 + 17 bytes
Assertions trying to list cache entries for either the memory or disk cache.
nsAboutProtocolHandler::NewURI(nsAboutProtocolHandler * const 0x0101a328, const
nsACString & {...}, const char * 0x0012ed0c, nsIURI * 0x03a215e0, nsIURI * *
0x0012ee04) line 122 + 29 bytes
nsIOService::NewURI(nsIOService * const 0x00fe3028, const nsACString & {...},
const char * 0x0012ed0c, nsIURI * 0x03a215e0, nsIURI * * 0x0012ee04) line 744 +
39 bytes
NS_NewURI(nsIURI * * 0x0012ee04, const nsACString & {...}, const char *
0x0012ed0c, nsIURI * 0x03a215e0, nsIIOService * 0x00fe3028) line 105 + 28 bytes
NS_NewURI(nsIURI * * 0x0012ee04, const nsAString & {...}, const char *
0x0012ed0c, nsIURI * 0x03a215e0, nsIIOService * 0x00000000) line 115 + 35 bytes
nsGenericElement::TriggerLink(nsIPresContext * 0x039cadc0, nsLinkVerb
eLinkVerb_Replace, nsIURI * 0x03a215e0, const nsString & {...}, const nsString
& {...}, int 1) line 3116 + 91 bytes
nsGenericHTMLElement::HandleDOMEventForAnchors(nsIContent * 0x03a96668,
nsIPresContext * 0x039cadc0, nsEvent * 0x0012f394, nsIDOMEvent * * 0x0012f2a8,
unsigned int 2, nsEventStatus * 0x0012f6c0) line 1481 + 45 bytes
nsHTMLAnchorElement::HandleDOMEvent(nsHTMLAnchorElement * const 0x03a96668,
nsIPresContext * 0x039cadc0, nsEvent * 0x0012f394, nsIDOMEvent * * 0x0012f2a8,
unsigned int 2, nsEventStatus * 0x0012f6c0) line 359
nsGenericDOMDataNode::HandleDOMEvent(nsGenericDOMDataNode * const 0x03a967e8,
nsIPresContext * 0x039cadc0, nsEvent * 0x0012f394, nsIDOMEvent * * 0x0012f2a8,
unsigned int 1, nsEventStatus * 0x0012f6c0) line 826 + 33 bytes
PresShell::HandleEventInternal(nsEvent * 0x0012f394, nsIView * 0x00000000,
unsigned int 1, nsEventStatus * 0x0012f6c0) line 6105 + 47 bytes
PresShell::HandleEventWithTarget(PresShell * const 0x03a6aa08, nsEvent *
0x0012f394, nsIFrame * 0x03a99c64, nsIContent * 0x03a967e8, unsigned int 1,
nsEventStatus * 0x0012f6c0) line 6074 + 22 bytes
nsEventStateManager::CheckForAndDispatchClick(nsEventStateManager * const
0x03a74e78, nsIPresContext * 0x039cadc0, nsMouseEvent * 0x0012f8c4,
nsEventStatus * 0x0012f6c0) line 2758 + 63 bytes
nsEventStateManager::PostHandleEvent(nsEventStateManager * const 0x03a74e80,
nsIPresContext * 0x039cadc0, nsEvent * 0x0012f8c4, nsIFrame * 0x03a99c64,
nsEventStatus * 0x0012f6c0, nsIView * 0x03a85ca0) line 1761 + 28 bytes
PresShell::HandleEventInternal(nsEvent * 0x0012f8c4, nsIView * 0x03a85ca0,
unsigned int 1, nsEventStatus * 0x0012f6c0) line 6125 + 43 bytes
PresShell::HandleEvent(PresShell * const 0x03a6aa0c, nsIView * 0x03a85ca0,
nsGUIEvent * 0x0012f8c4, nsEventStatus * 0x0012f6c0, int 0, int & 1) line 6028
+ 25 bytes
nsViewManager::HandleEvent(nsView * 0x03a85a20, nsGUIEvent * 0x0012f8c4, int 0)
line 2092
nsView::HandleEvent(nsViewManager * 0x039d02b0, nsGUIEvent * 0x0012f8c4, int 0)
line 301
nsViewManager::DispatchEvent(nsViewManager * const 0x039d02b0, nsGUIEvent *
0x0012f8c4, nsEventStatus * 0x0012f7c4) line 1897 + 23 bytes
HandleEvent(nsGUIEvent * 0x0012f8c4) line 83
nsWindow::DispatchEvent(nsWindow * const 0x03a85adc, nsGUIEvent * 0x0012f8c4,
nsEventStatus & nsEventStatus_eIgnore) line 1034 + 10 bytes
nsWindow::DispatchWindowEvent(nsGUIEvent * 0x0012f8c4) line 1055
nsWindow::DispatchMouseEvent(unsigned int 301, unsigned int 0, nsPoint *
0x00000000) line 5125 + 21 bytes
ChildWindow::DispatchMouseEvent(unsigned int 301, unsigned int 0, nsPoint *
0x00000000) line 5382
nsWindow::ProcessMessage(unsigned int 514, unsigned int 0, long 12779600, long
* 0x0012fcf0) line 3856 + 28 bytes
nsWindow::WindowProc(HWND__ * 0x00ab025e, unsigned int 514, unsigned int 0,
long 12779600) line 1303 + 27 bytes
USER32! 77e3a290()
USER32! 77e145b1()
USER32! 77e15b1d()
nsAppShellService::Run(nsAppShellService * const 0x0102f330) line 472
main1(int 1, char * * 0x00276ce8, nsISupports * 0x00000000) line 1513 + 32 bytes
main(int 1, char * * 0x00276ce8) line 1877 + 37 bytes
mainCRTStartup() line 338 + 17 bytes
Reporter | ||
Comment 2•23 years ago
|
||
To be clear, this is not triggered by entering an about: address in the URL
bar. Here are some events that cause this:
Starting Mozilla.
Opening a new window.
Opening a new tab.
Clicking on list cache entries for memory or disk cache.
Comment 4•23 years ago
|
||
I can't reproduce this, and I have the patch from bug 91439 (but no other patch
from the last week or so)
I guess this must be because of another bug
Reporter | ||
Comment 5•23 years ago
|
||
I bet this was caused by bug 163225. nsIOService used to be nulling out
aBaseURI but that was moved further along in resolution. Except about: handler
never gets that far. Pinging assignee.
Assignee | ||
Comment 6•23 years ago
|
||
Yes, that was me. I will look into it. about now has to be more tolerant about
baseUris. It should just ignore them. Taking.
Status: NEW → ASSIGNED
Assignee | ||
Comment 7•23 years ago
|
||
I think the assertion can simply be removed. The code is already ignoring the
base uri. On the other hand this points to a bad caller. Some code calles an
about uri with a base url which makes no sense because about uris have no
concept of relative urls.
Comment 8•23 years ago
|
||
No, the assertion is correct (JS urls are currently failing because
nsJSProtocolHandler is, um, really stupid, and it tried to clone the base url,
and not all nsiuris are the same. bz is filing a separate bug on that)
The problem is that the URL isn't relative, so passing in a base url is wrong.
The person calling NS_NewURI shouldn't have to care about the scheme of this
string its passing in....
Maybe the ioservice be using the protocolflags, specifically URI_NORELATIVE?
Thats what those flags were designed for, right?
The patch which broke this is checked in on the 1.0 branch, too...
Keywords: mozilla1.0.2
Assignee | ||
Comment 9•23 years ago
|
||
I still think it is okay to remove the assertion. Why does a simple protocol
care if it is called with or without a base uri. It will be ignored anyways. Why
assert?
Assignee | ||
Comment 10•23 years ago
|
||
Assignee | ||
Comment 11•23 years ago
|
||
taking ...
Assignee: new-network-bugs → andreas.otte
Status: ASSIGNED → NEW
Assignee | ||
Comment 12•23 years ago
|
||
Attachment #97522 -
Attachment is obsolete: true
Comment 13•23 years ago
|
||
Comment on attachment 97532 [details] [diff] [review]
patch that removes the assertions from all simple url protocol handlers
sr=darin
Attachment #97532 -
Flags: superreview+
Assignee | ||
Comment 14•23 years ago
|
||
bzbarsky, want to r= ?
![]() |
||
Comment 15•23 years ago
|
||
Comment on attachment 97532 [details] [diff] [review]
patch that removes the assertions from all simple url protocol handlers
r=bzbarsky if we're sure that removing those assertions is the right way to go
(which darin seems to think it is).
Perhaps it makes sense to say in the nsIProtocolHandler comments that protocols
which have flags including URI_NORELATIVE will just ignore the base passed to
NewURI....
Attachment #97532 -
Flags: review+
Comment 16•23 years ago
|
||
even if a protocol handler does not support relative URLs it might want to learn
something else from the base URI, such as the origin charset. so, i think it
best for protocol handlers to just ignore the base URI if it isn't used.
another way to look at it is: why bother adding code to the io service to remove
base URI when it is inappropriate? that would involve checking protocol flags,
etc., which just seems like extra work with no real benefit.
yeah, let's add a comment to nsIProtocolHandler::NewURI stating that NewURI
should ignore aBaseURI if a base URL does not make sense for the protocol.
andreas, can you add this change to your patch? thx!
Assignee | ||
Comment 17•23 years ago
|
||
as Darin suggested. However the interface is frozen! Is it still okay to change
the comment?
Comment 18•23 years ago
|
||
yes, comment changes are perfectly OK.
Assignee | ||
Comment 19•23 years ago
|
||
Then please r=/sr= that part too, so that this can go in as soon as possible.
![]() |
||
Comment 20•23 years ago
|
||
Comment on attachment 97550 [details] [diff] [review]
adding comment to nsIProtocolHandler
r=bzbarsky
Attachment #97550 -
Flags: review+
Comment 21•23 years ago
|
||
Comment on attachment 97550 [details] [diff] [review]
adding comment to nsIProtocolHandler
sr=darin (suggest comma between URI and aBaseURI)
Attachment #97550 -
Flags: superreview+
Assignee | ||
Comment 22•23 years ago
|
||
fix is in on trunk
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 23•23 years ago
|
||
Comment on attachment 97532 [details] [diff] [review]
patch that removes the assertions from all simple url protocol handlers
a=brendan@mozilla.org for checkin to the 1.0 branch -- please change
mozilla1.0.2+ to fixed1.0.2 when you've checked in there. The comment change
in the next patch should go into the branch, too -- please take that as
implicitly approved.
/be
Attachment #97532 -
Flags: approval+
Updated•23 years ago
|
Keywords: mozilla1.0.2 → mozilla1.0.2+
Comment 25•23 years ago
|
||
Please verify the bug. Once verified, change the keyword fixed1.0.2 to
verified1.0.2
Comment 26•23 years ago
|
||
what should I do to verify this bug?
Comment 27•23 years ago
|
||
I checked patch files (nsAboutProtocolHandler.cpp and the others) on lxr and in
mozilla branch build. The assert msgs were removed.
Assignee | ||
Comment 28•23 years ago
|
||
Ben: You should see the assertion at startup in the branch build if they still
were there.
Comment 29•23 years ago
|
||
David: can you look for that on the branch?
Comment 30•23 years ago
|
||
checking LXR should be sufficient for this imo but I checked a debug build and
I'm not seeing any 'base url' assertions on startup.
verified trunk and branch
Status: RESOLVED → VERIFIED
Keywords: fixed1.0.2 → verified1.0.2
You need to log in
before you can comment on or make changes to this bug.
Description
•