Closed Bug 408831 Opened 17 years ago Closed 17 years ago

add check on defunct for tree accessible

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: surkov, Assigned: surkov)

Details

Attachments

(1 file)

spun off bug 396930. Idea is to add virtual method isDefunct to call it in each method. Tree accessible should override the method to check row on validity.
Attached patch patchSplinter Review
added IsDefunct(), I'll file following up bug to use that method everywhere.
Attachment #294066 - Flags: review?(aaronleventhal)
Attachment #294066 - Flags: review?(aaronleventhal) → review?(marco.zehe)
Comment on attachment 294066 [details] [diff] [review]
patch

> -  NS_ENSURE_TRUE(mTree & mTreeView, NS_ERROR_FAILURE);
> +  if (IsDefunct())
> +    return NS_ERROR_FAILURE;
 
   PRInt32 rowCount = 0;
>    nsresult rv = mTreeView->GetRowCount(rowCount);
   NS_ENSURE_SUCCESS(rv, rv);
 
>    if (mRow < 0 || mRow >= rowCount) {
>      return NS_ERROR_FAILURE;
>    }

Isn't the unchanged part below the inserted "if (isDefunct())" statement also covered in IsDefunct() and should therefore be removed?
Comment on attachment 294066 [details] [diff] [review]
patch

r=MarcoZ with above fixed.
Attachment #294066 - Flags: review?(marco.zehe) → review+
thank you for the catch, Marco. forgot to remove :)
Status: NEW → ASSIGNED
Attachment #294066 - Flags: approval1.9?
Comment on attachment 294066 [details] [diff] [review]
patch

a=beltzner for 1.9
Attachment #294066 - Flags: approval1.9? → approval1.9+
checked in
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Verified using Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b3) Gecko/2008020514 Firefox/3.0b3
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: