Closed Bug 1306181 Opened 8 years ago Closed 8 years ago

Remove IDBEnvironment in favor of partial interface in WindowOrWorkerGlobalScope

Categories

(Core :: Storage: IndexedDB, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: bevis, Assigned: bevis)

References

Details

Attachments

(1 file)

This is a followup bug to address the webidl change of removing IDBEnvrionment in favor of: 
partial interface WindowOrWorkerGlobalScope {
   readonly attribute IDBFactory indexedDB;
};
according to https://github.com/w3c/IndexedDB/pull/95

However, there is no WindowOrWorkerGlobalScope interface defined in gecko yet which is specified in 
https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope-mixin
Boris just landed WindowOrWorkerGlobalScope in bug 1269052.
Depends on: 1269052
Cool!
Thanks for updating this. I'll follow up this bug.
Assignee: nobody → btseng
Status: NEW → ASSIGNED
Depends on: 1312330
Update Webidl for IndexedDB according to the change in https://github.com/w3c/IndexedDB/pull/95 after WindowOrWorkerGlobalScope was introduced in bug 1269052.

Note: 
1. The [Exposed] attribute in WPT test is required as explained in 1312330.
2. Treeherder result for reference:
   https://treeherder.mozilla.org/#/jobs?repo=try&revision=f0808d6f2979
Attachment #8804542 - Flags: review?(bkelly)
Comment on attachment 8804542 [details] [diff] [review]
(v1) Patch: Remove IDBEnvironment in favor of partial interface in WindowOrWorkerGlobalScope.

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

::: dom/webidl/WindowOrWorkerGlobalScope.webidl
@@ +56,5 @@
> +// http://w3c.github.io/IndexedDB/#factory-interface
> +partial interface WindowOrWorkerGlobalScope {
> +   // readonly attribute IDBFactory indexedDB;
> +   [Throws]
> +   readonly attribute IDBFactory? indexedDB;

Why do we have the nullable "?" IDBFactory here?  Is it to enable some gecko specific mode like disabled 3rd party cookies or something?
NI for question in comment 4.
Flags: needinfo?(btseng)
(In reply to Ben Kelly [:bkelly] from comment #4)
> Comment on attachment 8804542 [details] [diff] [review]
> (v1) Patch: Remove IDBEnvironment in favor of partial interface in
> WindowOrWorkerGlobalScope.
> 
> Review of attachment 8804542 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: dom/webidl/WindowOrWorkerGlobalScope.webidl
> @@ +56,5 @@
> > +// http://w3c.github.io/IndexedDB/#factory-interface
> > +partial interface WindowOrWorkerGlobalScope {
> > +   // readonly attribute IDBFactory indexedDB;
> > +   [Throws]
> > +   readonly attribute IDBFactory? indexedDB;
> 
> Why do we have the nullable "?" IDBFactory here?  Is it to enable some gecko
> specific mode like disabled 3rd party cookies or something?

Yes, the null will be returned in the following case:
http://searchfox.org/mozilla-central/rev/4012e61cc38758ffa1f7ce26039173f67b048853/dom/indexedDB/IDBFactory.cpp#290-296
So I moved the modification done in IDBEnvironment to this partial interface.
Sorry for not mentioning this when asking for the review. :|
Flags: needinfo?(btseng)
Comment on attachment 8804542 [details] [diff] [review]
(v1) Patch: Remove IDBEnvironment in favor of partial interface in WindowOrWorkerGlobalScope.

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

Thanks!
Attachment #8804542 - Flags: review?(bkelly) → review+
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/67fbbeb0677b
Remove IDBEnvironment in favor of partial interface in WindowOrWorkerGlobalScope. r=bkelly
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/67fbbeb0677b
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: