Fix incorrect assertions in js/src/builtin/

RESOLVED FIXED in Firefox 53

Status

()

defect
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: sylvestre, Assigned: sylvestre)

Tracking

unspecified
mozilla53
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox53 fixed)

Details

Attachments

(1 attachment)

gcc 7.0 complains about them:

/root/firefox-gcc-last/js/src/builtin/ModuleObject.cpp: In member function 'bool js::ModuleBuilder::processExport(js::frontend::ParseNode*)':
/root/firefox-gcc-last/js/src/builtin/ModuleObject.cpp:1162:57: error: ?: using integer constants in boolean context, the expression will always evaluate to 'true' [-Werror=int-in-bool-context]
     MOZ_ASSERT(pn->getArity() == pn->isKind(PNK_EXPORT) ? PN_UNARY : PN_BINARY);


                 from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/js/src/Unified_cpp_js_src1.cpp:2:
/root/firefox-gcc-last/js/src/builtin/ReflectParse.cpp: In member function 'bool {anonymous}::ASTSerializer::exportDeclaration(js::frontend::ParseNode*, JS::MutableHandleValue)':
/root/firefox-gcc-last/js/src/builtin/ReflectParse.cpp:2143:57: error: ?: using integer constants in boolean context, the expression will always evaluate to 'true' [-Werror=int-in-bool-context]
Comment on attachment 8815191 [details]
Bug 1320878 - Fix incorrect assertions in js/src/builtin/

https://reviewboard.mozilla.org/r/96220/#review96418

Great catch, thanks!
Attachment #8815191 - Flags: review?(bbouvier) → review+
Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5bb030f09be5
Fix incorrect assertions in js/src/builtin/ r=bbouvier
Assignee: nobody → sledru
Blocks: build-gcc-7
No longer blocks: 1317949
https://hg.mozilla.org/mozilla-central/rev/5bb030f09be5
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.