mozIndexedDB and indexedDB different behavior with FileHandle API

NEW
Unassigned

Status

()

P5
normal
5 years ago
9 months ago

People

(Reporter: marco, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
If I use mozIndexedDB, I manage to write into a file. If I use indexedDB, I can't.
(Reporter)

Comment 1

5 years ago
Created attachment 814716 [details]
testcase.js

Try to run this code in the Browser Console.
It works if you s/indexedDB/mozIndexedDB.
What doesn't work, exactly? Do you get an error message in the console?
(Reporter)

Comment 3

5 years ago
In the write function |let filerequest = lockedFile.write(data)| is null (if I use indexedDB, instead if I use mozIndexedDB it works).

Comment 4

5 years ago
I tried the attached testcase in official aurora build on mac, it seems to work:
09:41:32.246 [object Object]
09:41:32.310 "CREATED"
09:41:32.314 "OPENED"
09:41:32.314 "ABOUT TO WRITE LENGTH: 5"
09:41:32.319 "WRITTEN"
09:41:32.321 "FLUSHED"
09:41:32.321 [object Uint8Array]
09:41:32.322 "READ_LENGTH: 2"
09:41:32.322 "READ: rc"
(Reporter)

Comment 5

5 years ago
I can reproduce on Linux with Nightly.

Updated

9 months ago
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.