Bug 350949. Feed preview leaks memory. Remove nsIFeedEntry.parent. r=vlad

This commit is contained in:
sayrer%gmail.com 2006-09-11 20:14:06 +00:00
parent 7e021d3aa8
commit 930ee19a73
3 changed files with 1 additions and 44 deletions

View File

@ -47,11 +47,6 @@ interface nsIArray;
[scriptable, uuid(31bfd5b4-8ff5-4bfd-a8cb-b3dfbd4f0a5b)]
interface nsIFeedEntry : nsIFeedContainer {
/**
* Parent Feed, Entry, or Item.
*/
attribute nsIFeedContainer parent;
/**
* Uses description, subtitle, summary, content and extensions
* to generate a summary.

View File

@ -1378,12 +1378,9 @@ FeedProcessor.prototype = {
var obj, key, prefix;
// If the container is an entry/item, it'll need to have its
// more esoteric properties put in the 'fields' property bag, and set its
// parent.
// more esoteric properties put in the 'fields' property bag.
if (elementInfo.containerClass == Cc[ENTRY_CONTRACTID]) {
obj = elementInfo.containerClass.createInstance(Ci.nsIFeedEntry);
// Set the parent property of the entry.
obj.parent = this._result.doc;
obj.baseURI = this._xmlBaseStack[this._xmlBaseStack.length - 1];
this._mapAttributes(obj.fields, attributes);
}

View File

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: atom feed and entry with random attributes works
Expect: var parent = feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).parent; parent.title.text == "hmm";
-->
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:foo="http://www.example.org"
foo:quux="quuux">
<title>hmm</title>
<author>
<email>hmm@example.com</email>
<name>foo</name>
</author>
<generator version="1.1" uri="http://example.org">Hmm</generator>
<author>
<email>bar@example.com</email>
<name>foo</name>
</author>
<rights type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
</rights>
<entry></entry>
<entry foo:bar="baz">
<title>test</title>
</entry>
</feed>