Closed Bug 1320888 Opened 7 years ago Closed 7 years ago

Fix an incorrect assert in dom/cache/

Categories

(Core :: DOM: Core & HTML, 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 detects this specific case and triggers a warning
/usr/bin/g++-7 -std=gnu++11 -o Unified_cpp_dom_cache0.o -c -I/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/stl_wrappers -I/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/system_wrappers -include /root/firefox-gcc-last/config/gcc_hidden.h -DDEBUG=1 -DTRACING=1 -DOS_POSIX=1 -DOS_LINUX=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/root/firefox-gcc-last/dom/cache -I/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dom/cache -I/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/ipc/ipdl/_ipdlheaders -I/root/firefox-gcc-last/ipc/chromium/src -I/root/firefox-gcc-last/ipc/glue -I/root/firefox-gcc-last/dom/workers -I/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include  -I/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/nspr -I/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/nss       -fPIC  -DMOZILLA_CLIENT -include /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/mozilla-config.h -MD -MP -MF .deps/Unified_cpp_dom_cache0.o.pp  -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++14-compat -Wc++1z-compat -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -pthread -pipe  -g -freorder-blocks -Os -fno-omit-frame-pointer  -Werror -Wno-error=shadow -fdiagnostics-color  /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dom/cache/Unified_cpp_dom_cache0.cpp
In file included from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Assertions.h:18:0,
                 from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Atomics.h:19,
                 from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/cache/Action.h:10,
                 from /root/firefox-gcc-last/dom/cache/Action.cpp:7,
                 from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dom/cache/Unified_cpp_dom_cache0.cpp:2:
/root/firefox-gcc-last/dom/cache/Context.cpp: In member function 'void mozilla::dom::cache::Context::Dispatch(mozilla::dom::cache::Action*)':
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/StaticAnalysisFunctions.h:46:51: error: enum constant in boolean context [-Werror=int-in-bool-context]
 #define MOZ_CHECK_ASSERT_ASSIGNMENT(expr) (!!(expr))
[...]

/root/firefox-gcc-last/dom/cache/Context.cpp:874:3: note: in expansion of macro 'MOZ_ASSERT'
   MOZ_ASSERT(STATE_CONTEXT_READY);
   ^
Assignee: nobody → sledru
Comment on attachment 8815202 [details]
Bug 1320888 - Fix an incorrect assert in dom/cache/

https://reviewboard.mozilla.org/r/96228/#review96840
Attachment #8815202 - Flags: review?(ehsan) → review+
Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9ed7aed4f033
Fix an incorrect assert in dom/cache/ r=Ehsan
https://hg.mozilla.org/mozilla-central/rev/9ed7aed4f033
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.