Closed
Bug 1019194
Opened 10 years ago
Closed 10 years ago
Get rid of nsIIndexedDatabaseManager
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
(Keywords: dev-doc-complete)
Attachments
(3 files)
12.97 KB,
patch
|
khuey
:
review+
paul
:
review+
mossop
:
review-
|
Details | Diff | Splinter Review |
3.89 KB,
patch
|
paul
:
review+
mossop
:
review+
|
Details | Diff | Splinter Review |
8.67 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
It's not needed anymore.
Assignee | ||
Comment 1•10 years ago
|
||
Paul, could you review the devtools changes? Dave, can you review the addon SDK changes?
Attachment #8433060 -
Flags: review?(paul)
Attachment #8433060 -
Flags: review?(khuey)
Attachment #8433060 -
Flags: review?(dtownsend+bugmail)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment 2•10 years ago
|
||
Comment on attachment 8433060 [details] [diff] [review] Get rid of nsIIndexedDatabaseManager r+ for app-projects.js and storage.js. I'm not sure we want to attach the indexedDB property to devtools modules from the addons sdk loader though. Can it be done from toolkit/devtools/Loader.jsm? Mossop will know.
Attachment #8433060 -
Flags: review?(paul) → review+
Assignee | ||
Comment 3•10 years ago
|
||
Yeah, I'm not a huge fan of that part either, but I couldn't find any existing APIs for us to pass in the fact that we need indexeddb down to the addon-sdk code that actually creates the sandbox. :(
Comment on attachment 8433060 [details] [diff] [review] Get rid of nsIIndexedDatabaseManager Review of attachment 8433060 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/xpconnect/src/dom_quickstubs.qsconf @@ -79,5 @@ > irregularFilenames = { > # stowaways > 'nsIDOMBlob': 'nsIDOMFile', > - 'nsIIndexedDatabaseUsageCallback': 'nsIIndexedDatabaseManager', > - 'nsITelephoneCallback': 'nsITelephone', I assume this nsITelephone bit is not actually related to the indexedDB stuff.
Attachment #8433060 -
Flags: review?(khuey) → review+
Assignee | ||
Comment 5•10 years ago
|
||
That's correct. It was just dead code.
Comment 6•10 years ago
|
||
Comment on attachment 8433060 [details] [diff] [review] Get rid of nsIIndexedDatabaseManager Review of attachment 8433060 [details] [diff] [review]: ----------------------------------------------------------------- ::: addon-sdk/source/lib/toolkit/loader.js @@ +288,5 @@ > prototype: create(globals, descriptors), > wantXrays: false, > + wantGlobalProperties: (module.id == "sdk/indexed-db" || > + module.id == "devtools/app-manager/app-projects" || > + module.id == "devtools/server/actors/storage") ? ["indexedDB"] : [], These modules should be able to just do |var { indexedDB } = require('sdk/indexed-db');| to get what they need I think.
Attachment #8433060 -
Flags: review?(dtownsend+bugmail) → review-
Assignee | ||
Comment 7•10 years ago
|
||
> These modules should be able to just do |var { indexedDB } = require('sdk/indexed-db');|
No, doesn't work. The thing that provides you only has open(), cmp() (brokenly), and deleteDatabase() methods. The devtools code needs things like openForPrincipal().
That said, adding openForPrincipal on there makes the devtools tests happy, looks like.
Assignee | ||
Comment 8•10 years ago
|
||
Attachment #8441424 -
Flags: review?(paul)
Attachment #8441424 -
Flags: review?(dtownsend+bugmail)
Assignee | ||
Comment 9•10 years ago
|
||
Attachment #8441430 -
Flags: review?(khuey)
Updated•10 years ago
|
Attachment #8441424 -
Flags: review?(paul) → review+
Updated•10 years ago
|
Attachment #8441424 -
Flags: review?(dtownsend+bugmail) → review+
Assignee | ||
Comment 10•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=da0c0b69ec16
Attachment #8441430 -
Flags: review?(khuey) → review+
Assignee | ||
Comment 11•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/94b80abc44b5 https://hg.mozilla.org/integration/mozilla-inbound/rev/4b4e5289a82a
Assignee | ||
Updated•10 years ago
|
Flags: in-testsuite-
Target Milestone: --- → mozilla33
https://hg.mozilla.org/mozilla-central/rev/94b80abc44b5 https://hg.mozilla.org/mozilla-central/rev/4b4e5289a82a
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 13•10 years ago
|
||
Commit pushed to master at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/ae38002da16d8f5a00b24a450769d8234bfd0ddd Bug 1019194 part 1. Get rid of nsIIndexedDatabaseManager. r=paul,khuey,mossop
Comment 14•10 years ago
|
||
Hi, what is the alternate method of accessing the IndexedDB in Firefox 33 from Sandbox (iMacros addon). After updating Firefox to v.33 my app crashes on these lines: var sandbox = this; Components.classes["@mozilla.org/dom/indexeddb/manager;1"].getService(Components.interfaces.nsIIndexedDatabaseManager).initWindowless(sandbox); with the following error: Components.classes['@mozilla.org/dom/indexeddb/manager;1'] is undefined Thanks in advance!
Assignee | ||
Comment 15•10 years ago
|
||
> what is the alternate method of accessing the IndexedDB in Firefox 33 from Sandbox
Pass { wantGlobalProperties: ["indexedDB"] } as the last argument to your sandbox constructor.
Then you can just use "indexedDB" in the sandbox and it will work.
Comment 16•10 years ago
|
||
Thank you Boris. This works perfect for the newly created Sandbox object. But what if I'm working with the sandbox that is already created by another vendor. Can I augment the existing Sandbox with IndexedDB?
Assignee | ||
Comment 17•10 years ago
|
||
In that case, Components.utils.importGlobalProperties(["indexedDB"]) from inside the sandbox, if it's system-privileged. If it's not system-privileged, I'm not sure there's a way to do it...
Comment 18•10 years ago
|
||
Boris, thank you very much! I've searched all over the internet and even posted a question on StackOverflow with no luck to find an answer. You've made my day! =)
Assignee | ||
Comment 19•10 years ago
|
||
Alex, you're welcome!
Depends on: 1083973
Comment 20•9 years ago
|
||
docs needed for at least https://developer.mozilla.org//Web/API/IndexedDB_API/Using_IndexedDB_in_chrome
Keywords: dev-doc-needed
Comment 21•9 years ago
|
||
Jared, I've had a go at updating the page. Please let me know if it looks all right: https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB_in_chrome.
Flags: needinfo?(6a68)
Updated•9 years ago
|
Keywords: dev-doc-needed → dev-doc-complete
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•