IndexedDB: Audit exceptions thrown from indexedDB methods

RESOLVED FIXED

Status

()

Core
DOM: IndexedDB
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: Ben Turner (not reading bugmail, use the needinfo flag!), Assigned: Ben Turner (not reading bugmail, use the needinfo flag!))

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Need to make sure we don't leak implementation details through exceptions, and need to make sure we throw the exception code that the spec suggests.
Created attachment 485516 [details] [diff] [review]
Patch, v1

This fixes all our error codes, I think.
Attachment #485516 - Flags: review?(jonas)
Comment on attachment 485516 [details] [diff] [review]
Patch, v1

> IDBDatabase::RemoveObjectStore(const nsAString& aName)
...
>   if (aName.IsEmpty()) {
>-    return NS_ERROR_INVALID_ARG;
>-  }

Just remove this part.

I have to say though, I think this patch is a really bad idea. It'll make debugging harder both for us and for authors to clamp all the errors.

The security review comments was only about the security sensitive errors. Feel free to check this with the others who were at the review :)

The only security sensitive errors that I can think of are file handling related ones, and possibly ones related to what particular version of sqlite is installed.

So only return values from sqlite are the ones we should clamp.

I'm fine with doing this for now though.
Attachment #485516 - Flags: review?(jonas) → review+
blocking2.0: --- → betaN+
http://hg.mozilla.org/mozilla-central/rev/fcaf91df3004
Status: ASSIGNED → RESOLVED
blocking2.0: betaN+ → ---
Last Resolved: 7 years ago
Resolution: --- → FIXED
Component: DOM → DOM: IndexedDB
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.