Port |Bug 1159972 - Remove the fallible version of PL_DHashTableInit()| to comm-central

RESOLVED FIXED in Thunderbird 40.0

Status

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: aryx, Assigned: philip.chee)

Tracking

({dogfood})

unspecified
Thunderbird 40.0
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

/builds/slave/tb-c-cen-lx-000000000000000000/build/mailnews/db/msgdb/src/nsMsgDatabase.cpp:670:59: error: cannot convert 'mozilla::fallible_t' to 'uint32_t {aka unsigned int}' for argument '4' to 'void PL_DHashTableInit(PLDHashTable*, const PLDHashTableOps*, uint32_t, uint32_t)'
Assignee

Comment 1

4 years ago
Posted patch Patch v1.0Splinter Review
> -    bool ok = PL_DHashTableInit(&mTokenTable, &gTokenTableOps,
> -                                aEntrySize, mozilla::fallible_t(), 128);
> -    mTableInitialized = ok;
> -    NS_ASSERTION(ok, "mTokenTable failed to initialize");
> -    if (!ok)
> -      PR_LOG(BayesianFilterLogModule, PR_LOG_ERROR, ("mTokenTable failed to initialize"));
> +    PL_DHashTableInit(&mTokenTable, &gTokenTableOps, aEntrySize, 128);
> +    mTableInitialized = true;
I suspect that mTableInitialized can be removed too but I'm not a C++ expert
Attachment #8600550 - Flags: feedback?(archaeopteryx)
Assignee

Updated

4 years ago
Attachment #8600550 - Attachment description: WIP Patch - untested → Patch v1.0
Attachment #8600550 - Flags: feedback?(archaeopteryx) → review?(rkent)
Comment on attachment 8600550 [details] [diff] [review]
Patch v1.0

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

Looks good, except you did not go far enough. mTableInitialized is now a worthless variable, so its uses should be removed.

I've attached a patch that you can merge into your patch that does this. r+ with the changes from that patch merged into yours.
Attachment #8600550 - Flags: review?(rkent) → review+
Assignee

Comment 4

4 years ago
(In reply to Kent James (:rkent) from comment #3)
> Created attachment 8600556 [details] [diff] [review]
> Additional changes (to merge into patch V1) removing mTableInitialized

Folded and pushed:
http://hg.mozilla.org/comm-central/rev/853ce1c6d4a1
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 40.0
Assignee: nobody → philip.chee
Keywords: dogfood
You need to log in before you can comment on or make changes to this bug.