Closed Bug 1150197 Opened 10 years ago Closed 10 years ago

Remove useless null checks after allocating memory with |new| from xpcom/threads/

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: froydnj, Assigned: atifhans, Mentored)

References

Details

(Whiteboard: [lang=c++])

Attachments

(1 file)

No description provided.
This is the fresh patch with changes suggested by Nathan. Only checks after explicit allocation from new were removed. I tried to trace through the function calls for the rest of the cases, but couldn't find initial allocation by new.
Attachment #8587484 - Flags: review?(nfroyd)
Also while generating the patch for new changes, the new patch file stores the incremental diffs only. Is there a way to generate a patch file which incorporates all the changes i have made to my source tree till now. For the previous patch i had to use hg update --clean and redo my changes to generate the patch from start.
Comment on attachment 8587484 [details] [diff] [review] Removes useless null checks after allocating from |new| from the files in xpcom/threads directory. Review of attachment 8587484 [details] [diff] [review]: ----------------------------------------------------------------- Looks great, thank you!
Attachment #8587484 - Flags: review?(nfroyd) → review+
(In reply to Atif Iqbal Ahangar [:atifhans] from comment #2) > Also while generating the patch for new changes, the new patch file stores > the incremental diffs only. Is there a way to generate a patch file which > incorporates all the changes i have made to my source tree till now. For the > previous patch i had to use hg update --clean and redo my changes to > generate the patch from start. How were you generating the patch file in the first place, before you made your changes to nsEnvironment.cpp? Were you using |hg commit| or something else?
Flags: needinfo?(atif.hans)
I just followed the steps from codefirefox.com video http://codefirefox.com/video/patch-changes. The command I used was: |hg qnew bug1150197_remove_useless_null_checks_in_xpcom_thread.diff -m "Bug 1150197 - Remove useless null checks after allocating memory with new from xpcom/threads/"| It also mentions about |hg qref| which updates previous patch file with new changes, but in my case I had to create a new patch file with all the changes. Maybe I will read a tutorial about Mercurial, I am using it for the first time.
Flags: needinfo?(atif.hans)
(In reply to Atif Iqbal Ahangar [:atifhans] from comment #5) > I just followed the steps from codefirefox.com video > http://codefirefox.com/video/patch-changes. The command I used was: > |hg qnew bug1150197_remove_useless_null_checks_in_xpcom_thread.diff -m "Bug > 1150197 - Remove useless null checks after allocating memory with new from > xpcom/threads/"| Ah, OK. > It also mentions about |hg qref| which updates previous patch file with new > changes, but in my case I had to create a new patch file with all the > changes. Yes, |hg qref| is what you want to use in this case: the workflow would look something like: 1. Make some changes. 2. hg qnew no-null-checks.patch -m "..." 3. Make some more changes. 4. hg qref and then no-null-checks.patch will be updated with the changes you made in step 3.
I don't have commit access and edit bug permissions. Can you check in this for me.
(In reply to Atif Iqbal Ahangar [:atifhans] from comment #7) > I don't have commit access and edit bug permissions. Can you check in this > for me.
Flags: needinfo?(nfroyd)
Keywords: checkin-needed
Checked in: https://hg.mozilla.org/integration/mozilla-inbound/rev/1748feaa98e2 The needinfo was sufficient for this. :)
Flags: needinfo?(nfroyd) → in-testsuite-
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: