Bug 5774 - Failed assertion `!eventDispatchForbidden()' in dom_nodeimpl.cpp:892
Summary: Failed assertion `!eventDispatchForbidden()' in dom_nodeimpl.cpp:892
Status: VERIFIED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: David Harrison
URL: http://www.macworld.com/news/2005/11/...
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-18 14:35 PST by mitz
Modified: 2005-11-19 00:52 PST (History)
1 user (show)

See Also:


Attachments
Call enableEventDispatch() sooner. (5.12 KB, patch)
2005-11-18 18:27 PST, David Harrison
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2005-11-18 14:35:14 PST
With the fix for bug 5629 in place, the assert in dispatchSubtreeModifiedEvent() actually fails when 
opening the URL. Backtrace:
#3  0x0183cf28 in DOM::NodeImpl::dispatchSubtreeModifiedEvent (this=0xcac35f0, 
sendChildrenChanged=false) at WebCore/khtml/xml/dom_nodeimpl.cpp:892
#4  0x0182b0bc in DOM::NamedAttrMapImpl::addAttribute (this=0xca7ca80, attr=0xca7cab0) at 
WebCore/khtml/xml/dom_elementimpl.cpp:1051
#5  0x0182e70c in DOM::ElementImpl::setAttribute (this=0xcac35f0, name=@0x1a41ab8, 
value=0xcc0fb10, exceptioncode=@0xbfffd9a8) at WebCore/khtml/xml/dom_elementimpl.cpp:394
#6  0x0182e7d8 in DOM::ElementImpl::setAttribute (this=0xcac35f0, name=@0x1a41ab8, 
value=@0xbfffda14) at WebCore/khtml/xml/dom_elementimpl.cpp:308
#7  0x017535d8 in DOM::HTMLBodyElementImpl::insertedIntoDocument (this=0xcac35f0) at WebCore/
khtml/html/html_baseimpl.cpp:187
#8  0x01835fa4 in DOM::ContainerNodeImpl::addChild (this=0xcac2df0, newChild=0xcac35f0) at 
WebCore/khtml/xml/dom_nodeimpl.cpp:2528
#9  0x0179f620 in HTMLParser::insertNode (this=0xcc1c6b0, n=0xcac35f0, flat=false) at WebCore/
khtml/html/htmlparser.cpp:274
Comment 1 mitz 2005-11-18 15:06:12 PST
Here the problem is that during addChild(), HTMLBodyElementImpl::insertedIntoDocument() calls 
setAttribute() which wants to dispatch an event.
Comment 2 David Harrison 2005-11-18 15:57:34 PST
Am working on this.
Comment 3 David Harrison 2005-11-18 18:27:50 PST
Created attachment 4729 [details]
Call enableEventDispatch() sooner.

Call enableEventDispatch() sooner, when basic dom mods are done.
Comment 4 Timothy Hatcher 2005-11-18 18:32:58 PST
Comment on attachment 4729 [details]
Call enableEventDispatch() sooner.

r=me
Comment 5 David Harrison 2005-11-18 18:36:34 PST
Committed.
Comment 6 mitz 2005-11-19 00:52:32 PST
That was fast!