Closed Bug 1616001 Opened 4 years ago Closed 2 years ago

Inconsistent behaviour of IDBFileHandle.truncate in append mode

Categories

(Core :: Storage: IndexedDB, defect, P2)

defect

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox75 --- affected

People

(Reporter: sg, Unassigned)

Details

As it turns out by https://phabricator.services.mozilla.com/D60706#inline-377953, the behaviour of IDBFileHandle.truncate seems inconsistent. On a handle opened in "append" mode, IDBFileHandle.truncate called without a parameter throws an exception, but IDBFileHandle.truncate called with a location parameter works.

It should be checked if this is the intended behaviour, and maybe fixed so that IDBFileHandle.truncate may either not be called on a handle opened in "append" mode at all (which seems logical), or it may be called in both ways (even if it doesn't have an effect when called without a parameter). At least, if the current behaviour is kept, a suitable exception message should be provided in the currently failing case.

Priority: -- → P2
Severity: normal → S3

Wontfixing FileHandle bugs as bug 1500343 will remove it.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.