Repository navigation
feat(libSceNKWebKit): implement WebCore::PasteboardWriterData construction, destruction and isEmpty - #20314
feat(libSceNKWebKit): implement WebCore::PasteboardWriterData construction, destruction and isEmpty#20314RiverWhy wants to merge 14 commits into
Conversation
Progress report (fbd2175 → 70b7b18)📈 System libraries: 46.92% (+0.01%, +5 implemented functions) ✅ 5 implemented
Changed libraries (implemented exports)
|
PrivacyOnion
left a comment
There was a problem hiding this comment.
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 6748cbaa04:
- Conventions:
tools/check_conventions.pypassed;git diff --checkclean. - Build:
nkwebkit_pasteboardwriterdata_testsbuilt cleanly. - CTest (
nkwebkit_pasteboardwriterdata):1/1 Test #4076: nkwebkit_pasteboardwriterdata .... Passed 0.02 sec 100% tests passed, 0 tests failed out of 1 - Negative control: with
core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass. - Code reading:
- core/libs/prx/libSceNKWebKit/src/PasteboardWriterData.cpp: Verified that Construct, Destroy, and _ZNK7WebCore20PasteboardWriterData7isEmptyEv validate the this pointer through Checked(), throwing std::invalid_argument on nullptr.
- core/libs/prx/libSceNKWebKit/src/PasteboardWriterDataAbi.hpp: Verified struct layouts and static_assert checks for PasteboardPlainText (size 16, text at 0x08), PasteboardURLData (size 48, title at 0x28), and PasteboardWriterData (size 88, align 8, engaged flags at 0x10, 0x48, 0x51).
- core/libs/prx/libSceNKWebKit/src/PasteboardWriterData.cpp: Verified Destroy() tears down engaged members in reverse declaration order, invoking title.~String() and Release(url.url.impl) before plainText.value().text.~String().
- core/libs/prx/libSceNKWebKit/src/PasteboardWriterData.cpp: Verified _ZNK7WebCore20PasteboardWriterData7isEmptyEv evaluates disjunction of engaged flags (!plainText && !url && !webContent) consistent with WebCore PasteboardWriterData semantics.
- core/libs/prx/libSceNKWebKit/tests/PasteboardWriterData.cpp: Verified test coverage across poisoned storage initialization, both C1 and C2 constructors, D1 and D2 destructors, StringImpl refcount release verification, and null-pointer rejections.
- docs/dev/debt/libSceNKWebKit.md and Export.cpp: Verified accurate removal of the 5 implemented symbols from inventory exports, proper count decrement from 5934 to 5929, and compliance with AGENTS.md comment restrictions.
- Note: the AI-assisted checkbox can stay.
Looks Good To Me
…ction, destruction and isEmpty The defaulted constructor and destructor (complete and base object) and isEmpty of the pinned PS5 11.x WebKit class: three std::optional members (plain text, URL data, web content), laid out for a port that is neither Cocoa nor GTK and measured on a Linux build of the pinned header. The destructor destroys the engaged members in reverse declaration order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6748cba to
64de938
Compare
|
@RiverWhy the rebase added this PR's own "Additional callable exports" count line in docs/dev/debt/libSceNKWebKit.md next to main's 5932 line, so the file had two. The debt doc now says those counts are historical, so I pushed de3602a to drop the added line and keep main's. The code is unchanged and still looks good. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the implementation and its focused tests support the described behavior, with console ABI validation still unconfirmed.
What I ran
Reviewed head de3602aad45bdc8e81fce3e5b2a2f8591c29c7f5. I read the prepared description, commits, manifest and diff, then the changed implementation, ABI layout, exports, tests and relevant registration context through repo_read.py. I ran no tests or build commands. The PR description reports 87 nkwebkit tests passing on Linux Mint 22.3; that result was not independently verified.
Results
| Check | Result | Note |
|---|---|---|
| Code review | passed | Readable changed code examined |
| Tests | not run | Results are author reported |
| Build | not run | No build performed |
Findings
Blocking
None.
Non-blocking
- The ABI layout is asserted and tested against the stated host build, but the debt note says it was not compared with a console module. Confirm the layout against the target module when that evidence is available.
Not verified
Export.cpp, InventoryExports.hpp, and docs/dev/debt/libSceNKWebKit.md were excluded from the prepared full-text bundle because of size; relevant export and inventory contexts were read through the pinned reader. No other repository files were read. No build, test, console run, or console ABI comparison was performed.
To get this to a good state
Nothing is required. Optional: verify the ABI layout against a console module when available.
…lemented declarations
The debt file is no longer edited by pull requests directly. The new entry, the inventory rows and any entries this change updates are now in docs/dev/debt/changes/feat-nkwebkit-pasteboard-writer-data.md, and the debt file matches main, including its historical export counts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lemented declarations
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
PrivacyOnion
left a comment
There was a problem hiding this comment.
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 3d508875d4:
- Conventions:
tools/check_conventions.pypassed;git diff --checkclean. - Build:
nkwebkit_pasteboardwriterdata_testsbuilt cleanly. - CTest (
nkwebkit_pasteboardwriterdata):1/1 Test #4091: nkwebkit_pasteboardwriterdata .... Passed 0.02 sec 100% tests passed, 0 tests failed out of 1 - Negative control: with
core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass. - Code reading:
- Verified null-pointer handling across all exports in core/libs/prx/libSceNKWebKit/src/PasteboardWriterData.cpp: Construct, Destroy, and _ZNK7WebCore20PasteboardWriterData7isEmptyEv validate self via Checked() and throw std::invalid_argument on null pointers.
- Verified Itanium ABI symbol signatures and return types in core/libs/prx/libSceNKWebKit/include/PasteboardWriterDataExports.hpp and PasteboardWriterData.cpp: constructors (_ZN7WebCore20PasteboardWriterDataC1Ev, C2Ev) and destructors (_ZN7WebCore20PasteboardWriterDataD1Ev, D2Ev) return void APS5_VABI, and _ZNK7WebCore20PasteboardWriterData7isEmptyEv returns bool APS5_VABI.
- Verified ABI struct layout and alignment in core/libs/prx/libSceNKWebKit/src/PasteboardWriterDataAbi.hpp: static_assert checks ensure 88-byte sizeof, 8-byte alignof, std::is_standard_layout_v, and exact member/engaged byte offsets for plainText (0x00, engaged 0x10), url (0x18, engaged 0x48), and webContent (0x50, engaged 0x51).
- Verified destruction order and resource management in PasteboardWriterData.cpp (Destroy): engaged members are cleaned up in reverse declaration order, executing url.title.~String(), NKWebKit::WtfAbi::Release(url.url.impl), and data.plainText.value().text.~String() while clearing engagement flags without double-free risk.
- Verified AGENTS.md rules: confirmed zero forbidden comments in source files (retaining only allowed namespace closing comments), proper export removals in Export.cpp and InventoryExports.hpp, and correct debt fragment additions under docs/dev/debt/changes/feat-nkwebkit-pasteboard-writer-data.md.
- Verified unit test coverage in core/libs/prx/libSceNKWebKit/tests/PasteboardWriterData.cpp: ensures poisoned buffer clearing on construction, truth table evaluation for isEmpty under each engaged member, refCount restoration on destruction, and invalid_argument throwing upon null inputs.
- Note: the AI-assisted checkbox can stay.
Looks Good To Me
PrivacyOnion
left a comment
There was a problem hiding this comment.
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against ecc2370f0a:
- Conventions:
tools/check_conventions.pypassed;git diff --checkclean. - Build:
nkwebkit_pasteboardwriterdata_testsbuilt cleanly. - CTest (
nkwebkit_pasteboardwriterdata):1/1 Test #4104: nkwebkit_pasteboardwriterdata .... Passed 0.02 sec 100% tests passed, 0 tests failed out of 1 - Negative control: with
core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass. - Code reading:
- core/libs/prx/libSceNKWebKit/src/PasteboardWriterData.cpp: Verified that Construct(), Destroy(), and _ZNK7WebCore20PasteboardWriterData7isEmptyEv validate caller pointers via Checked(), throwing std::invalid_argument on nullptr for all entry points.
- core/libs/prx/libSceNKWebKit/src/PasteboardWriterDataAbi.hpp: Confirmed ABI layout static_asserts enforce sizeof(PasteboardWriterData) == 88, alignof == 8, member offsets (plainText at 0x00, url at 0x18, webContent at 0x50), engaged byte offsets (0x10, 0x48, 0x51), and std::is_standard_layout_v.
- core/libs/prx/libSceNKWebKit/src/PasteboardWriterData.cpp: Verified Destroy() executes member teardown in strict reverse declaration order (webContent, then url.title.~String() and Release(url.url.impl), then plainText.value().text.~String()), avoiding leaks and dangling references.
- core/libs/prx/libSceNKWebKit/src/PasteboardWriterData.cpp: Confirmed _ZNK7WebCore20PasteboardWriterData7isEmptyEv accurately mirrors upstream WebCore logic (!data.plainText.engaged && !data.url.engaged && !data.webContent.engaged) without state mutation or out-of-bounds access.
- core/libs/prx/libSceNKWebKit/tests/PasteboardWriterData.cpp: Verified test coverage exercises both complete/base constructors (C1, C2) and destructors (D1, D2) over a 0xAB-poisoned buffer, checks StringImpl reference counts upon member destruction, tests isEmpty transitions, and validates nullptr rejection.
- AGENTS.md & Repository Rules: Verified zero code comments added outside permitted namespace terminations, clean removal of stubs from Export.cpp and InventoryExports.hpp, and correct debt tracking fragment in docs/dev/debt/changes/feat-nkwebkit-pasteboard-writer-data.md.
- Note: the AI-assisted checkbox can stay.
Looks Good To Me
|
Tested
AI-assisted: yes (Claude Code); the runs are automated, this summary was written from their reports. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The reviewed head is ecc2370f0a864bbd483c9dcdbff3904033fdf46d; the inspected implementation and ABI layout support the described behavior, with no verified blocking defect.
What I ran
No programmatic checks were run. I reviewed the prepared diff and the changed implementation, ABI declarations, tests, debt fragment, and relevant export inventory at the pinned head.
Results
| Check | Result | Note |
|---|---|---|
| Code review | passed | Inspected implementation and ABI declarations |
| Tests | not run | Test results in the description are author-reported |
| Full changed-file coverage | not run | Two large files were not read in full |
Findings
Blocking
None in the code reviewed.
Non-blocking
None.
Not verified
The complete text of core/libs/prx/libSceNKWebKit/Export.cpp and core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp was not read; only the relevant export and inventory hunks were inspected. No build or tests were run. The author reports Linux Mint tests, but those results were not independently verified.
Files read: review/description.md, review/commits.md, review/manifest.json, review/README.md, review/diff.patch; core/libs/prx/libSceNKWebKit/Export.cpp (relevant range), core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp (relevant range), core/libs/prx/libSceNKWebKit/include/PasteboardWriterDataExports.hpp, core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp, core/libs/prx/libSceNKWebKit/src/PasteboardWriterData.cpp, core/libs/prx/libSceNKWebKit/src/PasteboardWriterDataAbi.hpp, core/libs/prx/libSceNKWebKit/src/WtfStringAbi.hpp, and core/libs/prx/libSceNKWebKit/tests/PasteboardWriterData.cpp plus the changed debt fragment. Excluded from full-file review: Export.cpp and InventoryExports.hpp due to size.
To get this to a good state
Nothing is required.
# Conflicts: # core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The implementation appears consistent with the stated optional-member layout and lifecycle; the source review is complete, but no tests or build checks were run here.
What I ran
Reviewed head 4109e035adc8c8880ef9b8f82bd14f8dfc77e352 using repo_read.py through the prepared review reader. No commands or tests were run.
Results
| Check | Result | Note |
|---|---|---|
| Source review | passed | Included changed source and tests read |
| Build and tests | not run | Results in the description are author reported |
Findings
Blocking
None.
Non-blocking
None.
Not verified
The changed Export.cpp and InventoryExports.hpp were excluded as too large for the review folder and were not read. Build and test results were not independently verified. The description reports 87 nkwebkit tests passing and progress changing from 3072 to 3077.
To get this to a good state
Nothing is required.
Linux check of head
|
| Linux | |
|---|---|
| Setup | Ubuntu 24.04.4 LTS (WSL2), GCC 13 |
| Build | clean |
| Passed | 156 of 157 |
| Failed | 1 |
| Not run (executable missing or test disabled) | 0 |
| Failures caused by this PR | 0 |
| Conventions | pass |
| Time | 2 min |
| Tests that ran | Linux |
|---|---|
guest_freetype_* |
33 of 34 |
guest_dinkumware_* |
13 of 13 |
guest_kernel_* |
10 of 10 |
guest_jxr_* |
7 of 7 |
guest_libressl_* |
4 of 4 |
guest_nkwebkit_* |
3 of 3 |
guest_libressl3_* |
2 of 2 |
nkwebkit_wtftext_* |
2 of 2 |
| 80 other group(s) | 82 of 82 |
1 failed test(s) that also fail on main (not caused by this PR)
guest_freetype_ot_patched
Only tests that depend on the files this PR changes were run. A test counts against the PR only if it passes on main. Numbers come from ctest; the text is generated by a script.
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
The implementation’s reviewed constructor, destructor, and isEmpty logic matches the described optional-member behavior; tests and build checks were not run in this review.
What I ran
Reviewed head 699fb74bdef2e5bf588f1b15b11af0eea11472bc using the prepared diff and repo_read.py for targeted source reads. No commands or tests were run.
Results
| Check | Result | Note |
|---|---|---|
| Diff and targeted source review | passed | Core behavior inspected |
| Tests and build | not run | Author-reported results only |
Findings
Blocking
None.
Non-blocking
None.
Not verified
The full text of core/libs/prx/libSceNKWebKit/Export.cpp and core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp was excluded by the review folder size rule and not read through the reader. The CMake test registration was located but not read in full; no build, tests, or physical-console behavior were verified. The test results in the PR description were not run by this review.
To get this to a good state
Nothing is required.
# Conflicts: # core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — comments
The new PasteboardWriterData implementation and ABI layout were inspected at head 70b7b182d6e1fc805b1f8ed6ab17392c27b4ac41; the changed Export.cpp was not fully verified, and no checks were run.
What I ran
- Read the supplied description, commits, manifest, diff, and relevant implementation excerpts using
repo_read.py. - No tests or builds were run.
Results
| Check | Result | Note |
|---|---|---|
| Implementation review | passed | Constructor, destructor, isEmpty, and ABI layout inspected |
| Tests and build | not run | Author reports Linux test results; not independently verified |
| Export file review | not run | Full changed file was not read |
Findings
Blocking
None verified in the inspected implementation.
Non-blocking
None.
Not verified
The complete changed-file review is incomplete: core/libs/prx/libSceNKWebKit/Export.cpp was not fully read, and I did not read every changed file listed in the manifest. The patch removes the five fallback definitions from that file, but their replacement registration and linkage were not fully confirmed. Tests reported in the PR description were not run.
To get this to a good state
Nothing is required. Optional: confirm the new definitions are linked in the build and run the reported test suite.
Files read: description.md, commits.md, manifest.json, diff.patch, and the changed implementation excerpts. Changed files not fully read: Export.cpp, InventoryExports.hpp, PasteboardWriterDataExports.hpp, libSceNKWebKit.hpp, PasteboardWriterData.cpp, PasteboardWriterDataAbi.hpp, tests/PasteboardWriterData.cpp, and the debt fragment.
ligmaSec
left a comment
There was a problem hiding this comment.
Compiled the changed PasteboardWriterData implementation with the branch’s fixture against the existing Linux PRXs. It passed the lifecycle, emptiness, and string-reference accounting assertions.
AI-assisted: yes.
What
Implements the constructor (
C1,C2), destructor (D1,D2) andisEmptyofWebCore::PasteboardWriterData, following the pinned PasteboardWriterData.h and PasteboardWriterData.cpp, where the constructor and destructor are= defaultandisEmptyis!m_plainText && !m_url && !m_webContent.The class is three
std::optionalmembers. On a port that is neither Cocoa nor GTK,WebContentis empty andURLDatais aURLand a title.PasteboardWriterDataAbi.hpppins the layout withstatic_asserts, measured on the pinned header compiled against a JSCOnly build of the same tree:m_plainText(bool,String)m_url(URL,String title)m_webContent(empty)The object is 88 bytes. The constructor only clears the engaged bytes, as
std::optional's does. The destructor destroys the engaged members in reverse declaration order: the title and the URL's string, then the plain text.WebContent's own destructor was already a no-op export. A null object throws.Debt: a fragment,
docs/dev/debt/changes/feat-nkwebkit-pasteboard-writer-data.md, adds the entry and removes the 5 inventory rows. #19704, #20296 and #20304 add includes on the same line oflibSceNKWebKit.hpp.Tested
Linux Mint 22.3:
nkwebkit_pasteboardwriterdatatest: both constructors over a poisoned buffer,isEmptywith each member engaged, destruction releasing exactly the engaged strings (reference counts restored), and null refusals.ctest -R nkwebkit: 87 tests passed.progress.py --module libSceNKWebKit: 3072 to 3077 implemented.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)