As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
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 (⌚ UTC+1/+2)
: Makoto Kato [:m_kato]
Depends on:
  Show dependency treegraph
Reported: 2012-04-11 11:40 PDT by :Ms2ger (⌚ UTC+1/+2)
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 (⌚ UTC+1/+2)
ehsan: review+
Details | Diff | Splinter Review
Part b: Add nsINode versions (7.55 KB, patch)
2012-04-11 11:41 PDT, :Ms2ger (⌚ UTC+1/+2)
ehsan: review+
Details | Diff | Splinter Review

Description User image :Ms2ger (⌚ UTC+1/+2) 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 User image :Ms2ger (⌚ UTC+1/+2) 2012-04-11 11:41:27 PDT
Created attachment 614088 [details] [diff] [review]
Part b: Add nsINode versions
Comment 2 User image :Ehsan Akhgari 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.