feat(libwebrtc): implement webrtc::field_trial::InitFieldTrialsFromString #15285

Merged
zzokm merged 4 commits from upstream-pr/15285 into main 2026-11-07 06:55:09 +00:00
zzokm commented 2026-11-02 22:47:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by zzokm on 2026-11-02T22:47:29Z.


What

Implements webrtc::field_trial::InitFieldTrialsFromString(const char*) in libwebrtc, which previously threw through NotImplemented_nid_no_patch and was declared with (void).

The function is adapted from WebRTC's system_wrappers/source/field_trial.cc (M127, M134), headed by the WebRTC copyright notice and BSD licence. As upstream, it assigns the passed pointer directly to the global trial string without copying. An internal webrtc::field_trial::GetFieldTrialString() getter is exposed in FieldTrial.hpp for internal consumers and testing. The unknown exports inventory drops from 352 to 351.

Tested

Windows 11 (x86_64), GCC 13.2.0, syntax-checked and standalone guest unit test executed.

  • New guest_webrtc_field_trial test: verifies that the trial string pointer initially starts null, is updated when set, and clears back to null when passed a nullptr.
  • tools/check_conventions.py --base upstream/main passes with zero warnings or errors.
  • No other open pull request implements this function.
  • Not tested: a title.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5128658143 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15285). Originally posted by [zzokm](https://github.com/zzokm) on 2026-11-02T22:47:29Z. --- ### What Implements `webrtc::field_trial::InitFieldTrialsFromString(const char*)` in libwebrtc, which previously threw through `NotImplemented_nid_no_patch` and was declared with `(void)`. The function is adapted from WebRTC's `system_wrappers/source/field_trial.cc` ([M127](https://webrtc.googlesource.com/src/+/e0b28a6a81a989c1f5c89e30fcd247870047390d/system_wrappers/source/field_trial.cc), [M134](https://webrtc.googlesource.com/src/+/8d78f5de6c27b2c793039989ea381f1428fb0100/system_wrappers/source/field_trial.cc)), headed by the WebRTC copyright notice and BSD licence. As upstream, it assigns the passed pointer directly to the global trial string without copying. An internal `webrtc::field_trial::GetFieldTrialString()` getter is exposed in `FieldTrial.hpp` for internal consumers and testing. The unknown exports inventory drops from 352 to 351. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Windows 11 (x86_64), GCC 13.2.0, syntax-checked and standalone guest unit test executed. - New `guest_webrtc_field_trial` test: verifies that the trial string pointer initially starts null, is updated when set, and clears back to null when passed a nullptr. - `tools/check_conventions.py --base upstream/main` passes with zero warnings or errors. - No other open pull request implements this function. - Not tested: a title. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!15285
No description provided.