Last Comment Bug 761299 - Cleanup DeleteRangeTxn::CreateTxnsToDeleteBetween
: Cleanup DeleteRangeTxn::CreateTxnsToDeleteBetween
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Editor (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla16
Assigned To: :Ms2ger (⌚ UTC+1/+2)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-04 13:31 PDT by :Ms2ger (⌚ UTC+1/+2)
Modified: 2012-06-06 03:28 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (3.62 KB, patch)
2012-06-04 13:31 PDT, :Ms2ger (⌚ UTC+1/+2)
ehsan: review+
Details | Diff | Splinter Review

Description :Ms2ger (⌚ UTC+1/+2) 2012-06-04 13:31:41 PDT
Created attachment 629903 [details] [diff] [review]
Patch v1
Comment 1 :Ehsan Akhgari 2012-06-04 13:51:35 PDT
Comment on attachment 629903 [details] [diff] [review]
Patch v1

Review of attachment 629903 [details] [diff] [review]:
-----------------------------------------------------------------

::: editor/libeditor/base/DeleteRangeTxn.cpp
@@ +268,2 @@
>  
> +    child = child->GetNextSibling();

Please loop on |child|, not the child count.
Comment 2 :Ms2ger (⌚ UTC+1/+2) 2012-06-04 13:58:41 PDT
Comment on attachment 629903 [details] [diff] [review]
Patch v1

Review of attachment 629903 [details] [diff] [review]:
-----------------------------------------------------------------

::: editor/libeditor/base/DeleteRangeTxn.cpp
@@ +253,5 @@
> +  }
> +
> +  nsCOMPtr<nsINode> startParent = do_QueryInterface(aStartParent);
> +  NS_ENSURE_STATE(startParent);
> +  NS_ASSERTION(aEndOffset <= startParent->Length(), "bad aEndOffset");

This should actually be GetChildCount() (which doesn't make any difference)
Comment 3 :Ehsan Akhgari 2012-06-04 14:01:09 PDT
Comment on attachment 629903 [details] [diff] [review]
Patch v1

Review of attachment 629903 [details] [diff] [review]:
-----------------------------------------------------------------

::: editor/libeditor/base/DeleteRangeTxn.cpp
@@ +253,5 @@
> +  }
> +
> +  nsCOMPtr<nsINode> startParent = do_QueryInterface(aStartParent);
> +  NS_ENSURE_STATE(startParent);
> +  NS_ASSERTION(aEndOffset <= startParent->Length(), "bad aEndOffset");

Right.

@@ +268,2 @@
>  
> +    child = child->GetNextSibling();

NM.
Comment 4 :Ms2ger (⌚ UTC+1/+2) 2012-06-06 03:28:50 PDT
https://hg.mozilla.org/mozilla-central/rev/42c17eb4789a

Note You need to log in before you can comment on or make changes to this bug.