The default bug view has changed. See this FAQ.

Do a basic computation of windows' size in the DOM Memory Reporter

RESOLVED FIXED in mozilla7

Status

()

Core
DOM: Core & HTML
RESOLVED 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
Basically, the idea of this patch is to add the code that goes trough all windows (even leaked ones) and add sizeof(*this) to the dom memory reporter section.
Documents/elements will be added in another bug same as improving window's memory usage computation.
(Assignee)

Comment 1

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

Updated

6 years ago
Blocks: 667485
Comment on attachment 542173 [details] [diff] [review]
Patch v1

+  PRInt64 SizeOf() const {
+    return sizeof(*this);

Is there precedence in other similar code to use PRInt64 for the return type of SizeOf()? If not, I think we should use size_t here, or PRUint64 if size_t is no good.

r=jst with that.
Attachment #542173 - Flags: review?(jst) → review+
PRInt64 is the return type for GetMemoryUsed() in nsIMemoryReporter classes, which is probably why Mounir is using it.
(Assignee)

Comment 4

6 years ago
Exactly. I believe I should keep PRInt64 given that the only caller needs PRInt64 and not size_t. Though, Nicholas, why nsIMemoryReporter uses PRInt64 instead of size_t?
(In reply to comment #4)
> Though, Nicholas, why nsIMemoryReporter uses PRInt64 instead of size_t?

I don't know, it was like that when I inherited the code.
(Assignee)

Updated

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

Comment 6

6 years ago
http://hg.mozilla.org/mozilla-central/rev/6539e8965444
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla7
(In reply to comment #5)
> (In reply to comment #4)
> > Though, Nicholas, why nsIMemoryReporter uses PRInt64 instead of size_t?
> 
> I don't know, it was like that when I inherited the code.

It was like that because it was designed to be called from script in the first about:memory impl vlad did.
You need to log in before you can comment on or make changes to this bug.