Closed Bug 1035424 Opened 10 years ago Closed 4 years ago

IndexedDB: Report better error on version mismatch caused by downgrade

Categories

(Core :: Storage: IndexedDB, enhancement, P5)

All
Gonk (Firefox OS)
enhancement

Tracking

()

RESOLVED INVALID

People

(Reporter: jhobin, Assigned: jhobin)

Details

Attachments

(1 obsolete file)

Steps to reproduce:
  - Update phone to latest trunk
  - Flash phone with suitably old branch (e.g. mozilla-aurora)

Current behavior:
Gecko will now report an NS_ERROR_DOM_INDEXEDDB_VERSION_ERR without any context for all IndexedDBs that had were upgraded in version number between aurora and central.

Expected behavior:
Gecko reports an error with context sufficient to locate the database that has the version number error.
What do you mean "Gecko reports"?

This bug should probably be filed against the various consumers of IndexedDB.
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #1)
> What do you mean "Gecko reports"?
> 
> This bug should probably be filed against the various consumers of IndexedDB.

I envisioned this fix as an NS_WARNING or IDB_WARNING occurring around https://mxr.mozilla.org/mozilla-central/source/dom/indexedDB/OpenDatabaseHelper.cpp#1922. It could be added to the consumers instead, but other places in that file appear to use the `NS_WARNING("something"); return NS_BLAH_BLAH_ERROR` pattern.
Assignee: nobody → jhobin
This removes the if (DEBUG) guard from IndexedDBHelper's onerror callback, making it possible to diagnose NS_ERROR_DOM_INDEXEDDB_VERSION_ERR in production.

It also makes the if (DEBUG) guards in IndexedDBHelper meaningful. The function debug was defined as a no-op if the DEBUG flag was not set.
Attachment #8451996 - Flags: review?(anygregor)
Comment on attachment 8451996 [details] [diff] [review]
Increase verbosity of IndexedDBHelper logging

Review of attachment 8451996 [details] [diff] [review]:
-----------------------------------------------------------------

Lets make sure no other logging shows up with this patch.
Thanks!
Attachment #8451996 - Flags: review?(anygregor) → review+
Priority: -- → P5

:sgiesecke, can you please check, if this is still an issue?

Flags: needinfo?(sgiesecke)

The attached patch does not solve the problem, it is merely some means to support understanding of the problem. I don't think this should land.

The underlying issue is described as being specific to Firefox OS, so I think we can close this issue.

Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(sgiesecke)
Resolution: --- → INVALID
Attachment #8451996 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: