Closed Bug 935457 Opened 11 years ago Closed 8 years ago

IDBKeyRange is not available to frameworkers

Categories

(Firefox Graveyard :: SocialAPI, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: standard8, Unassigned)

References

Details

Attachments

(1 file)

Trying to use indexeddb in a frameworker, I want to use IDBKeyRange for searching within cursors, however, when I try to use it I get:

ReferenceError: Port MessagePort(portType='worker', portId=99) handler failed: IDBKeyRange is not defined

The same code works fine when loaded in a normal tab.
Attached patch PatchSplinter Review
The attached patch does what's requested in comment 0.

I'm not sure how much of the API documented at https://developer.mozilla.org/en-US/docs/IndexedDB#Asynchronous_API needs to be exposed.
Attachment #828031 - Flags: feedback?(mixedpuppy)
Are there other IndexedDB globals that we should expose? Will these globals be exposed to SharedWorkers?
The entire API will be exposed (once we implement it ...).
Comment on attachment 828031 [details] [diff] [review]
Patch

I'm ok with this in general, bug if all these apis will be in a real worker, I don't see any reason that we shouldn't just expose whatever is implemented (and I'm not clear on what is or isn't).
Attachment #828031 - Flags: feedback?(mixedpuppy) → feedback+
We should just expose "whatever is implemented", the tricky part is finding such a list and keeping it up to date...
http://mxr.mozilla.org/mozilla-central/source/dom/tests/mochitest/general/test_interfaces.html?force=1#326 may be the list we are looking for here.

A comment at the top of the file says "// This is a list of all interfaces that are exposed to every webpage."
It's not a list of interfaces exposed to workers.
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #7)
> It's not a list of interfaces exposed to workers.

Not sure of what you mean. Is IndexedDB now exposed to workers? What I was looking for is a list of the currently implemented IndexedDB APIs that will eventually be available to workers, so that we can expose them now in frameworkers. Your comment 3 here made me think that all the IndexedDB APIs currently available in dom windows would eventually become available in workers, is this not correct?
Oh, sure, comment 3 is correct.  My point is that there's plenty of (non-IDB) stuff in that list that won't be added to workers.
deprecation in fx51
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: