script: Store result value in IDBRequest. (#37568)

While this introduces many new crashes in the test results, that's
actually progress. Previously a huge number of tests were failing early
because we never persisted the load-bearing `result` value for
upgradeneeded events, so now we get to see much more interesting
failures in our IndexedDB implementation.

Testing: Existing WPT testsuite for IndexedDB.
Fixes: part of #6963

Depends on #37567.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-06-20 00:51:56 -04:00 committed by GitHub
parent 52dc1fa88d
commit 9dc1dde7cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
76 changed files with 294 additions and 156 deletions

View file

@ -244,8 +244,8 @@ impl IDBRequest {
impl IDBRequestMethods<crate::DomTypeHolder> for IDBRequest {
// https://www.w3.org/TR/IndexedDB-2/#dom-idbrequest-result
fn Result(&self, _cx: SafeJSContext, _val: js::rust::MutableHandle<'_, js::jsapi::Value>) {
self.result.get();
fn Result(&self, _cx: SafeJSContext, mut val: js::rust::MutableHandle<'_, js::jsapi::Value>) {
val.set(self.result.get());
}
// https://www.w3.org/TR/IndexedDB-2/#dom-idbrequest-error