Closed Bug 623316 Opened 14 years ago Closed 14 years ago

Provide way to remove IndexedDB from content

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fennec 2.0+ ---

People

(Reporter: dougt, Assigned: dougt)

Details

Attachments

(1 file, 1 obsolete file)

fennec will not ship IndexedDB in 4.0.  we need a prefable way of removing it from content similar to what we did with desktop notifications in firefox desktop.
Assignee: nobody → doug.turner
tracking-fennec: --- → 2.0+
OS: Mac OS X → All
Hardware: x86 → All
Attached patch patch v.1 (obsolete) (deleted) — Splinter Review
ben, jst suggested this approach.  Basically create a new interface for the indexedDB getter, and mark the existing one noscript.
Attachment #501717 - Flags: review?(bent.mozilla)
You should probably cache the return value of nsContentUtils::GetBoolPref().
jst, bent suggested to just drop the old method.  any objections?
Comment on attachment 501717 [details] [diff] [review]
patch v.1

>+    DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageIndexedDB)
>     DOM_CLASSINFO_MAP_ENTRY(nsIDOMModalContentWindow)

I don't think ModalContentWindow needs IndexedDB...

>+nsGlobalWindow::GetOldIndexedDB(nsIIDBFactory** _retval)

Hopefully we can combine the getters on both interfaces to avoid this one in C++.

>+  static bool HasIndexedDBSupport() {
>+    return nsContentUtils::GetBoolPref("indexedDB.feature.enabled", PR_TRUE);

I'd actually default to PR_FALSE.
Comment on attachment 501717 [details] [diff] [review]
patch v.1

Oh, and I was totally wrong earlier, I don't think we need to optimize the pref getter with a cache variable because nsDOMClassInfo::Init is only called once per app run. Before I thought that code would run every time we used the classinfo. Oops.
(In reply to comment #4)
> Comment on attachment 501717 [details] [diff] [review]
> patch v.1
> 
> >+    DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageIndexedDB)
> >     DOM_CLASSINFO_MAP_ENTRY(nsIDOMModalContentWindow)
> 
> I don't think ModalContentWindow needs IndexedDB...
Why not?
(In reply to comment #5)
>  earlier, I don't think we need to optimize the pref
> getter with a cache variable because nsDOMClassInfo::Init is only called once
> per app run.
Ah,  good. This is the information I was asking on IRC.
Attached patch patch v.2 (deleted) — Splinter Review
Attachment #501717 - Attachment is obsolete: true
Attachment #502552 - Flags: review?(bent.mozilla)
Attachment #501717 - Flags: review?(bent.mozilla)
Attachment #502552 - Flags: review?(bent.mozilla) → review+
Comment on attachment 502552 [details] [diff] [review]
patch v.2

Can you add a comment to nsIDOMStorageWindow saying that the mozIndexedDB getter should be removed post-2.0?
http://hg.mozilla.org/mozilla-central/rev/477494ee0f88
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Are there any user-facing issues to test around with this landing, doug?
For Firefox, nothing should have changed. For Fennec, there should no longer be a "mozIndexedDB" property on window/the global object.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: