LanguageDetection API: Attempt at making detect() thread-safe [chromium/src : main]

0 views
Skip to first unread message

AI Code Reviewer (Gerrit)

unread,
6:53 PM (4 hours ago) 6:53 PM
to Neha Sapre, chromium...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org

AI Code Reviewer added 1 comment

File third_party/blink/renderer/platform/language_detection/language_detection_model.h
Line 69, Patchset 1 (Latest): base::WeakPtrFactory<LanguageDetectionModel> weak_ptr_factory_{this};
AI Code Reviewer . unresolved

Blink Style Guide: Prefer blink:: types over STL and base types. Since `LanguageDetectionModel` is a `GarbageCollected` type, the idiomatic pattern for managing its lifetime in callbacks is to use `WeakPersistent` with `WrapWeakPersistent` and `WTF::BindOnce`, rather than `base::WeakPtrFactory`.

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)_

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I34db0963930861c695a0a03f1afbea7c5512342d
Gerrit-Change-Number: 7157757
Gerrit-PatchSet: 1
Gerrit-Owner: Neha Sapre <neha...@google.com>
Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
Gerrit-Comment-Date: Fri, 14 Nov 2025 23:53:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages