Bug 198738 - REGRESSION (r244436): IndexedDB Uint8Array returned as ArrayBuffer
Summary: REGRESSION (r244436): IndexedDB Uint8Array returned as ArrayBuffer
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: Safari Technology Preview
Hardware: Macintosh macOS 10.14
: P2 Normal
Assignee: Sihui Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-06-10 18:53 PDT by E.J. Daly
Modified: 2019-06-24 16:45 PDT (History)
8 users (show)

See Also:


Attachments
Example output (83.66 KB, image/png)
2019-06-10 19:02 PDT, E.J. Daly
no flags Details
Example script to reproduce (971 bytes, text/html)
2019-06-10 19:03 PDT, E.J. Daly
no flags Details
Patch (35.68 KB, patch)
2019-06-24 12:23 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews107 for mac-highsierra-wk2 (2.97 MB, application/zip)
2019-06-24 13:26 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews100 for mac-highsierra (3.20 MB, application/zip)
2019-06-24 13:37 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews115 for mac-highsierra (1.62 MB, application/zip)
2019-06-24 13:54 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews121 for ios-simulator-wk2 (2.91 MB, application/zip)
2019-06-24 14:12 PDT, Build Bot
no flags Details
Patch (10.73 KB, patch)
2019-06-24 14:30 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description E.J. Daly 2019-06-10 18:53:05 PDT
Saving data in IndexedDB, with key data of type Uint8Array.

When reading the data back out, the data is of type ArrayBuffer.

Doesn't seem to affect non-keyPath fields.

For example:

Input: {
  id: Uint8Array(4),
  data: Uint8Array(8)
}

Output: {
  id: ArrayBuffer {byteLength: 4}
  data: Uint8Array(8)
}

Seeing this on Technology Preview Release 84
Not seeing this on Safari 12.1
Comment 1 E.J. Daly 2019-06-10 19:02:25 PDT
Created attachment 371805 [details]
Example output
Comment 2 E.J. Daly 2019-06-10 19:03:32 PDT
Created attachment 371806 [details]
Example script to reproduce
Comment 3 Radar WebKit Bug Importer 2019-06-11 00:56:58 PDT
<rdar://problem/51614053>
Comment 4 Sihui Liu 2019-06-24 12:23:57 PDT
Created attachment 372785 [details]
Patch
Comment 5 Build Bot 2019-06-24 13:26:53 PDT
Comment on attachment 372785 [details]
Patch

Attachment 372785 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/12564671

New failing tests:
imported/w3c/web-platform-tests/IndexedDB/idb_binary_key_conversion.htm
imported/w3c/web-platform-tests/IndexedDB/idbfactory_cmp4.htm
storage/indexeddb/modern/binary-keys-1.html
storage/indexeddb/modern/binary-keys-1-private.html
imported/w3c/web-platform-tests/IndexedDB/idb-binary-key-roundtrip.htm
Comment 6 Build Bot 2019-06-24 13:26:55 PDT
Created attachment 372792 [details]
Archive of layout-test-results from ews107 for mac-highsierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-highsierra-wk2  Platform: Mac OS X 10.13.6
Comment 7 Build Bot 2019-06-24 13:37:35 PDT
Comment on attachment 372785 [details]
Patch

Attachment 372785 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/12564727

New failing tests:
imported/w3c/web-platform-tests/IndexedDB/idb_binary_key_conversion.htm
imported/w3c/web-platform-tests/IndexedDB/idbfactory_cmp4.htm
storage/indexeddb/modern/binary-keys-1.html
storage/indexeddb/modern/binary-keys-1-private.html
imported/w3c/web-platform-tests/IndexedDB/idb-binary-key-roundtrip.htm
Comment 8 Build Bot 2019-06-24 13:37:37 PDT
Created attachment 372796 [details]
Archive of layout-test-results from ews100 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 9 Build Bot 2019-06-24 13:53:58 PDT
Comment on attachment 372785 [details]
Patch

Attachment 372785 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/12564720

Number of test failures exceeded the failure limit.
Comment 10 Build Bot 2019-06-24 13:54:00 PDT
Created attachment 372798 [details]
Archive of layout-test-results from ews115 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 11 Build Bot 2019-06-24 14:12:37 PDT
Comment on attachment 372785 [details]
Patch

Attachment 372785 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/12564730

New failing tests:
imported/w3c/web-platform-tests/IndexedDB/idb_binary_key_conversion.htm
imported/w3c/web-platform-tests/IndexedDB/idbfactory_cmp4.htm
storage/indexeddb/modern/binary-keys-1.html
storage/indexeddb/modern/binary-keys-1-private.html
imported/w3c/web-platform-tests/IndexedDB/idb-binary-key-roundtrip.htm
Comment 12 Build Bot 2019-06-24 14:12:39 PDT
Created attachment 372800 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.14.5
Comment 13 Sihui Liu 2019-06-24 14:30:34 PDT
Created attachment 372803 [details]
Patch
Comment 14 WebKit Commit Bot 2019-06-24 16:45:47 PDT
Comment on attachment 372803 [details]
Patch

Clearing flags on attachment: 372803

Committed r246770: <https://trac.webkit.org/changeset/246770>
Comment 15 WebKit Commit Bot 2019-06-24 16:45:49 PDT
All reviewed patches have been landed.  Closing bug.