The default bug view has changed. See this FAQ.

Add documents' element size to documents' size computation

VERIFIED FIXED in mozilla7

Status

()

Core
DOM: Core & HTML
VERIFIED FIXED
6 years ago
6 years ago

People

(Reporter: mounir, Assigned: mounir)

Tracking

Trunk
mozilla7
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 542181 [details] [diff] [review]
Patch v1
Attachment #542181 - Flags: review?(jst)
(Assignee)

Updated

6 years ago
Whiteboard: [needs review]
This should probably be (or become) virtual, because we'll need to address text and attr storage at some point.
(Assignee)

Comment 2

6 years ago
(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+
(Assignee)

Comment 4

6 years ago
(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.
(Assignee)

Updated

6 years ago
Flags: in-testsuite-
Whiteboard: [needs review] → [inbound]
(Assignee)

Comment 5

6 years ago
http://hg.mozilla.org/mozilla-central/rev/bfe78e7bfa5d
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla7

Comment 6

6 years ago
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.