feat(libSceNKWebKit): implement WebCore::LoggedInStatus #20304
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/20304"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by RiverWhy on 2026-11-15T00:53:47Z.
What
Implements
WebCore::LoggedInStatus, following the pinned LoggedInStatus.cpp:create(domain, username, tokenType, authType)andcreate(..., Seconds timeToLive): in the source's order, an empty registrable domain returnsSecurityError(14), an empty username or one over 64 charactersSyntaxError(9), and whitespaceInvalidCharacterError(3), each with the source's message. Otherwise the object is created withloggedInTime = WallTime::now(). The first overload's time to live is 7 days forUnmanagedand 90 days otherwise.setTimeToLive: clamps to that same cap with the source'sstd::minargument order, so a NaN is kept.hasExpired:now > loggedInTime + timeToLive.expiry:now + timeToLive, as the source computes it (not fromloggedInTime).Layouts are in
LoggedInStatusAbi.hppwithstatic_asserts: the 40-byte object (domain, username, token type at 0x10, auth type at 0x11, times at 0x18 and 0x20) and the 24-byteExceptionOr<UniqueRef<LoggedInStatus>>(pointer orException, has-value byte at 0x10, the same shape as the existingExceptionOr<double>). Both, and the exception code values, were measured on the pinned headers compiled against a JSCOnly build of the same tree.USE_ISO_MALLOCoff (OptionsPlayStation.cmake), soWTF_MAKE_ISO_ALLOCATEDisWTF_MAKE_FAST_ALLOCATED; the object isfastMalloc'd and the guest's inlinedeletefrees it withfastFree.deprecatedIsSpaceOrNewlineis ASCII whitespace plus\vfor Latin-1, so U+00A0 is accepted, andu_charDirection == U_WHITE_SPACE_NEUTRALabove it, throughlibSceIcuasWtfStringIcu.cppalready does.Debt: a fragment,
docs/dev/debt/changes/feat-nkwebkit-logged-in-status.md, adds the entry and removes the 5 inventory rows. #19704 and #20296 add includes on the same line oflibSceNKWebKit.hpp.Tested
Linux Mint 22.3:
nkwebkit_loggedinstatustest: default and explicit lifetimes, clamping and NaN, the four refusals with codes and messages, the 64/65-character boundary, ASCII and U+3000 whitespace against U+00A0 and other non-ASCII letters,setTimeToLive,hasExpiredbefore and after expiry,expiry, 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)Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T01:49:37Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
72d20051dd:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_loggedinstatus_testsbuilt cleanly.nkwebkit_loggedinstatus):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.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T02:49:08Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
bf410aba75:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_loggedinstatus_testsbuilt cleanly.nkwebkit_loggedinstatus):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._ZNK7WebCore14LoggedInStatus6expiryEvcalculates expiry asWTF::WallTime{_ZN3WTF8WallTime3nowEv().m_value + status.timeToLive.m_value}instead ofstatus.loggedInTime.m_value + status.timeToLive.m_value. For an object created at time T0 with lifetime TTL, callingexpiry()at time T0 + dt returns T0 + dt + TTL instead of the fixed expiration timestamp T0 + TTL. Furthermore, for an expired status whereWallTime::now() > loggedInTime + timeToLive,_ZNK7WebCore14LoggedInStatus10hasExpiredEvreturnstrue, but_ZNK7WebCore14LoggedInStatus6expiryEvreturns a future timestampWallTime::now() + timeToLive. In core/libs/prx/libSceNKWebKit/tests/LoggedInStatus.cpp:123-125, this inverted behavior is asserted by checking that an expired status returns an expiry time 90 days in the future rather than 90 days in the past.Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T05:01:28Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
907f6dba83:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_loggedinstatus_testsbuilt cleanly.nkwebkit_loggedinstatus):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.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T06:10:16Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
7df7d53927:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_loggedinstatus_testsbuilt cleanly.nkwebkit_loggedinstatus):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.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T22:38:52Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change; the review is incomplete because two oversized changed files could not be read and no checks were run.
What I ran
Reviewed head
57c5368145f86ade15c6297cf41201e757f94a86. No build or tests were run.repo_read.pywas unavailable as a shell command in this review session; I used the review reader to inspect the prepared diff and repository files at the pinned head.Results
Findings
Blocking
None found in the code inspected.
Non-blocking
None.
Not verified
core/libs/prx/libSceNKWebKit/Export.cppandcore/libs/prx/libSceNKWebKit/include/InventoryExports.hppwere excluded from the review folder as too large and were not read. The changed test was read, but not executed. No build, ABI check, or console behavior was verified.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T05:56:41Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head
397620161240fcb88a07e7aae459350c6501c067using the prepared description, commits, manifest, and diff, plus targeted source reads throughrepo_read.py. No commands or tests were run by me.Read all added lines in
include/LoggedInStatusExports.hpp,libSceNKWebKit.hpp,src/LoggedInStatus.cpp,src/LoggedInStatusAbi.hpp,tests/LoggedInStatus.cpp, anddocs/dev/debt/changes/feat-nkwebkit-logged-in-status.md; also read relevantMediaTypes.hpplines andreview/README.md.Export.cppandinclude/InventoryExports.hppwere excluded from the prepared folder as too large; their changed hunks were inspected indiff.patch.Results
Findings
Blocking
None identified in the source inspected. A complete approval is not justified because two changed files were not read at the pinned head.
Non-blocking
None.
Not verified
The full contents of
core/libs/prx/libSceNKWebKit/Export.cppandcore/libs/prx/libSceNKWebKit/include/InventoryExports.hppwere not read; only their changed hunks indiff.patchwere reviewed. Tests reported in the PR description were not run by me. Console behavior and the ABI measurements described by the author were not independently verified.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T12:45:31Z.
Review: COMMENTED
Reviewed — comments
The review folder and pinned repository sources could not be read in this session, so no code findings are verified.
What I ran
Not run. No reader command or repository checks were available.
Results
Findings
Blocking
None verified.
Non-blocking
None.
Not verified
Could not read
description.md,commits.md,diff.patch,manifest.json,files.json, or any repository files. Files read: none. Files listed for review: not verified.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T12:05:18Z.
Review: COMMENTED
Compiled the changed LoggedInStatus implementation and branch fixture against the existing Linux PRXs, including the ICU dependency. The fixture passed.
AI-assisted: yes.
Pull request closed