Files
AnyPS5/docs/dev/debt/changes/feat-webcore-sqlite.md
Herolias d3acf88f75 feat(libSceNKWebKit): implement the WebCore SQLite wrappers (#20327)
* feat(libSceNKWebKit): implement the WebCore SQLite wrappers
* test(libSceNKWebKit): cover tableExists with quoted and injected table names
* fix(libSceNKWebKit): bind the table name in SQLiteDatabase::tableExists
* fix(libSceNKWebKit): rename the SQLite open helper that clashes with WKImeEventType
* test(libSceNKWebKit): drop the NotImplemented checks from the WebCore SQLite test
2026-11-22 18:12:31 +13:00

7.5 KiB

libSceNKWebKit

add Functional

  • WebCore::SQLiteDatabase and SQLiteTransaction (libSceNKWebKit) - not compared with a console module: the device's WebKit revision is unverified. The exports carry 3.20 signatures (open(const String&, OpenMode), executeCommand(const String&), tableExists(const String&)) that the pinned 11.x tree no longer has, so they follow August 2020 SQLiteDatabase.cpp and SQLiteTransaction.cpp. They call the libSceNKWebKitRequirements SQLite exports. Closes when: compared with a console module.
  • WebCore::SQLiteDatabase::tableExists (libSceNKWebKit) - not compared with a console module. It binds the name, as the pinned 11.x tableSQL does; August 2020 tableExists concatenates it, so the two differ for a name holding a single quote. It binds and reads UTF-16 through the 3.20 statement, where 11.x SQLiteStatement.cpp uses UTF-8. Closes when: compared with a console module.
  • WebCore::SQLiteStatement and SQLiteStatementAutoResetScope (libSceNKWebKit) - not compared with a console module. The 3.20 SQLiteStatement(SQLiteDatabase&, const String&), prepare, finalize and getColumn* exports, which the pinned 11.x tree replaced with SQLiteDatabase::prepareStatement, follow August 2020 SQLiteStatement.cpp and SQLiteStatementAutoResetScope.cpp. Closes when: compared with a console module.
  • WebCore SQLite object layouts (libSceNKWebKit) - release layouts of August 2020 SQLiteDatabase.h (64 bytes, WTF::Lock bytes at 14, 24 and 40, m_lastChangesCount at 56) and SQLiteStatement.h (24 bytes); SQLiteTransaction is 16 bytes. The pinned 11.x layout differs: it derives from CanMakeWeakPtr and drops m_lastChangesCount. None of the 55 SQLite names that only the pin declares, such as its open (lCTp1S9tQ5Q) and prepareStatement, is in the inventory. Closes when: measured on a PS5.
  • WebCore SQLite wrappers (libSceNKWebKit) - these inputs throw through NotImplemented_nid_no_patch: isColumnDeclaredAsBlob for a column without a declared type, where WebKit passes the null sqlite3_column_decltype result to strlen, or for SQL that prepare leaves without a statement; runIncrementalVacuumCommand and setCollationFunction on a closed database, which SQLite built without API armor dereferences and the console SQLite build is unknown; bindValue on a valueless WTF::Variant; a collation call through an empty WTF::Function. Closes when: measured on a PS5.
  • WebCore SQLite wrappers (libSceNKWebKit) - WTF::Lock contention yields until the byte is free instead of parking on WTF::ParkingLot, whose exports still throw. open leaves m_openingThread null because WTF::Thread::current is not implemented; release builds read it only in assertions. m_authorizer stays null because setAuthorizer is not exported. SQLite results are those of the bundled SQLite 3.54.1. Closes when: WTF::ParkingLot and WTF::Thread are implemented.

remove | _ZN7WebCore14SQLiteDatabaseC1Ev | dYLaCFvC8Nk |

remove | _ZN7WebCore14SQLiteDatabaseC2Ev | B6gqPm8EtR8 |

remove | _ZN7WebCore14SQLiteDatabaseD1Ev | z-Vtoq+OkUU |

remove | _ZN7WebCore14SQLiteDatabaseD2Ev | ox8PemJycj8 |

remove | _ZN7WebCore14SQLiteDatabase5closeEv | cL5ASE2-dwg |

remove | _ZN7WebCore14SQLiteDatabase14clearAllTablesEv | Jr8SilBIzTk |

remove | _ZN7WebCore14SQLiteDatabase16runVacuumCommandEv | QJCcZ0vgv54 |

remove | _ZN7WebCore14SQLiteDatabase27runIncrementalVacuumCommandEv | jmHFoFUQoi8 |

remove | _ZN7WebCore14SQLiteDatabase9interruptEv | 8m8-UQTKyUc |

remove | _ZN7WebCore14SQLiteDatabase9lastErrorEv | 96iwUEq1jKY |

remove | _ZN7WebCore14SQLiteDatabase12lastErrorMsgEv | QZg17ZNOwtc |

remove | _ZN7WebCore14SQLiteDatabase27turnOnIncrementalAutoVacuumEv | DfZB2uu86Gw |

remove | _ZN7WebCore14SQLiteDatabase20setCollationFunctionERKN3WTF6StringEONS1_8FunctionIFiiPKviS7_EEE | 7uInq-rV0oc |

remove | _ZN7WebCore14SQLiteDatabase29setIsDatabaseOpeningForbiddenEb | -OrgQoBbx8M |

remove | _ZN7WebCore15SQLiteStatementD1Ev | C-lrlIiUeZs |

remove | _ZN7WebCore15SQLiteStatementD2Ev | 6W+ovJY9kVo |

remove | _ZN7WebCore15SQLiteStatement4stepEv | ZO39wK-KwXE |

remove | _ZN7WebCore15SQLiteStatement5resetEv | fZbmrDb2Wl4 |

remove | _ZN7WebCore15SQLiteStatement14executeCommandEv | pgfsfmVnZ80 |

remove | _ZN7WebCore15SQLiteStatement8bindBlobEiRKN3WTF6StringE | L3OgkCd-Wws |

remove | _ZN7WebCore15SQLiteStatement7bindIntEii | su0zXmF7Cto |

remove | _ZN7WebCore15SQLiteStatement9bindInt64Eil | 3hRFngR3flU |

remove | _ZN7WebCore15SQLiteStatement10bindDoubleEid | PVBHZjcjzo0 |

remove | _ZN7WebCore15SQLiteStatement8bindNullEi | 1HJmJsAhIVU |

remove | _ZNK7WebCore15SQLiteStatement18bindParameterCountEv | 8tE06sxxee8 |

remove | _ZN7WebCore15SQLiteStatement22isColumnDeclaredAsBlobEi | wYCxExkKxYA |

remove | _ZN7WebCore17SQLiteTransactionC1ERNS_14SQLiteDatabaseEb | 2yorpzmHA-w |

remove | _ZN7WebCore17SQLiteTransactionC2ERNS_14SQLiteDatabaseEb | 81MD+QADYBA |

remove | _ZN7WebCore17SQLiteTransactionD1Ev | r-3VcPGTSfs |

remove | _ZN7WebCore17SQLiteTransactionD2Ev | Myvbbodp9dU |

remove | _ZN7WebCore17SQLiteTransaction5beginEv | KfpqmLwti6U |

remove | _ZN7WebCore17SQLiteTransaction6commitEv | qpSe9uajx7c |

remove | _ZN7WebCore17SQLiteTransaction8rollbackEv | cM1AOABqE-Y |

remove | _ZN7WebCore29SQLiteStatementAutoResetScopeC1EOS0_ | EiOhI0xdnqs |

remove | _ZN7WebCore29SQLiteStatementAutoResetScopeC2EOS0_ | I6BK+r-jqhk |

remove | _ZN7WebCore29SQLiteStatementAutoResetScopeaSEOS0_ | 5Z7z4XjqxcA |

remove | _ZN7WebCore29SQLiteStatementAutoResetScopeD1Ev | -D-Dsk4CZXA |

remove | _ZN7WebCore29SQLiteStatementAutoResetScopeD2Ev | W4vhaG7GsbI |