Make FetchEvent.request non-nullable

RESOLVED FIXED in Firefox 46

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

({dev-doc-complete})

unspecified
mozilla46
dev-doc-complete
Points:
---

Firefox Tracking Flags

(firefox46 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
It seems that the spec has changed now to make |request| a required init member, so it is non-nullable now.
(Assignee)

Comment 1

3 years ago
Created attachment 8705931 [details] [diff] [review]
Make FetchEvent.request non-nullable
Attachment #8705931 - Flags: review?(amarchesini)
Keywords: dev-doc-needed
Comment on attachment 8705931 [details] [diff] [review]
Make FetchEvent.request non-nullable

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

::: dom/webidl/FetchEvent.webidl
@@ +10,5 @@
>  [Constructor(DOMString type, optional FetchEventInit eventInitDict),
>   Func="mozilla::dom::workers::ServiceWorkerVisible",
>   Exposed=(ServiceWorker)]
>  interface FetchEvent : ExtendableEvent {
> +  [SameObject] readonly attribute Request request;

Do we still need [SameObject] ?

::: dom/workers/test/serviceworkers/fetch_event_worker.js
@@ +297,5 @@
> +    try {
> +      new FetchEvent("foo");
> +    } catch(e) {
> +      if (e.name == "TypeError") {
> +        dump("XXXehsan " + e + "\n" + e.name + "\n");

dump?
Attachment #8705931 - Flags: review?(amarchesini) → review+
(Assignee)

Comment 3

3 years ago
(In reply to Andrea Marchesini (:baku) from comment #2)
> Comment on attachment 8705931 [details] [diff] [review]
> Make FetchEvent.request non-nullable
> 
> Review of attachment 8705931 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: dom/webidl/FetchEvent.webidl
> @@ +10,5 @@
> >  [Constructor(DOMString type, optional FetchEventInit eventInitDict),
> >   Func="mozilla::dom::workers::ServiceWorkerVisible",
> >   Exposed=(ServiceWorker)]
> >  interface FetchEvent : ExtendableEvent {
> > +  [SameObject] readonly attribute Request request;
> 
> Do we still need [SameObject] ?

Yes.

Comment 6

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/f372ff2c6518
https://hg.mozilla.org/mozilla-central/rev/3bbaa0504a64
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox46: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
I've added a note about this to the request doc:

https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/request

And a note to the Gecko 46 release notes:

https://developer.mozilla.org/en-US/Firefox/Releases/46#Service_Workers

Let me know if this is ok.
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.