Closed
Bug 24354
Opened 26 years ago
Closed 26 years ago
[regression] copy failed in URL bar, assertion copying from URL bar in mozilla
Categories
(Core :: DOM: Selection, defect, P2)
Tracking
()
VERIFIED
FIXED
M13
People
(Reporter: buster, Assigned: scc-obsolete)
References
Details
I selected some text in the URL bar and got an assertion in this code. The copy
operation failed.
/* The following clause needs to go away, as soon as we've caught any
offending callers */
if (aIID.Equals(nsIEnumerator::GetIID())
|| aIID.Equals(nsIBidirectionalEnumerator::GetIID())) {
NS_ASSERTION(0, "(tell scc or mjudge) -- Error: Get new enumerators with
|GetEnumerator|, not |QueryInterface|! Caller must be fixed");
return NS_NOINTERFACE;
}
Stack:
nsDebug::Assertion(char * 0x0194cd2c, char * 0x0194cd28, char * 0x0194ccfc, int
1938) line 186 + 13 bytes
nsDOMSelection::QueryInterface(nsDOMSelection * const 0x02c81e10, const nsID &
{...}, void * * 0x0012f008) line 1938 + 35 bytes
nsGenericDOMDataNode::ConvertContentToXIF(nsXIFConverter & {...}) line 606 + 20
bytes
nsTextNode::ConvertContentToXIF(const nsTextNode * const 0x0385841c,
nsXIFConverter & {...}) line 66 + 18 bytes
nsDocument::BeginConvertToXIF(nsXIFConverter & {...}, nsIDOMNode * 0x03858410)
line 2663
nsDocument::ToXIF(nsDocument * const 0x02c45c20, nsXIFConverter & {...},
nsIDOMNode * 0x03858410) line 2716
nsDocument::ConvertChildrenToXIF(nsXIFConverter & {...}, nsIDOMNode *
0x02c45820) line 2677 + 23 bytes
nsDocument::ToXIF(nsDocument * const 0x02c45c20, nsXIFConverter & {...},
nsIDOMNode * 0x02c45820) line 2717
nsDocument::ConvertChildrenToXIF(nsXIFConverter & {...}, nsIDOMNode *
0x02c45a40) line 2677 + 23 bytes
nsDocument::ToXIF(nsDocument * const 0x02c45c20, nsXIFConverter & {...},
nsIDOMNode * 0x02c45a40) line 2723
nsDocument::CreateXIF(nsDocument * const 0x02c45c20, nsString & {...},
nsIDOMSelection * 0x02c81e10) line 2768 + 29 bytes
PresShell::DoCopy(PresShell * const 0x02c81c00) line 2237
nsHTMLEditor::Copy(nsHTMLEditor * const 0x02c35a00) line 3576 + 26 bytes
nsHTMLEditorLog::Copy(nsHTMLEditorLog * const 0x02c35a00) line 343 + 9 bytes
nsTextEditorKeyListener::ProcessShortCutKeys(nsIDOMEvent * 0x02a4bc54, int & 1)
line 298
nsTextEditorKeyListener::KeyPress(nsIDOMEvent * 0x02a4bc54) line 167
nsEventListenerManager::HandleEvent(nsIPresContext * 0x02c467e0, nsEvent *
0x0012fb60, nsIDOMEvent * * 0x0012f8e8, unsigned int 2, nsEventStatus *
0x0012facc) line 959 + 17 bytes
nsDocument::HandleDOMEvent(nsDocument * const 0x02c45c20, nsIPresContext *
0x02c467e0, nsEvent * 0x0012fb60, nsIDOMEvent * * 0x0012f8e8, unsigned int 2,
nsEventStatus * 0x0012facc) line 2410
nsHTMLHtmlElement::HandleDOMEvent(nsHTMLHtmlElement * const 0x02c45a4c,
nsIPresContext * 0x02c467e0, nsEvent * 0x0012fb60, nsIDOMEvent * * 0x0012f8e8,
unsigned int 2, nsEventStatus * 0x0012facc) line 192 + 41 bytes
nsGenericElement::HandleDOMEvent(nsIPresContext * 0x02c467e0, nsEvent *
0x0012fb60, nsIDOMEvent * * 0x0012f8e8, unsigned int 2, nsEventStatus *
0x0012facc) line 811 + 39 bytes
nsHTMLBodyElement::HandleDOMEvent(nsHTMLBodyElement * const 0x02c4582c,
nsIPresContext * 0x02c467e0, nsEvent * 0x0012fb60, nsIDOMEvent * * 0x0012f8e8,
unsigned int 2, nsEventStatus * 0x0012facc) line 715
nsGenericDOMDataNode::HandleDOMEvent(nsIPresContext * 0x02c467e0, nsEvent *
0x0012fb60, nsIDOMEvent * * 0x0012f8e8, unsigned int 1, nsEventStatus *
0x0012facc) line 799 + 39 bytes
nsTextNode::HandleDOMEvent(nsTextNode * const 0x0385841c, nsIPresContext *
0x02c467e0, nsEvent * 0x0012fb60, nsIDOMEvent * * 0x00000000, unsigned int 1,
nsEventStatus * 0x0012facc) line 234
PresShell::HandleEvent(PresShell * const 0x02c81c04, nsIView * 0x02c94120,
nsGUIEvent * 0x0012fb60, nsEventStatus * 0x0012facc) line 2749 + 39 bytes
nsView::HandleEvent(nsView * const 0x02c94120, nsGUIEvent * 0x0012fb60, unsigned
int 8, nsEventStatus * 0x0012facc, int & 0) line 841
nsView::HandleEvent(nsView * const 0x02c93c60, nsGUIEvent * 0x0012fb60, unsigned
int 8, nsEventStatus * 0x0012facc, int & 0) line 826
nsView::HandleEvent(nsView * const 0x02c818d0, nsGUIEvent * 0x0012fb60, unsigned
int 28, nsEventStatus * 0x0012facc, int & 0) line 826
nsViewManager2::DispatchEvent(nsViewManager2 * const 0x02c816d0, nsGUIEvent *
0x0012fb60, nsEventStatus * 0x0012facc) line 1002
HandleEvent(nsGUIEvent * 0x0012fb60) line 69
nsWindow::DispatchEvent(nsWindow * const 0x02c93d14, nsGUIEvent * 0x0012fb60,
nsEventStatus & nsEventStatus_eIgnore) line 502 + 10 bytes
nsWindow::DispatchWindowEvent(nsGUIEvent * 0x0012fb60) line 523
nsWindow::DispatchKeyEvent(unsigned int 131, unsigned short 99, unsigned int 0)
line 2290 + 15 bytes
nsWindow::OnChar(unsigned int 3, unsigned int 0, unsigned char 0) line 2496
nsWindow::ProcessMessage(unsigned int 258, unsigned int 3, long 3014657, long *
0x0012fdcc) line 2643 + 33 bytes
nsWindow::WindowProc(void * 0x00e7055e, unsigned int 258, unsigned int 3, long
3014657) line 689 + 27 bytes
USER32! 77e71250()
Summary: [regression] copy failed, assertion copying from URL bar in mozilla → [regression] copy failed in URL bar, assertion copying from URL bar in mozilla
Target Milestone: M13
this regression is really a pain, and it looks like it has a simple and safe
fix. Leaving for mike and/or scc to really decide, but putting on M13 for now.
| Assignee | ||
Comment 2•26 years ago
|
||
Here is the fix:
Index: nsGenericDOMDataNode.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/base/src/nsGenericDOMDataNode.cpp,v
retrieving revision 3.31
diff -r3.31 nsGenericDOMDataNode.cpp
606c606
< if (NS_SUCCEEDED(sel->QueryInterface(kIEnumeratorIID, (void **)&
enumerator))) {
---
> if (NS_SUCCEEDED(sel->GetEnumerator(&enumerator))) {
Can we check it in?
Assignee: mjudge → scc
Severity: normal → major
Priority: P3 → P2
QA Contact: elig
data corruption: QA contact field was garbage. nulled it out.
reassigned to scc, who has the fix.
r=buster, a=??? chris, jar?
Updated•26 years ago
|
QA Contact: elig
actually, as written it's a memory leak. You should switch |enumerator| to be
an nsCOMPtr, or add an NS_RELEASE. This leak was present before scott's fix,
but while we're here we should do the right thing.
| Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Comment 5•26 years ago
|
||
Ahh, sure. Here is the patch with the pre-existing leak fixed.
Index: nsGenericDOMDataNode.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/base/src/nsGenericDOMDataNode.cpp,v
retrieving revision 3.31
diff -r3.31 nsGenericDOMDataNode.cpp
605,606c605,606
< nsIEnumerator *enumerator;
< if (NS_SUCCEEDED(sel->QueryInterface(kIEnumeratorIID, (void **)&
enumerator))) {
---
> nsCOMPtr<nsIEnumerator> enumerator;
> if (NS_SUCCEEDED(sel->GetEnumerator(getter_AddRefs(enumerator)))) {
just waiting for approval...
| Assignee | ||
Updated•26 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 6•26 years ago
|
||
fix checked in
Comment 8•26 years ago
|
||
Hrf...Buster or Scott, might you be able to verify this on a Windows debug
build, or allow me to drop by your cubicle for 30 seconds to do so?
(I don't see any way to make a console appear on Windows, and there's no
assertion using this morning's Linux build.)
| Assignee | ||
Comment 9•26 years ago
|
||
Stop by anytime, though I don't have a windows machine...
Comment 10•26 years ago
|
||
elig,
on win32
cd installation directory
mozilla > logfile
tail -f logfile
cutting and pasting stuff into the url bar gets the following
on the win32 2/10 release build.
0.110
DV_E_CLIPFORMAT
S_OK
S_OK
->>>>>>>>>>>>>> Write Clipboard to memory
->>>>>>>>>>>>>> Read Clipboard from memory
Parse Time (this=0243B3E0): Real time 0:0:0, CP time 0.000
DTD Time: Real time 0:0:0, CP time 0.000
Tokenize Time: Real time 0:0:0, CP time 0.000
Parse Time (this=024BB6B0): Real time 0:0:0, CP time 0.000
DTD Time: Real time 0:0:0, CP time 0.000
Tokenize Time: Real time 0:0:0, CP time 0.000
DV_E_CLIPFORMAT
S_OK
S_OK
->>>>>>>>>>>>>> Write Clipboard to memory
->>>>>>>>>>>>>> Read Clipboard from memory
Parse Time (this=024C5390): Real time 0:0:0, CP time 0.000
DTD Time: Real time 0:0:0, CP time 0.000
Tokenize Time: Real time 0:0:0, CP time 0.000
Comment 11•26 years ago
|
||
Thanks! Set up Cygnus tools and Windows's command line is now less annoying. ;)
Verified as fixed. No assertion-like console output appears upon copying selected
& focused text in the URL bar.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•