BuildContentLists should allocate contentList after getting parent

RESOLVED FIXED in mozilla5

Status

()

defect
RESOLVED FIXED
9 years ago
Last year

People

(Reporter: timeless, Assigned: timeless)

Tracking

(Blocks 1 bug, {coverity, memory-leak})

Trunk
mozilla5
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Assignee

Description

9 years ago
// XXX Could this array just be altered in place and passed directly to
   // SetContentListFor?  We'd save space if we could pull this off.
   nsInsertionPointList* contentList = new nsInsertionPointList;
   if (!contentList) {
     data->mRv = NS_ERROR_OUT_OF_MEMORY;
     return PL_DHASH_STOP;
   }

   // Figure out the relevant content node.
   nsXBLInsertionPoint* currPoint = aData->ElementAt(0);
   nsCOMPtr<nsIContent> parent = currPoint->GetInsertionParent();
   if (!parent) {
     data->mRv = NS_ERROR_FAILURE;
leaks contentList:
     return PL_DHASH_STOP;
   }
   PRInt32 currIndex = currPoint->GetInsertionIndex();
Assignee

Comment 1

9 years ago
Posted patch patchSplinter Review
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #465181 - Flags: review?(neil)
Comment on attachment 465181 [details] [diff] [review]
patch

Patch could have used a bigger -U (5 or so)
Attachment #465181 - Flags: review?(neil) → review+
Assignee

Updated

9 years ago
Attachment #465181 - Flags: approval2.0?
Comment on attachment 465181 [details] [diff] [review]
patch

Mass minusing patch approval that don't have high return. Please renominate if this is more important for 2.0 than it appears.
Attachment #465181 - Flags: approval2.0? → approval2.0-

Comment 4

8 years ago
http://hg.mozilla.org/mozilla-central/rev/53c333d9961f
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.2
You need to log in before you can comment on or make changes to this bug.