remove useless null checks after allocating memory with |new|
Categories
(Core :: XPCOM, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: froydnj, Assigned: shravanrn, Mentored)
References
Details
(Whiteboard: [lang=c++])
Attachments
(8 files, 4 obsolete files)
12.61 KB,
patch
|
Details | Diff | Splinter Review | |
2.81 KB,
patch
|
froydnj
:
feedback+
|
Details | Diff | Splinter Review |
1.28 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
20.50 KB,
patch
|
froydnj
:
feedback+
|
Details | Diff | Splinter Review |
19.35 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
15.16 KB,
patch
|
Details | Diff | Splinter Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Comment 1•10 years ago
|
||
Reporter | ||
Comment 2•10 years ago
|
||
Comment 3•10 years ago
|
||
Reporter | ||
Comment 4•10 years ago
|
||
Comment 5•10 years ago
|
||
Reporter | ||
Comment 6•10 years ago
|
||
Comment 7•10 years ago
|
||
Comment 8•10 years ago
|
||
Comment 9•10 years ago
|
||
Comment 10•10 years ago
|
||
Reporter | ||
Comment 11•10 years ago
|
||
Comment 12•10 years ago
|
||
Comment 13•10 years ago
|
||
Comment 14•10 years ago
|
||
Comment 15•10 years ago
|
||
Comment 16•10 years ago
|
||
Comment 17•10 years ago
|
||
Comment 18•10 years ago
|
||
Comment 19•10 years ago
|
||
Comment 20•10 years ago
|
||
Comment 21•10 years ago
|
||
Comment 22•10 years ago
|
||
Comment 23•10 years ago
|
||
Comment 24•10 years ago
|
||
Comment 25•10 years ago
|
||
Updated•10 years ago
|
Comment 26•10 years ago
|
||
Comment 27•10 years ago
|
||
Comment 28•10 years ago
|
||
Comment 29•10 years ago
|
||
Comment 30•10 years ago
|
||
Comment 31•10 years ago
|
||
Reporter | ||
Comment 32•10 years ago
|
||
Comment 33•9 years ago
|
||
Reporter | ||
Comment 35•9 years ago
|
||
Reporter | ||
Comment 36•9 years ago
|
||
Reporter | ||
Comment 37•9 years ago
|
||
Comment 38•9 years ago
|
||
Reporter | ||
Comment 39•9 years ago
|
||
Comment 40•8 years ago
|
||
Comment 41•6 years ago
|
||
Comment 42•6 years ago
|
||
Comment 43•6 years ago
|
||
Reporter | ||
Comment 44•6 years ago
|
||
Reporter | ||
Comment 45•6 years ago
|
||
Comment 46•6 years ago
|
||
Reporter | ||
Comment 47•6 years ago
|
||
Comment 48•6 years ago
|
||
Comment 49•6 years ago
|
||
Reporter | ||
Comment 50•6 years ago
|
||
Comment 51•6 years ago
|
||
fixed the nit in attachment 9032220 [details] [diff] [review] :)
Comment 52•6 years ago
|
||
Nathan, it looks like the changes here are complete. Can you help get it landed?
Comment 53•6 years ago
|
||
Hey i would like to work on this bug. Bit of a noobie here. How do i begin?
Comment 54•6 years ago
|
||
Shravan's going to take a look at rebasing this and getting it landed.
Assignee | ||
Comment 55•6 years ago
|
||
Assignee | ||
Comment 56•6 years ago
|
||
(In reply to Eric Rahm [:erahm] (Away until June 3rd) from comment #54)
Shravan's going to take a look at rebasing this and getting it landed.
Sorry still getting familiar with how mozilla's submission works... Does the above look OK?
Comment 57•6 years ago
|
||
(In reply to Shravan Narayan from comment #56)
Sorry still getting familiar with how mozilla's submission works... Does the above look OK?
The next step is to ask an XPCOM peer to review the patch (though I guess it has been reviewed a few times already), so you should mark Eric Rahm as a reviewer.
I looked at the patch, and I noticed a mistake (which was present in the previous versions). In AString2Double, ToNewCString is not infallible, so the null check for that return value should not be removed. Please fix that and update the patch. Thanks!
Comment 58•6 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #57)
I looked at the patch, and I noticed a mistake (which was present in the previous versions). In AString2Double, ToNewCString is not infallible, so the null check for that return value should not be removed. Please fix that and update the patch. Thanks!
Never mind, I was wrong about that. I didn't realize that moz_xmalloc is infallible.
Comment 59•5 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #58)
(In reply to Andrew McCreight [:mccr8] from comment #57)
I looked at the patch, and I noticed a mistake (which was present in the previous versions). In AString2Double, ToNewCString is not infallible, so the null check for that return value should not be removed. Please fix that and update the patch. Thanks!
Never mind, I was wrong about that. I didn't realize that moz_xmalloc is infallible.
To avoid confusion, we're fixing that in bug 1515419 where we'll convert calls that do a null check to an explicitly fallible version. We should leave it as-is until then.
Comment 60•5 years ago
|
||
Comment 61•5 years ago
|
||
bugherder |
Description
•