Closed Bug 114581 Opened 23 years ago Closed 23 years ago

table.deleteRow() exception not thrown

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows 98
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla0.9.7

People

(Reporter: bernd_mozilla, Assigned: jst)

Details

(Keywords: testcase, Whiteboard: [HAVE FIX])

Attachments

(2 files)

http://www.w3.org/TR/2001/WD-DOM-Level-2-HTML-20011210/html.html#ID-64060425

Indicates that deleteRow() should throw an exeption if the row index to large or
to small.
Attached file testcase
Keywords: testcase
Attached patch Proposed fix.Splinter Review
Status: NEW → ASSIGNED
Whiteboard: [HAVE FIX]
Target Milestone: --- → mozilla0.9.7
Comment on attachment 61232 [details] [diff] [review]
Proposed fix.

>-  if (row) {
>-    nsCOMPtr<nsIDOMNode> parent=nsnull;
>+  if (!row) {
>+    return NS_ERROR_DOM_INDEX_SIZE_ERR;
>+  }
> 
>-    row->GetParentNode(getter_AddRefs(parent));
>+  nsCOMPtr<nsIDOMNode> parent=nsnull;

I know you're just reindenting this, but there's no need for the nsnull
assignment here.

sr=jag if you change that.
Attachment #61232 - Flags: superreview+
Good catch, no more null assignment.

FIXED.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
verified fixed. 2001-12-20-10.
Status: RESOLVED → VERIFIED
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: