Closed Bug 851834 Opened 7 years ago Closed 7 years ago

Remove nsISupportsArray from layout/xul/tree

Categories

(Core :: Layout, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: WeirdAl, Assigned: WeirdAl)

References

Details

Attachments

(1 file, 1 obsolete file)

This should be simple enough.  I'm starting with a conversion to nsCOMArray<nsIAtom>, though I may go further.
Attached patch patch (obsolete) — Splinter Review
This patch is untested aside from compiling.  I'll test it later tonight.
Comment on attachment 725896 [details] [diff] [review]
patch

Tested now and it works.
Attachment #725896 - Flags: review?(neil)
Comment on attachment 725896 [details] [diff] [review]
patch

>-    int32_t index;
>-    mScratchArray->GetIndexOf(curr->mAtom, &index);
>+    int32_t index = mScratchArray.IndexOf(curr->mAtom);
>     if (index == -1) {
.Contains()

Maybe this should really be a Set, not an Array... I'm not sure whether the overhead justifies it though.

>-    nsCOMPtr<nsIAtom> pseudo = do_QueryElementAt(aInputWord, i);
>+    nsIAtom* pseudo = aInputWord[i];
>     nsTransitionKey key(currState->GetStateID(), pseudo);
Just inline this, it's not used anywhere else.

>+typedef nsCOMArray<nsIAtom> AtomArray;
[I wasn't convinced but it turns out you're not the first to do this!]
Attachment #725896 - Flags: review?(neil) → review+
Attached patch patch with r+Splinter Review
Attachment #726682 - Flags: checkin?
Attachment #725896 - Attachment is obsolete: true
Attachment #726682 - Flags: checkin?
https://hg.mozilla.org/mozilla-central/rev/9d2e25c5011e
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.