The default bug view has changed. See this FAQ.

MutationReceiver doesn't need to be cycle collected

RESOLVED FIXED

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: smaug, Assigned: smaug)

Tracking

Trunk
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 639091 [details] [diff] [review]
patch

nsMutationReceiver doesn't keep anything alive (except temporarily), so it can't
cause cycles.

Disconnect(false); is called in dtor.

https://tbpl.mozilla.org/?tree=Try&rev=eeffc849d88d
Attachment #639091 - Flags: review?(jonas)
Attachment #639091 - Flags: review?(jonas) → review?(continuation)
Comment on attachment 639091 [details] [diff] [review]
patch

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

So none of the node etc pointers in nsMutationReceiverBase need cycle collection because they are either weak or are explicitly killed off by the observer?
Attachment #639091 - Flags: review?(continuation) → review+
Yes. The strong pointers are temporarily kept alive while there are transient observers.
https://hg.mozilla.org/mozilla-central/rev/db88713eebf7
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.