Closed Bug 286465 Opened 20 years ago Closed 20 years ago

dragging and dropping a div(?) ###!!! ASSERTION: Unexpected aDocument: 'aDocument == mDocument', file r:/mozilla/layout/base/nsPresShell.cpp, line 5235

Categories

(Core :: DOM: Editor, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: mrbkap)

Details

(Keywords: assertion)

Attachments

(1 file)

dragging and dropping a div(?) ###!!! ASSERTION: Unexpected aDocument: 'aDocument == mDocument', file r:/mozilla/layout/base/nsPresShell.cpp, line 5235 Break: at file r:/mozilla/layout/base/nsPresShell.cpp, line 5235 + aDocument 0x00000000 {mDocumentTitle={...} mDocumentURI={mRawPtr=??? } mDocumentBaseURI={mRawPtr=??? } ...} nsIDocument * + mDocument 0x11d71368 {mChannel={mRawPtr=0x11c65e98 {mRefCnt={mValue=0x00000001 } _mOwningThread={mThread=0x00345000 } mPump={mRawPtr=0x00000000 } ...} } mCompatMode=eCompatibility_NavQuirks mImageMaps={...} ...} nsIDocument * page is about:blank ... xpcom_core.dll!nsDebug::Assertion(const char * aStr=0x020e5a94, const char * aExpr=0x020e5a7c, const char * aFile=0x020e5a54, int aLine=0x00001473) Line 109 C++ > gklayout.dll!PresShell::ContentRemoved(nsIDocument * aDocument=0x00000000, nsIContent * aContainer=0x11ebd150, nsIContent * aChild=0x11ec1bf0, int aIndexInContainer=0xffffffff) Line 5235 + 0x25 C++ editor.dll!nsHTMLEditor::DeleteRefToAnonymousNode(nsIDOMElement * aElement=0x11ec1c0c, nsIContent * aParentContent=0x11ebd150, nsIDocumentObserver * aDocObserver=0x11ecd0a4) Line 181 C++ editor.dll!nsHTMLEditor::EndMoving() Line 449 C++ editor.dll!nsHTMLEditor::SetFinalPosition(int aX=0x000000e7, int aY=0x00000038) Line 465 + 0xb C++ editor.dll!nsHTMLEditor::MouseUp(int aClientX=0x000000e7, int aClientY=0x00000038, nsIDOMElement * aTarget=0x11f57774) Line 655 C++ editor.dll!nsHTMLEditorMouseListener::MouseUp(nsIDOMEvent * aMouseEvent=0x11ec0f48) Line 106 C++ gklayout.dll!DispatchToInterface(nsIDOMEvent * aEvent=0x11ec0f48, nsIDOMEventListener * aListener=0x11de4e68, unsigned int (nsIDOMEvent *)* aMethod=0x01e11440, const nsID & aIID={...}, int * aHasInterface=0x0012f17c) Line 136 + 0xb C++ gklayout.dll!nsEventListenerManager::HandleEvent(nsPresContext * aPresContext=0x1149c6b0, nsEvent * aEvent=0x0012f7a8, nsIDOMEvent * * aDOMEvent=0x0012f3a8, nsIDOMEventTarget * aCurrentTarget=0x11d71414, unsigned int aFlags=0x00000002, nsEventStatus * aEventStatus=0x0012f550) Line 1647 + 0x23 C++ gklayout.dll!nsDocument::HandleDOMEvent(nsPresContext * aPresContext=0x1149c6b0, nsEvent * aEvent=0x0012f7a8, nsIDOMEvent * * aDOMEvent=0x0012f3a8, unsigned int aFlags=0x00000002, nsEventStatus * aEventStatus=0x0012f550) Line 3817 C++ gklayout.dll!nsGenericElement::HandleDOMEvent(nsPresContext * aPresContext=0x1149c6b0, nsEvent * aEvent=0x0012f7a8, nsIDOMEvent * * aDOMEvent=0x0012f3a8, unsigned int aFlags=0x00000007, nsEventStatus * aEventStatus=0x0012f550) Line 2078 + 0x2e C++ gklayout.dll!PresShell::HandleEventInternal(nsEvent * aEvent=0x0012f7a8, nsIView * aView=0x11ee2e70, unsigned int aFlags=0x00000001, nsEventStatus * aStatus=0x0012f550) Line 6056 + 0x31 C++ gklayout.dll!PresShell::HandleEvent(nsIView * aView=0x11ee2e70, nsGUIEvent * aEvent=0x0012f7a8, nsEventStatus * aEventStatus=0x0012f550, int aForceHandle=0x00000000, int & aHandled=0x00000001) Line 5900 + 0x19 C++ gklayout.dll!nsViewManager::HandleEvent(nsView * aView=0x11e44ed0, nsGUIEvent * aEvent=0x0012f7a8, int aCaptured=0x00000000) Line 2497 C++ gklayout.dll!nsViewManager::DispatchEvent(nsGUIEvent * aEvent=0x0012f7a8, nsEventStatus * aStatus=0x0012f684) Line 2217 + 0x14 C++ gklayout.dll!HandleEvent(nsGUIEvent * aEvent=0x0012f7a8) Line 174 C++ gkwidget.dll!nsWindow::DispatchEvent(nsGUIEvent * event=0x0012f7a8, nsEventStatus & aStatus=nsEventStatus_eIgnore) Line 1150 + 0xa C++ gkwidget.dll!nsWindow::DispatchWindowEvent(nsGUIEvent * event=0x0012f7a8) Line 1171 C++ gkwidget.dll!nsWindow::DispatchMouseEvent(unsigned int aEventType=0x0000012d, unsigned int wParam=0x00000000, nsPoint * aPoint=0x00000000) Line 5762 + 0x15 C++ gkwidget.dll!ChildWindow::DispatchMouseEvent(unsigned int aEventType=0x0000012d, unsigned int wParam=0x00000000, nsPoint * aPoint=0x00000000) Line 6018 C++ gkwidget.dll!nsWindow::ProcessMessage(unsigned int msg=0x00000202, unsigned int wParam=0x00000000, long lParam=0x003800e7, long * aRetValue=0x0012fc7c) Line 4419 + 0x1c C++ gkwidget.dll!nsWindow::WindowProc(HWND__ * hWnd=0x000513ca, unsigned int msg=0x00000202, unsigned int wParam=0x00000000, long lParam=0x003800e7) Line 1442 + 0x1b C++ user32.dll!_InternalCallWinProc@20() + 0x28 user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 user32.dll!_DispatchMessageWorker@8() + 0xdc user32.dll!_DispatchMessageW@4() + 0xf gkwidget.dll!nsAppShell::Run() Line 135 C++ appcomps.dll!nsAppStartup::Run() Line 208 C++ mozilla.exe!main1(int argc=0x00000001, char * * argv=0x00348228, nsISupports * nativeApp=0x00bf1470) Line 1325 + 0x20 C++ mozilla.exe!main(int argc=0x00000001, char * * argv=0x00348228) Line 1831 + 0x25 C++ mozilla.exe!mainCRTStartup() Line 398 + 0x11 C kernel32.dll!_BaseProcessStart@4() + 0x23
Attached patch pass a documentSplinter Review
I also see this editing tables. Basically, I think we just need to pass in the correct parent document. Note: I'm not sure why/how this works, but this does get rid of the assertion for me.
Assignee: daniel → mrbkap
Status: NEW → ASSIGNED
Attachment #177720 - Flags: review?(brade)
May I ask why this is only calling ContentRemoved on a single doc observer and not calling it on the document itself, so that all observers will be notified?
Hmm, I could call ContentRemoved() on the document given by GetDocument(). I don't see why editor can make the assumption that it can only call one doc listener (the document is handed to it, probably with an arbitrary number of doc listeners). Note that if I do this, I'll change DeleteRefToAnonymousNode() to not take a doc observer, and simply use GetDocument(). It'd probably be better for an editor person to actually answer your question, though.
Yeah, that question was to people who know the existing code...
Comment on attachment 177720 [details] [diff] [review] pass a document glazou said r=him over IRC. He also said "hyatt told me to do it," so I'll leave this as it is for now. Looking for sr=.
Attachment #177720 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #177720 - Flags: review?(brade)
Attachment #177720 - Flags: review+
Comment on attachment 177720 [details] [diff] [review] pass a document The so-called document observer is just the PresShell in profile ;-)
Attachment #177720 - Flags: superreview?(neil.parkwaycc.co.uk) → superreview+
Yes, but there are document observers other than the presshell, y'know....
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: