mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Break cycle-through-XPCOM by adding an assignment to null when done with |iterator|. b=285065 r+sr=bryner
This commit is contained in:
parent
fdf2a0d680
commit
aa62d91bc1
@ -221,6 +221,11 @@
|
||||
while (iterator.nextNode())
|
||||
radioChildren.push(iterator.currentNode);
|
||||
|
||||
// assign null to break circular reference between _filterRadioGroup
|
||||
// and iterator (via this scope)
|
||||
// XXX The function really should be global instead of local.
|
||||
iterator = null;
|
||||
|
||||
return this.mRadioChildren = radioChildren;
|
||||
]]>
|
||||
</body>
|
||||
|
@ -220,6 +220,12 @@
|
||||
var iterator = this.ownerDocument.createTreeWalker(this, NodeFilter.SHOW_ELEMENT, _filterRadioGroup, true);
|
||||
while (iterator.nextNode())
|
||||
radioChildren.push(iterator.currentNode);
|
||||
|
||||
// assign null to break circular reference between _filterRadioGroup
|
||||
// and iterator (via this scope)
|
||||
// XXX The function really should be global instead of local.
|
||||
iterator = null;
|
||||
|
||||
return this.mRadioChildren = radioChildren;
|
||||
]]>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user