Closed Bug 1047398 Opened 10 years ago Closed 10 years ago

nsTWeakRef usage in ServiceWorkerManager makes no sense

Categories

(Core :: DOM: Workers, defect)

x86
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: bzbarsky, Assigned: baku)

References

Details

Attachments

(1 file)

nsTWeakRef only does something useful if you call forget() on it when the object it's pointing to dies.  In particular, you can only nsTWeakRef an object if the object has an nsTWeakRef member that it notifies when going away.

Clearly using nsTWeakRef<Promise> does NOT fulfill this criterion.  Hence the crashes in serviceworker tests where we do things like QI deleted objects.

Andrea, since nsm is out do you have time to look here by any chance?
Flags: needinfo?(amarchesini)
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)
Attached patch nsTWeakRef.patch (deleted) — Splinter Review
Attachment #8466219 - Flags: review?(bugs)
Attachment #8466219 - Flags: review?(bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/9e697595943c
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: