Last Comment Bug 744507 - Cleanup GetPriorHTMLSibling/GetNextHTMLSibling
: Cleanup GetPriorHTMLSibling/GetNextHTMLSibling
Product: Core
Classification: Components
Component: Editor (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla14
Assigned To: :Ms2ger
Depends on:
  Show dependency treegraph
Reported: 2012-04-11 11:40 PDT by :Ms2ger
Modified: 2012-04-15 06:41 PDT (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Part a: preparatory cleanup (2.22 KB, patch)
2012-04-11 11:40 PDT, :Ms2ger
ehsan: review+
Details | Diff | Review
Part b: Add nsINode versions (7.55 KB, patch)
2012-04-11 11:41 PDT, :Ms2ger
ehsan: review+
Details | Diff | Review

Description :Ms2ger 2012-04-11 11:40:51 PDT
Created attachment 614087 [details] [diff] [review]
Part a: preparatory cleanup

Note that none of the callers of GetPriorHTMLSibling(nsIDOMNode*, PRInt32, nsCOMPtr<nsIDOMNode>*) looks at the nsresult it returns, so it doesn't matter that we return NS_OK instead of NS_ERROR_NULL_POINTER when |node| is null.

Also note that GetChildAt will return null for out-of-bounds access, so the extra check (only in GetPriorHTMLSibling) isn't necessary.
Comment 1 :Ms2ger 2012-04-11 11:41:27 PDT
Created attachment 614088 [details] [diff] [review]
Part b: Add nsINode versions
Comment 2 :Ehsan Akhgari (busy, don't ask for review please) 2012-04-12 11:35:12 PDT
Comment on attachment 614088 [details] [diff] [review]
Part b: Add nsINode versions

Review of attachment 614088 [details] [diff] [review]:


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