Last Comment Bug 667497 - Add documents' element size to documents' size computation
: Add documents' element size to documents' size computation
Status: VERIFIED FIXED
:
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla7
Assigned To: Mounir Lamouri (:mounir)
:
Mentors:
Depends on: 667485
Blocks: 663271
  Show dependency treegraph
 
Reported: 2011-06-27 09:55 PDT by Mounir Lamouri (:mounir)
Modified: 2011-09-13 00:38 PDT (History)
2 users (show)
mounir: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (1.88 KB, patch)
2011-06-27 09:55 PDT, Mounir Lamouri (:mounir)
jst: review+
Details | Diff | Review

Description Mounir Lamouri (:mounir) 2011-06-27 09:55:23 PDT
Created attachment 542181 [details] [diff] [review]
Patch v1
Comment 1 Boris Zbarsky [:bz] (Out June 25-July 6) 2011-06-27 10:31:09 PDT
This should probably be (or become) virtual, because we'll need to address text and attr storage at some point.
Comment 2 Mounir Lamouri (:mounir) 2011-06-27 10:32:57 PDT
(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 3 Johnny Stenback (:jst, jst@mozilla.com) 2011-06-27 17:16:07 PDT
Comment on attachment 542181 [details] [diff] [review]
Patch v1

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

r=jst
Comment 4 Mounir Lamouri (:mounir) 2011-06-29 04:09:25 PDT
(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.
Comment 5 Mounir Lamouri (:mounir) 2011-06-29 08:44:10 PDT
http://hg.mozilla.org/mozilla-central/rev/bfe78e7bfa5d
Comment 6 Ioana (away) 2011-09-13 00:38:49 PDT
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 +

Note You need to log in before you can comment on or make changes to this bug.