Closed Bug 1320878 Opened 8 years ago Closed 8 years ago

Fix incorrect assertions in js/src/builtin/

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: Sylvestre, Assigned: Sylvestre)

References

Details

Attachments

(1 file)

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: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: