Last Comment Bug 770887 - MutationReceiver doesn't need to be cycle collected
: MutationReceiver doesn't need to be cycle collected
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: ---
Assigned To: Olli Pettay [:smaug] (high review load, please consider other reviewers)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-04 07:28 PDT by Olli Pettay [:smaug] (high review load, please consider other reviewers)
Modified: 2012-07-09 13:46 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (2.13 KB, patch)
2012-07-04 07:28 PDT, Olli Pettay [:smaug] (high review load, please consider other reviewers)
continuation: review+
Details | Diff | Review

Description Olli Pettay [:smaug] (high review load, please consider other reviewers) 2012-07-04 07:28:58 PDT
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
Comment 1 Andrew McCreight (PTO-ish through 6-29) [:mccr8] 2012-07-09 13:40:59 PDT
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?
Comment 2 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2012-07-09 13:43:48 PDT
Yes. The strong pointers are temporarily kept alive while there are transient observers.
Comment 3 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2012-07-09 13:46:44 PDT
https://hg.mozilla.org/mozilla-central/rev/db88713eebf7

Note You need to log in before you can comment on or make changes to this bug.