Closed
Bug 962241
Opened 10 years ago
Closed 10 years ago
stop NS_ENSURE_SUCCESS spam from ContractIDToCID call added in bug 959485
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: froydnj, Assigned: froydnj)
Details
Attachments
(1 file)
982 bytes,
patch
|
bholley
:
review+
|
Details | Diff | Splinter Review |
This hunk from bug 959485: - if (registrar) { - nsCID *cid; - if (NS_SUCCEEDED(registrar->ContractIDToCID(str, &cid))) { - success = idObj->mDetails.InitWithName(*cid, str); - nsMemory::Free(cid); - } - } + NS_ENSURE_TRUE(registrar, nullptr); + + nsCID *cid; + NS_ENSURE_SUCCESS(registrar->ContractIDToCID(str, &cid), nullptr); + bool success = idObj->mDetails.InitWithName(*cid, str); + nsMemory::Free(cid); + if (!success) + return nullptr; now complains when ContractIDToCID fails, whereas the previous version did not. And ContractIDToCID appears to fail a fair amount on mochitest runs. A chosen-at-random mochitest-2 run contains ~750K of log spam (4k+ messages about this call failure) for no reason. Let's restore the not-complaining behavior.
Assignee | ||
Comment 1•10 years ago
|
||
Just expanding out NS_ENSURE_SUCCESS, essentially. My console is slightly less cluttered now. (The messages seem to be significantly more common when compiling locally, which also makes them significantly more annoying.)
Attachment #8363205 -
Flags: review?(bobbyholley+bmo)
Assignee | ||
Comment 2•10 years ago
|
||
It's also worth noting that this particular NS_ENSURE_SUCCESS is now responsible for ~70% of the NS_ENSURE_SUCCESS spam in a mochitest-2 log on TBPL.
Updated•10 years ago
|
Attachment #8363205 -
Flags: review?(bobbyholley+bmo) → review+
Assignee | ||
Comment 3•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b61eed44de3a
Flags: in-testsuite-
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → nfroyd
Comment 4•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b61eed44de3a
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in
before you can comment on or make changes to this bug.
Description
•