I /think/ this is safe, but I'm not 100% sure because of https://chromium-review.googlesource.com/c/chromium/src/+/3900462.
That CL says:
```
// Caching of small strings below is not thread safe: newly constructed
// AtomicString are not safely published.
```
Is this something that code that doesn't interact with v8 directly is going to have to worry about? Or can we go ahead and simplify this?
(Note that I'm planning on deleting `CrossThreadCopier` altogether in the followup)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
bool alpha);Blink Style Guide: Prefer enums or StrongAliases to bare bools for function parameters. To improve readability at the call site, consider using an enum (e.g., `enum class AlphaMode { kOpaque, kHasAlpha }`) or a `base::StrongAlias<class HasAlphaTag, bool>` for the `alpha` parameter.
To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
**Done** | **Won't fix**: reason | **b/<bug_id>** | **Invalid:** reason
_This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent)._
_AI reviews can sometimes be inaccurate; We appreciate your 🙏 feedback 🙏 to help us improve._
_[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
`
I /think/ this is safe, but I'm not 100% sure because of https://chromium-review.googlesource.com/c/chromium/src/+/3900462.
That CL says:
```
// Caching of small strings below is not thread safe: newly constructed
// AtomicString are not safely published.
```Is this something that code that doesn't interact with v8 directly is going to have to worry about? Or can we go ahead and simplify this?
(Note that I'm planning on deleting `CrossThreadCopier` altogether in the followup)
Change LGTM. I think the comment is wrong, seems like at the time I thought there was an issue with the thread-safety of the initialization of the vector, looking back, it just needs to be marked with `DEFINE_THREAD_SAFE_STATIC_LOCAL`.
| Commit-Queue | +2 |
Luis PardoI /think/ this is safe, but I'm not 100% sure because of https://chromium-review.googlesource.com/c/chromium/src/+/3900462.
That CL says:
```
// Caching of small strings below is not thread safe: newly constructed
// AtomicString are not safely published.
```Is this something that code that doesn't interact with v8 directly is going to have to worry about? Or can we go ahead and simplify this?
(Note that I'm planning on deleting `CrossThreadCopier` altogether in the followup)
Change LGTM. I think the comment is wrong, seems like at the time I thought there was an issue with the thread-safety of the initialization of the vector, looking back, it just needs to be marked with `DEFINE_THREAD_SAFE_STATIC_LOCAL`.
| Commit-Queue | +2 |
bool alpha);Blink Style Guide: Prefer enums or StrongAliases to bare bools for function parameters. To improve readability at the call site, consider using an enum (e.g., `enum class AlphaMode { kOpaque, kHasAlpha }`) or a `base::StrongAlias<class HasAlphaTag, bool>` for the `alpha` parameter.
To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
**Done** | **Won't fix**: reason | **b/<bug_id>** | **Invalid:** reason
_This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent)._
_AI reviews can sometimes be inaccurate; We appreciate your 🙏 feedback 🙏 to help us improve._
_[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_
Won't fix: this is pre-existing code.
Remove unneeded string conversions in PaintWorklet
AtomicStrings have been thread-safe since https://crrev.com/1057879, so
there is no need to convert to String and then back to AtomicString just
to pass it across threads.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |