Closed Bug 1185399 Opened 9 years ago Closed 9 years ago

Replace macros in pldhash.{cpp.h}

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

Attachments

(2 files)

Yet another step in transforming PLDHashTable away from crust old C code: get rid of the macros.
Attachment #8635884 - Flags: review?(nfroyd) → review+
Comment on attachment 8635885 [details] [diff] [review]
(part 2) - Remove macros from pldhash.cpp

Review of attachment 8635885 [details] [diff] [review]:
-----------------------------------------------------------------

::: xpcom/glue/pldhash.cpp
@@ +334,5 @@
> +/* Compute the address of the indexed entry in table. */
> +PLDHashEntryHdr*
> +PLDHashTable::AddressEntry(uint32_t aIndex)
> +{
> +  return reinterpret_cast<PLDHashEntryHdr*>(mEntryStore + aIndex * mEntrySize);

Wonder if it'd be worth MOZ_ASSERT'ing that aIndex is within bounds.  Not sure how much that would slow things down...
Attachment #8635885 - Flags: review?(nfroyd) → review+
https://hg.mozilla.org/mozilla-central/rev/3bbc89c5395c
https://hg.mozilla.org/mozilla-central/rev/c642708766fd
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: