Closed
Bug 128223
Opened 23 years ago
Closed 23 years ago
ASSERTION: you're always supposed to return an enumerator from GetEnumerator, punk.
Categories
(Core Graveyard :: RDF, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: timeless)
Details
Attachments
(1 file)
|
685 bytes,
patch
|
tingley
:
review+
darin.moz
:
superreview+
shaver
:
approval+
|
Details | Diff | Splinter Review |
This is the stack that will lead to the assertion:
FileSystemDataSource::GetFolderList(nsIRDFResource * 0x022f8cf0, int 0, int 0,
nsISimpleEnumerator * * 0x02ddf490) line 1262
FileSystemDataSource::GetTargets(FileSystemDataSource * const 0x02de2bf0,
nsIRDFResource * 0x022f8cf0, nsIRDFResource * 0x012c5030, int 1,
nsISimpleEnumerator * * 0x02ddf490) line 679 + 17 bytes
CompositeAssertionEnumeratorImpl::GetEnumerator(nsIRDFDataSource * 0x02de2bf0,
nsISimpleEnumerator * * 0x02ddf490) line 571 + 37 bytes
CompositeEnumeratorImpl::HasMoreElements(CompositeEnumeratorImpl * const
0x02ddf480, int * 0x0012deb4) line 239 + 22 bytes
nsRDFConMemberTestNode::FilterInstantiations(InstantiationSet & {...}, void *
0x0012e1cc) line 389 + 42 bytes
TestNode::Propagate(const InstantiationSet & {...}, void * 0x0012e1cc) line
1044 + 19 bytes
TestNode::Propagate(const InstantiationSet & {...}, void * 0x0012e1cc) line
1054
RootNode::Propagate(const InstantiationSet & {...}, void * 0x0012e1cc) line 760
+ 30 bytes
nsXULContentBuilder::CreateContainerContents(nsIContent * 0x01262c70,
nsIRDFResource * 0x022f8cf0, int 0, nsIContent * * 0x00000000, int *
0x00000000) line 1297
nsXULContentBuilder::CreateTemplateAndContainerContents(nsIContent *
0x01262c70, nsIContent * * 0x00000000, int * 0x00000000) line 1217
nsXULContentBuilder::CreateContents(nsXULContentBuilder * const 0x02ddeaf0,
nsIContent * 0x01262c70) line 1761
nsXULElement::EnsureContentsGenerated() line 3641 + 27 bytes
nsXULElement::ChildCount(const nsXULElement * const 0x01262c70, int & 26013482)
line 2179 + 8 bytes
nsXULElement::GetChildNodes(nsXULElement * const 0x01262c74, nsIDOMNodeList * *
0x0012e604) line 780 + 20 bytes
nsBindingManager::GetContentListFor(nsBindingManager * const 0x022eeed0,
nsIContent * 0x01262c70, nsIDOMNodeList * * 0x0012e604) line 628 + 27 bytes
nsXBLBinding::GenerateAnonymousContent(nsXBLBinding * const 0x039179d0) line
658 + 72 bytes
nsXBLService::LoadBindings(nsXBLService * const 0x0229b570, nsIContent *
0x01262c70, const nsAString & {...}, int 0, nsIXBLBinding * * 0x0012ea08, int *
0x0012e9f8) line 709
nsCSSFrameConstructor::ConstructFrameInternal(nsIPresShell * 0x0230bb30,
nsIPresContext * 0x0230ad90, nsFrameConstructorState & {...}, nsIContent *
0x01262c70, nsIFrame * 0x02f01a68, nsIAtom * 0x012c4f50, int 8, nsIStyleContext
* 0x02e6ea50, nsFrameItems & {...}, int 0) line 6995 + 58 bytes
nsCSSFrameConstructor::ConstructFrame(nsIPresShell * 0x0230bb30, nsIPresContext
* 0x0230ad90, nsFrameConstructorState & {...}, nsIContent * 0x01262c70,
nsIFrame * 0x02f01a68, nsFrameItems & {...}) line 6958 + 56 bytes
nsCSSFrameConstructor::ContentAppended(nsCSSFrameConstructor * const
0x0230bf50, nsIPresContext * 0x0230ad90, nsIContent * 0x02dddac0, int 5) line
8176
StyleSetImpl::ContentAppended(StyleSetImpl * const 0x0230a050, nsIPresContext *
0x0230ad90, nsIContent * 0x02dddac0, int 5) line 1436
PresShell::ContentAppended(PresShell * const 0x0230bb38, nsIDocument *
0x022ed350, nsIContent * 0x02dddac0, int 5) line 5141 + 49 bytes
nsXULDocument::ContentAppended(nsXULDocument * const 0x022ed350, nsIContent *
0x02dddac0, int 5) line 2132
nsXULContentBuilder::OpenContainer(nsIContent * 0x02dddf60) line 2001 + 39
bytes
nsXULContentBuilder::AttributeChanged(nsXULContentBuilder * const 0x02ddeaf8,
nsIDocument * 0x022ed350, nsIContent * 0x02dddf60, int 0, nsIAtom * 0x012c3ad0,
int 2, int -1) line 1789
nsXULDocument::AttributeChanged(nsXULDocument * const 0x022ed350, nsIContent *
0x02dddf60, int 0, nsIAtom * 0x012c3ad0, int 2, int -1) line 2079
nsXULElement::SetAttr(nsXULElement * const 0x02dddf60, nsINodeInfo *
0x012152a0, const nsAString & {...}, int 1) line 2733
nsXULElement::SetAttribute(nsXULElement * const 0x02dddf64, const nsAString &
{...}, const nsAString & {...}) line 1329 + 31 bytes
nsMenuFrame::OpenMenu(nsMenuFrame * const 0x02e317f0, int 1) line 749 + 57
bytes
nsMenuFrame::ToggleMenuState(nsMenuFrame * const 0x02e31770) line 555
nsMenuFrame::HandleEvent(nsMenuFrame * const 0x02e31770, nsIPresContext *
0x0230ad90, nsGUIEvent * 0x0012f910, nsEventStatus * 0x0012f720) line 423
PresShell::HandleEventInternal(nsEvent * 0x0012f910, nsIView * 0x0230a2d0,
unsigned int 1, nsEventStatus * 0x0012f720) line 6018 + 38 bytes
PresShell::HandleEvent(PresShell * const 0x0230bb34, nsIView * 0x0230a2d0,
nsGUIEvent * 0x0012f910, nsEventStatus * 0x0012f720, int 1, int & 1) line 5926
+ 25 bytes
nsViewManager::HandleEvent(nsView * 0x0230a2d0, nsGUIEvent * 0x0012f910, int 0)
line 2043
nsView::HandleEvent(nsViewManager * 0x0230a480, nsGUIEvent * 0x0012f910, int 0)
line 306
nsViewManager::DispatchEvent(nsViewManager * const 0x0230a480, nsGUIEvent *
0x0012f910, nsEventStatus * 0x0012f810) line 1857 + 23 bytes
HandleEvent(nsGUIEvent * 0x0012f910) line 83
nsWindow::DispatchEvent(nsWindow * const 0x0230a194, nsGUIEvent * 0x0012f910,
nsEventStatus & nsEventStatus_eIgnore) line 856 + 10 bytes
nsWindow::DispatchWindowEvent(nsGUIEvent * 0x0012f910) line 877
nsWindow::DispatchMouseEvent(unsigned int 302, unsigned int 1, nsPoint *
0x00000000) line 4617 + 21 bytes
ChildWindow::DispatchMouseEvent(unsigned int 302, unsigned int 1, nsPoint *
0x00000000) line 4869
nsWindow::ProcessMessage(unsigned int 513, unsigned int 1, long 4980864, long *
0x0012fd20) line 3505 + 28 bytes
nsWindow::WindowProc(HWND__ * 0x00830d62, unsigned int 513, unsigned int 1,
long 4980864) line 1121 + 27 bytes
USER32! 77e12e98()
USER32! 77e130e0()
USER32! 77e15824()
nsAppShellService::Run(nsAppShellService * const 0x012cd310) line 308
This is the code:
nsresult
FileSystemDataSource::GetFolderList(nsIRDFResource *source, PRBool allowHidden,
PRBool onlyFirst, nsISimpleEnumerator** aResult)
{
if (!isDirURI(source))
return(NS_RDF_NO_VALUE); // <- current line
- source 0x022f8cf0
- [nsRDFResource] {...}
+ nsIRDFResource {...}
mRefCnt 16
_mOwningThread 0x00302ca0
+ gRDFService 0x0121f8a0
gRDFServiceRefCnt 751
+ mURI 0x022f8ca0 "file:///C|/WINDOWS/Favorites/"
+ mDelegates 0x00000000
+ nsIRDFNode {...}
That's ugly, since c:\ doesn't exist.
>C:
The system cannot find the drive specified.
- aResult 0x02ddf490
+ 0x00000000
Up one stack frame:
else if (isFileURI(source))
{
if (property == kNC_Child)
{
return GetFolderList(source, PR_FALSE, PR_FALSE, targets);
/* <-current line for this stack frame
I'd argue the bug is here.
*/
hrm, steps to reproduce? i clicked on the bookmarks button on my personal
toolbar.
Ah, so how'd this happen? I migrated this profile from a w98se box @ work which
of course had a c:\windows\favorites ... the profile now lives on my w2k box
@home which is much more creative.
seth you wrote the assert, i think i'm going to add an if (rv == NS_RDF_NO_VALUE) continue; before the assert since it seems perfectly valid.
Assignee: waterson → timeless
Comment 4•23 years ago
|
||
I think this is probably the right thing to do. I can't find any datasource
implementations that return empty enumerators in the NS_RDF_NO_VALUE case for
the sorts of calls that would cause this (GetTargets, GetSources, etc), and I'm
not convinced they should have to.
Comment 5•23 years ago
|
||
Comment on attachment 71873 [details] [diff] [review]
no rdf value is a valid return
r=tingley
Attachment #71873 -
Flags: review+
Updated•23 years ago
|
Attachment #71873 -
Flags: superreview+
Comment 6•23 years ago
|
||
Comment on attachment 71873 [details] [diff] [review]
no rdf value is a valid return
sr=darin (looks correct/safe to me)
Comment 7•23 years ago
|
||
Comment on attachment 71873 [details] [diff] [review]
no rdf value is a valid return
a=shaver for 0.9.9.
Attachment #71873 -
Flags: approval+
Comment 8•23 years ago
|
||
fix checked in.
/cvsroot/mozilla/rdf/base/src/nsCompositeDataSource.cpp,v <--
nsCompositeDataSource.cpp
new revision: 1.56; previous revision: 1.55
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•