Bug 30314 - Two ASSERTS and a NULL ptr read AV in WebCore::Node::document
Summary: Two ASSERTS and a NULL ptr read AV in WebCore::Node::document
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P1 Normal
Assignee: Nobody
URL: http://skypher.com/SkyLined/Repro/Web...
Keywords: HasReduction, InRadar
Depends on:
Blocks:
 
Reported: 2009-10-12 14:43 PDT by Berend-Jan Wever
Modified: 2012-05-25 00:11 PDT (History)
6 users (show)

See Also:


Attachments
Repro (283 bytes, text/html)
2009-10-12 14:43 PDT, Berend-Jan Wever
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Berend-Jan Wever 2009-10-12 14:43:35 PDT
Created attachment 41060 [details]
Repro

Repro:
<HTML>
  <BODY onload="go()"></BODY>
  <SCRIPT>
    function go() {
      document.execCommand("selectall");
      document.designMode="on";
      document.execCommand("insertimage");
      document.execCommand("indent");
      setTimeout(go, 1);
    }
  </SCRIPT>
</HTML>

1st ASSERT: "start == end" in WebCore::CompositeEditCommand::splitTreeToNode

PassRefPtr<Node> CompositeEditCommand::splitTreeToNode(Node* start, Node* end, bool splitAncestor)
{
    ASSERT(start != end);

2nd ASSERT: "this == 0" and NULL ptr read AV in WebCore::Node::document

    Document* document() const
    {
        ASSERT(this);
        ASSERT(m_document || (nodeType() == DOCUMENT_TYPE_NODE && !inDocument()));
Comment 1 Mark Rowe (bdash) 2009-10-12 15:55:47 PDT
The GoogleBug keyword indicates that this affects a Google web property.  Did you mean to add that keyword?
Comment 2 Mark Rowe (bdash) 2009-10-12 16:00:27 PDT
<rdar://problem/7296904>
Comment 3 Berend-Jan Wever 2009-10-12 16:02:01 PDT
Sorry, could you define "Google web property"? I used the label because this
affects Google Chrome. I have been filing all WebKit bugs with this label if
they affect Google Chrome for a long time - is that incorrect?
Comment 4 Mark Rowe (bdash) 2009-10-12 16:33:43 PDT
The keyword is intended to indicate that the bug impacts a Google site like Gmail, Google Docs, etc.
Comment 5 Ryosuke Niwa 2010-08-11 18:20:03 PDT
This bug is caused by indentIntoBlockquote's trying to insert a blockquote before body element.  This might be an issue with startOfParagraph because it's returning the body element when VS points at an image, which is the first child of body.  This causes outerBlock = start.node() = nodeToSplitTo to be the root editable element.  Obviously, inserting an element before the root editable root isn't right, not to mention before the body element.

Justin, Enrica, Eric: Do you know if startOfParagraph should ever return body?  I don't think this makes any sense.
Comment 6 Ryosuke Niwa 2012-05-25 00:11:58 PDT
This crash no longer reproduces.