[service workers][cache]Seg Fault when calling cache.matchAll without parameters

RESOLVED FIXED in Firefox 39

Status

()

RESOLVED FIXED
4 years ago
13 days ago

People

(Reporter: opatinobugzilla, Assigned: bkelly)

Tracking

unspecified
mozilla39
x86_64
Linux
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox39 fixed)

Details

(Whiteboard: service workers cache)

Attachments

(2 attachments)

(Reporter)

Description

4 years ago
Browser crashes when service worker calls cache.matchAll without parameters. These parameters are optional so it can be call without any.
(Reporter)

Updated

4 years ago
Whiteboard: service workers cache
Blocks: 1059784
Thanks Oscar!

I believe I know what this is.  When I added the WorkerFeature to Cache I used assertions to check that a feature is only added once to each actor.  This doesn't quite hold for the stream control actor because each one manages multiple streams.

The tests did not catch this because the matchAll() is likely done on main thread and not worker.  There is a separate bug to improve test coverage.

I'll have a patch shortly.
Assignee: nobody → bkelly
Blocks: 940273
Component: DOM: Workers → DOM
(Assignee)

Updated

4 years ago
Status: NEW → ASSIGNED
Andrea,

There is a small bug in the WorkerFeature code I wrote for Cache.  I assumed each actor would only ever get a Feature added once.  This doesn't hold for the CacheStreamControlChild, though, as it may be controlling multiple ReadStream objects.

This patch fixes the issue by permitting a duplicate SetFeature() as long as the later Feature objects are identical to the first Feature.
Attachment #8571979 - Flags: review?(amarchesini)
Note, I verified this test triggers the reported assertion as well.
Attachment #8571979 - Flags: review?(amarchesini) → review+
(Assignee)

Updated

4 years ago
Keywords: checkin-needed
(Assignee)

Updated

4 years ago
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/f3d517d39e43
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
status-firefox39: --- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
(Reporter)

Comment 7

4 years ago
Now matchAll without parameters is working. Thanks bkelly.
Component: DOM → DOM: Core & HTML
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.