Last Comment Bug 695025 - don't use false when we really mean NULL
: don't use false when we really mean NULL
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla10
Assigned To: Nathan Froyd [:froydnj]
:
: Jason Orendorff [:jorendorff]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-17 09:34 PDT by Nathan Froyd [:froydnj]
Modified: 2011-10-18 05:38 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
s/false/NULL/ in appropriate places (2.55 KB, patch)
2011-10-17 09:38 PDT, Nathan Froyd [:froydnj]
luke: review+
Details | Diff | Splinter Review

Description Nathan Froyd [:froydnj] 2011-10-17 09:34:34 PDT
The JS engine has several places where we return false from methods that return pointer types.  We should be returning NULL instead.  (These locations were caught by GCC 4.7's -Wconversion-null flag.)  Patch incoming.
Comment 1 Nathan Froyd [:froydnj] 2011-10-17 09:38:35 PDT
Created attachment 567478 [details] [diff] [review]
s/false/NULL/ in appropriate places
Comment 2 Luke Wagner [:luke] 2011-10-17 09:55:07 PDT
Comment on attachment 567478 [details] [diff] [review]
s/false/NULL/ in appropriate places

Thanks!
Comment 3 Jeff Walden [:Waldo] (remove +bmo to email) 2011-10-17 14:45:14 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/cb73d6774bb0

Thanks for the patch!
Comment 4 Marco Bonardo [::mak] 2011-10-18 05:38:31 PDT
https://hg.mozilla.org/mozilla-central/rev/cb73d6774bb0

Note You need to log in before you can comment on or make changes to this bug.