Closed Bug 827740 Opened 12 years ago Closed 11 years ago

B2G needs to handle IndexedDB quota prompts

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-basecamp:+, firefox19 wontfix, firefox20 wontfix, firefox21 fixed, b2g18 fixed)

RESOLVED FIXED
B2G C4 (2jan on)
blocking-basecamp +
Tracking Status
firefox19 --- wontfix
firefox20 --- wontfix
firefox21 --- fixed
b2g18 --- fixed

People

(Reporter: bent.mozilla, Assigned: bent.mozilla)

Details

Attachments

(3 files, 2 obsolete files)

Attached patch Patch, v1 (obsolete) — Splinter Review
Talked with everyone today and we decided that v1 can simply deny all quota increase requests. Attached patch should automatically do that.
Attachment #699071 - Flags: review?(ben)
Comment on attachment 699071 [details] [diff] [review]
Patch, v1

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

::: b2g/chrome/content/shell.js
@@ +836,5 @@
>  }
>  
> +var IndexedDBPromptHelper = {
> +  _quotaPrompt: "indexedDB-quota-prompt",
> +  _quotaResponse: "indexedDB-quota-response",

r-

@@ +860,5 @@
> +    var responseTopic = this._quotaResponse;
> +
> +    setTimeout(function() {
> +      observer.observe(null, responseTopic,
> +                       Ci.nsIPermissionManager.Deny_ACTION);

r--
Attached patch Patch, v1.1 (obsolete) — Splinter Review
Oops, s/Deny/DENY/
Assignee: nobody → bent.mozilla
Attachment #699071 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #699071 - Flags: review?(ben)
Attachment #699074 - Flags: review?(ben)
This patch works, but fabrice wants us to do a real prompt rather than deny automatically. Over to Dale for that :)
Assignee: bent.mozilla → dale
Component: Gaia::Browser → Gaia::System
QA Contact: nhirata.bugzilla
Ok, nevermind, we're going with this for v1.
Assignee: dale → bent.mozilla
Backing up for when we want to implement prompts
Backing up for when we implement prompts
Comment on attachment 699074 [details] [diff] [review]
Patch, v1.1

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

r=me with s/var/let
Attachment #699074 - Flags: review?(fabrice) → review+
I just addressed the nits and formatted the ptach for checkin
Attachment #699074 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/08c6579a454b
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Was there ever a follow-up filed to implement the real prompt for IDB quota increase?
(In reply to Ben Kelly [:bkelly] from comment #12)
> Was there ever a follow-up filed to implement the real prompt for IDB quota
> increase?

Looks like no. Any app can opt-in to unlimited indexedDB with the "storage" permission (even non privileged ones). So we only limit web sites.
Correct for B2G. Web sites are never allowed to go beyond their first quota limit (it's as if the user always picks the 'deny' option). Apps are in the same boat by default unless they have the 'storage' permission as fabrice notes.
So if an app needs to work with a large IDB, they should add 'storage' to their manifest even if they don't use the storage API explicitly?  That seems a bit unintuitive to me.

See this dev-gaia thread for context:

  https://groups.google.com/forum/#!topic/mozilla.dev.gaia/5cbE9o_buhY
> Correct for B2G. Web sites are never allowed to go beyond their first quota limit (it's as if the user always picks the 'deny' option). Apps are in the same boat by default unless they have the 'storage' permission as fabrice notes.

But we should fix that right? we want more web content to 'just work' and less dependency on people to create fxos only manifests
Yes. A lot of the storage backend is being rewritten currently. Once that's done we should have an easier time getting prompts properly working on B2G.
The patch to support this seems fairly simple, opened a new bug and will try to see about getting it working for 2.1

https://bugzilla.mozilla.org/show_bug.cgi?id=1048696
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: