Use std::source_location in CheckedUnsafePtr
Categories
(Core :: Storage: Quota Manager, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox158 | --- | fixed |
People
(Reporter: jstutte, Assigned: jstutte)
References
Details
Attachments
(1 external file, 1 obsolete file)
Bug 2069184 moved the Linux build sysroot to libstdc++ 11, so std::source_location is available on every toolchain we build with and the MFBT shim is not needed anymore. D320652 is abandoned.
Repurposing this bug for the CheckedUnsafePtr conversion alone. The WebrtcLocation conversion stays on bug 1973646 and the ClearOnShutdown marker on bug 2065730; both now use std::source_location directly and no longer depend on this bug.
| Assignee | ||
Comment 1•2 months ago
|
||
Two places in the tree hand roll the same __has_builtin guards around
__builtin_FUNCTION, __builtin_FILE and __builtin_LINE to capture a caller's
location as a default argument, and a third was about to.
std::source_location is the spelling we want but the Linux build sysroot still
ships libstdc++ 10, which only has the TS version. That one is implemented with
the very same builtins, so use it where the real header is missing and let the
shim collapse to a plain using declaration once the sysroot moves on.
libc++ has neither header before version 15. We do not build that ourselves but
downstream ports do, and both existing consumers degraded gracefully rather
than failing to build, so keep a dummy fallback for them.
Updated•2 months ago
|
| Assignee | ||
Comment 2•2 months ago
|
||
The bt_function/bt_file/bt_line macros here are the same __has_builtin dance the
shim now does once. They were also never undefined, so three very generic names
leaked into every translation unit including this header.
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
| Assignee | ||
Updated•2 months ago
|
Updated•2 months ago
|
Comment 4•2 months ago
|
||
| bugherder | ||
Updated•1 month ago
|
Description
•