Closed Bug 1035092 Opened 9 years ago Closed 9 years ago

bool functions shouldn't return nullptr

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: octoploid, Assigned: sfink)

References

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0 (Beta/Release)
Build ID: 20140703131445

Steps to reproduce:

Bug 1022773 changed the return type of several functions 
in jsapi.cpp from "JSScript *" to bool. But these function 
contain "return nullptr" statements, that are invalid according to:
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1423
Assignee: nobody → sphink
Blocks: 1022773
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 8451667 [details] [diff] [review]
Fix places that return nullptr as a bool

Review of attachment 8451667 [details] [diff] [review]:
-----------------------------------------------------------------

I feel like I ought to spread out the reviews more, but I suppose you reviewed the original.
Attachment #8451667 - Flags: review?(terrence)
Comment on attachment 8451667 [details] [diff] [review]
Fix places that return nullptr as a bool

Review of attachment 8451667 [details] [diff] [review]:
-----------------------------------------------------------------

rs=me
Attachment #8451667 - Flags: review?(terrence) → review+
Btw, PossiblyFail() in jsgcinlines.h also returns nullptr instead of false.
https://hg.mozilla.org/mozilla-central/rev/0e0fbb8a815b
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Attached patch bool.diffSplinter Review
Here are a couple of more fixes.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Summary: bool functions in jsapi.cpp shouldn't return nullptr → bool functions shouldn't return nullptr
Attachment #8454893 - Flags: review+
I just went ahead and pushed it. Thanks for the patch!

https://hg.mozilla.org/integration/mozilla-inbound/rev/9198564a941c
https://hg.mozilla.org/mozilla-central/rev/9198564a941c
Status: REOPENED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → FIXED
There was a strange heisenbug that broke two mochitest devtools tests on this push. It has nothing to do with this patch. I've added info over at bug 876272.
You need to log in before you can comment on or make changes to this bug.