You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inconsistency between spec and tests for detached arraybuffers; spec for keys says don't throw, test for keys says throw, spec for values says throw #417
Arguably the current test behavior (which Blink implements) is the most consistent and developer-friendly behavior. It would be weird for a detached arraybuffer to fail as a value but succeed with a potentially incorrect result as a key.
I would propose we:
Modify the IDB spec to explicitly return invalid if "IsDetachedBuffer".
Note this will throw a DataError rather than the TypeError expected by the test. I'm not opposed to retaining TypeError, but it would be good to have some rationale for choosing that given that we otherwise just seem to return DataError and structured serialization returns DataCloneError.
Update the existing test to expect DataError
Add a case for a key that is a JS array that contains a detached arraybuffer.