Closed Bug 1160647 Opened 9 years ago Closed 9 years ago

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

Categories

(MailNews Core :: Build Config, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 40.0

People

(Reporter: aryx, Assigned: philip.chee)

References

Details

(Keywords: dogfood)

Attachments

(2 files)

/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)'
Attached 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)
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+
(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
Closed: 9 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.