Closed Bug 667497 Opened 10 years ago Closed 10 years ago

Add documents' element size to documents' size computation

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla7

People

(Reporter: mounir, Assigned: mounir)

References

Details

Attachments

(1 file)

Attached patch Patch v1Splinter Review
No description provided.
Attachment #542181 - Flags: review?(jst)
Whiteboard: [needs review]
This should probably be (or become) virtual, because we'll need to address text and attr storage at some point.
(In reply to comment #1)
> This should probably be (or become) virtual, because we'll need to address
> text and attr storage at some point.

Sure. But not needed for the moment.
Comment on attachment 542181 [details] [diff] [review]
Patch v1

s/PRInt64/size_t/ as mentioned in other related bugs.

r=jst
Attachment #542181 - Flags: review?(jst) → review+
(In reply to comment #3)
> Comment on attachment 542181 [details] [diff] [review] [review]
> Patch v1
> 
> s/PRInt64/size_t/ as mentioned in other related bugs.
> 
> r=jst

I'm going to keep PRInt64 as long as the memory reporter interface is going to require it.
Flags: in-testsuite-
Whiteboard: [needs review] → [inbound]
http://hg.mozilla.org/mozilla-central/rev/bfe78e7bfa5d
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla7
Fix visible in the /content/base/src/nsDocument.cpp file:

    3.12 +PRInt64
    3.13 +nsIDocument::SizeOf() const
    3.14 +{
    3.15 +  PRInt64 size = sizeof(*this);
    3.16 +
    3.17 +  for (nsIContent* node = GetFirstChild(); node;
    3.18 +       node = node->GetNextNode(this)) {
    3.19 +    size += node->SizeOf();
    3.20 +  }
    3.21 +
    3.22 +  return size;
    3.23 +}
    3.24 +
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.