Closed
Bug 1218499
Opened 10 years ago
Closed 10 years ago
FetchEvent constructor will happily set mRequest to null if not passed
Categories
(Core :: DOM: Service Workers, defect)
Core
DOM: Service Workers
Tracking
()
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file)
2.92 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
But the IDL says it can't be null, so I expect this:
(new FetchEvent("foo")).request
to crash with a null-deref in binding code.
Looks to me like the spec at https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#fetch-event-section has the same bug (except it just doesn't say what to do if request is not set, as opposed to requiring a crash).
Chances are "request" should just be required in FetchEventInit.
![]() |
Reporter | |
Comment 1•10 years ago
|
||
Oh, and looks like I mentioned this once before in bug 1065216 comment 3 and got ignored...
![]() |
Reporter | |
Comment 2•10 years ago
|
||
I guess https://github.com/slightlyoff/ServiceWorker/issues/680 is the spec issue. But we shouldn't wait for the spec to be fixed to stop crashing. Probably need to just mark this member as nullable.
Assignee | ||
Comment 3•10 years ago
|
||
Yeah we definitely crash here.
Assignee: nobody → ehsan
Blocks: ServiceWorkers-v1
Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8679059 -
Flags: review?(bzbarsky)
![]() |
Reporter | |
Comment 5•10 years ago
|
||
Comment on attachment 8679059 [details] [diff] [review]
Make FetchEvent.request nullable
r=me
Attachment #8679059 -
Flags: review?(bzbarsky) → review+
Comment 7•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•