The codebase mixes two spellings of the same assertion: REQUIRE_UI_THREAD from src/common/util.h, and CEF_REQUIRE_UI_THREAD from the vendored include/wrapper/cef_helpers.h. Same meaning, two names — worth settling on one.
I'd suggest converging on the CEF_REQUIRE_* form rather than the bare one:
src/common/util.h is a stale verbatim copy of the old cef/tests/cefclient/util.h (the guard is still CEF_TESTS_CEFCLIENT_UTIL_H_); upstream replaced it with cef_helpers.h. cef_helpers.h ships with CEF and stays current.
util.h has already rotted: REQUIRE_FILE_THREAD() references TID_FILE, removed from CEF years ago. It survives because ASSERT under NDEBUG expands to ((void)0) and never parses its argument, whereas DCHECK keeps referencing the condition — so the CEF_ variants keep type-checking in release builds.
- The current
CEF_REQUIRE_UI_THREAD sites live in dialog_handler_gtk.cpp and print_handler_gtk.cpp, both maintained as upstream copies with .patch files. Rewriting them toward the bare form would enlarge the diff we re-sync against.
util.h also exposes a bare ASSERT macro through cefpython_public_api.h, which is collision-prone.
The codebase mixes two spellings of the same assertion:
REQUIRE_UI_THREADfromsrc/common/util.h, andCEF_REQUIRE_UI_THREADfrom the vendoredinclude/wrapper/cef_helpers.h. Same meaning, two names — worth settling on one.I'd suggest converging on the
CEF_REQUIRE_*form rather than the bare one:src/common/util.his a stale verbatim copy of the oldcef/tests/cefclient/util.h(the guard is stillCEF_TESTS_CEFCLIENT_UTIL_H_); upstream replaced it withcef_helpers.h.cef_helpers.hships with CEF and stays current.util.hhas already rotted:REQUIRE_FILE_THREAD()referencesTID_FILE, removed from CEF years ago. It survives becauseASSERTunderNDEBUGexpands to((void)0)and never parses its argument, whereasDCHECKkeeps referencing the condition — so theCEF_variants keep type-checking in release builds.CEF_REQUIRE_UI_THREADsites live indialog_handler_gtk.cppandprint_handler_gtk.cpp, both maintained as upstream copies with .patch files. Rewriting them toward the bare form would enlarge the diff we re-sync against.util.halso exposes a bareASSERTmacro throughcefpython_public_api.h, which is collision-prone.