Last Comment Bug 649997 - Remove use of no-longer-needed out param nsresult on nsIHTMLCollection
: Remove use of no-longer-needed out param nsresult on nsIHTMLCollection
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: x86 Mac OS X
: P1 normal (vote)
: mozilla6
Assigned To: Boris Zbarsky [:bz]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-14 07:52 PDT by Boris Zbarsky [:bz]
Modified: 2011-04-28 02:35 PDT (History)
2 users (show)
bzbarsky: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
part 1. Stop touching rv in DO_FOR_EACH_ROWGROUP on table rows collections. (8.27 KB, patch)
2011-04-14 07:57 PDT, Boris Zbarsky [:bz]
peterv: review+
Details | Diff | Review
diff -w of part 1, just in case (7.38 KB, patch)
2011-04-14 07:59 PDT, Boris Zbarsky [:bz]
no flags Details | Diff | Review
part 2. Change nsIHTMLCollection::GetNodeAt to not use an nsresult outparam. (11.09 KB, patch)
2011-04-14 08:01 PDT, Boris Zbarsky [:bz]
no flags Details | Diff | Review
part 2. Change nsIHTMLCollection::GetNodeAt to not use an nsresult outparam. (11.09 KB, patch)
2011-04-14 08:01 PDT, Boris Zbarsky [:bz]
peterv: review+
Details | Diff | Review
part 3. Change nsIHTMLCollection::GetNamedItem to not use an nsresult outparam. (9.97 KB, patch)
2011-04-14 08:03 PDT, Boris Zbarsky [:bz]
peterv: review+
Details | Diff | Review
Interdiff for the part 1 changes (6.38 KB, patch)
2011-04-25 10:44 PDT, Boris Zbarsky [:bz]
no flags Details | Diff | Review

Description Boris Zbarsky [:bz] 2011-04-14 07:52:46 PDT
Now that we have infallible new, the table code can no longer fail.  Patches coming up to remove the gunk.
Comment 1 Boris Zbarsky [:bz] 2011-04-14 07:57:36 PDT
Created attachment 525993 [details] [diff] [review]
part 1.  Stop touching rv in DO_FOR_EACH_ROWGROUP on table rows collections.
Comment 2 Boris Zbarsky [:bz] 2011-04-14 07:59:25 PDT
Created attachment 525995 [details] [diff] [review]
diff -w of part 1, just in case
Comment 3 Boris Zbarsky [:bz] 2011-04-14 08:01:22 PDT
Created attachment 525996 [details] [diff] [review]
part 2.  Change nsIHTMLCollection::GetNodeAt to not use an nsresult outparam.
Comment 4 Boris Zbarsky [:bz] 2011-04-14 08:01:47 PDT
Created attachment 525997 [details] [diff] [review]
part 2.  Change nsIHTMLCollection::GetNodeAt to not use an nsresult outparam.
Comment 5 Boris Zbarsky [:bz] 2011-04-14 08:03:11 PDT
Created attachment 525998 [details] [diff] [review]
part 3.  Change nsIHTMLCollection::GetNamedItem to not use an nsresult outparam.
Comment 6 Peter Van der Beken [:peterv] 2011-04-18 06:24:43 PDT
Comment on attachment 525993 [details] [diff] [review]
part 1.  Stop touching rv in DO_FOR_EACH_ROWGROUP on table rows collections.

This relies on GetTHead/GetTBodies/GetTFoot never returning an error except OOM. Could we replace GetTHead/GetTFoot with nsHTMLTableElement::GetSection (would need to make it public) and maybe have a nsHTMLTableElement::GetTBodies that returns a nsContentList*? nsHTMLTableElement::GetSection should also return a nsIContent*, but I disgress :-/.
Comment 7 Boris Zbarsky [:bz] 2011-04-25 10:44:10 PDT
> nsHTMLTableElement::GetSection should also return a nsIContent*

That would involve QIs at all the callsites.  I don't think that really helps anything.

I added public inline GetTHead and GetTFoot methods that take no args and don't fail and that call GetSection() appropriately.  I then made the existing GetTHead and GetTFoot use those, and made DO_FOR_EACH_ROWGROUP do likewise.

I added a TBodies() function that returns nsContentList and used it in DO_FOR_EACH_ROWGROUP as well.
Comment 8 Boris Zbarsky [:bz] 2011-04-25 10:44:58 PDT
Created attachment 528127 [details] [diff] [review]
Interdiff for the part 1 changes
Comment 10 Peter Van der Beken [:peterv] 2011-04-28 02:35:13 PDT
(In reply to comment #8)
> Interdiff for the part 1 changes

Sweet, thanks!

(In reply to comment #9)
> then pushed http://hg.mozilla.org/mozilla-central/rev/b1c530bf15f3 to fix an
> issue ms2ger noticed in patch2.

Ouch, sorry for missing that :-(.

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