Skip to content

Commit

Permalink
Check that ArrayBuffers in IDB keys are not detached.
Browse files Browse the repository at this point in the history
Differential Revision: https://phabricator.services.mozilla.com/D202947

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1878134
gecko-commit: 873753c290050dfeaceda7f68529530797b1d198
gecko-reviewers: dom-storage-reviewers, janv
  • Loading branch information
jjjalkanen authored and moz-wptsync-bot committed May 9, 2024
1 parent d32b68c commit 18f1bd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions IndexedDB/idb-binary-key-detached.htm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
worker.postMessage('', [buffer]);
assert_equals(array.byteLength, 0);

assert_throws_js(TypeError, () => { store.put('', buffer); });
assert_throws_dom("DataError", () => { store.put('', buffer); });
t.done();
},
'Detached ArrayBuffer'
Expand All @@ -43,7 +43,7 @@
worker.postMessage('', [array.buffer]);
assert_equals(array.length, 0);

assert_throws_js(TypeError, () => { store.put('', array); });
assert_throws_dom("DataError", () => { store.put('', array); });
t.done();
},
'Detached TypedArray'
Expand Down

0 comments on commit 18f1bd8

Please sign in to comment.