On Aug 4, 2010, at 3:48 PM, Ryosuke Niwa wrote:

> I think the kind of crashes Ojan is talking about are ones caused by DOM 
> mutation events.  When we're in a middle of a composite event and fire a 
> DOMModified or whatever appropriate mutation event is, JavaScript can come in 
> and remove node, delete the entire document, or some other crazy things.  To 
> avoid this, we have to consider all possible ways in which DOM can be 
> modified.  This is really hard to do, and implementing some of editing 
> commands in JavaScript will at least stop us from crashing although it'll 
> probably end in some unexpected behavior.  But I'd suspect unexpected 
> behavior is better than crashing for most of users.

It’s possible we’ll address this by changing how DOM mutation events work.

It’s true that in JavaScript you can’t use a raw pointer by accident, since all 
pointers to the DOM are automatically RefPtr.

> To put it another way, our not being able to implement the existing editing 
> commands using the public APIs indicates that we're not providing good set of 
> APIs now.

Designing and creating a new lower level set of editing functions that you 
could build higher level commands on top of them seems like a worthwhile thing 
to do. I’m hoping that our existing editing code provides some clues about what 
we’d need. I’d love to see some specific proposals.

    -- Darin

_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to