Closed Bug 1266178 Opened 4 years ago Closed 4 years ago

Expose ServiceWorkerClient.frameType of "none" when document does not have a window

Categories

(Core :: DOM: Service Workers, defect)

48 Branch
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: bkelly, Assigned: bkelly)

References

Details

(Whiteboard: btpp-active)

Attachments

(1 file)

While working on the test for bug 1265795 I ran into this assert:

  MOZ_ASSERT(outerWindow);

At:

  https://dxr.mozilla.org/mozilla-central/source/dom/workers/ServiceWorkerClient.cpp?from=ServiceWorkerClient.cpp#67

I'm going to be closing some of the cases which allow this, but I think there is always the risk someone will get a client just as the user closes it.  We should gracefully handle this by returning the default "none" frame type.
This also sets a default frame type which should improve the safety of the code a bit.
Attachment #8743443 - Flags: review?(ehsan)
Whiteboard: btpp-active
Attachment #8743443 - Flags: review?(ehsan) → review+
https://hg.mozilla.org/mozilla-central/rev/987e2c82c04f
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.