Bug 251883
| Summary: | WTF::ThreadSafeWeakPtrControlBlock::strongDeref() should use constexpr | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | David Kilzer (:ddkilzer) <ddkilzer> |
| Component: | Web Template Framework | Assignee: | David Kilzer (:ddkilzer) <ddkilzer> |
| Status: | CLOSED WONTFIX | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
David Kilzer (:ddkilzer)
WTF::ThreadSafeWeakPtrControlBlock::strongDeref() should use constexpr.
While working on another patch, I realized that WTF::ThreadSafeWeakPtrControlBlock::strongDeref() could use constexpr instead of a switch statement.
The switch statement is kept in Debug builds in case an enum value is added to DestructionThread.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/105143972>
David Kilzer (:ddkilzer)
Pull request: https://github.com/WebKit/WebKit/pull/9779
David Kilzer (:ddkilzer)
Alex notes that the switch statement is already optimized out, so the constexpr isn't needed.