All the SizeOf{In,Ex}cludingThis() functions take a MallocSizeOf function
which measures memory blocks. This patch introduces a new type, SizeOfState,
which includes a MallocSizeOf function *and* a table of already-measured
pointers, called SeenPtrs. This gives us a general mechanism to measure
graph-like data structures, by recording which nodes have already been
measured. (This approach is used in a number of existing reporters, but not in
a uniform fashion.)
The patch also converts the window memory reporting to use SizeOfState in a lot
of places, all the way through to the measurement of Elements. This is a
precursor for bug 1383977 which will measure Stylo elements, which involve
Arcs.
The patch also converts the existing mAlreadyMeasuredOrphanTrees table in the
OrphanReporter to use the new mechanism.
--HG--
extra : rebase_source : 2c23285f8b6c3b667560a9d14014efc4633aed51
Unfortunately, nsGenericHTMLElement::GetAssociatedEditor() cannot use concrete classes because it may return nsIEditor which is set via nsIDocShell.editor. The editor set to nsIDocShell may be implemented by JS since nsIEditor isn't marked as builtinclass.
MozReview-Commit-ID: 6GY9LOYp4hM
--HG--
extra : rebase_source : 3e0464067b30daf8254805458c5358d7ea644be8
Currently, attribute and child arrays (implemented in dom/base/nsAttrAndChildArray.h) start out empty. When cloning, the array ends up being resized multiple times in order to add the attributes and children that are being cloned from the original node. This would be quicker if the array was initialized to the correct size in the first place so that resizes are not necessary.
However, preallocating space for children is only necessary when performing a deep clone. Therefore, an additional parameter is being added to the Clone, CopyInnerTo, and CloneDocHelper methods to indicate whether preallocation of children should happen. Attributes are copied either way, so that part of the array is preallocated in both cases.
MozReview-Commit-ID: 3iVezeAKXnI
--HG--
extra : rebase_source : 9c3deec6d7aafd6411044d623d4863637b45fd58
We can remove unnecesasary SMILMappedAttribute and SMILAttrAnimationRuleProcessor since earlier patches in this serieas mean this code is no longer used.
MozReview-Commit-ID: 5Rl5WFW5zZ1
--HG--
extra : rebase_source : cf2efca8d01c7e6cd5bd3b3b44d994c6cbb760e9
We can remove unnecesasary SMILMappedAttribute and SMILAttrAnimationRuleProcessor since earlier patches in this serieas mean this code is no longer used.
MozReview-Commit-ID: 5Rl5WFW5zZ1
--HG--
extra : rebase_source : b051dce1d0f511e2e41be0b183a6f84654000309
This fits a bit better with the other stuff, and allows us to add our new NAC
bit with the other NAC related bits, which also happens to be a field that
Servo already has easy access to.
--HG--
extra : rebase_source : 52ef902eb3b23dc44cefec899b02c9180b76160c
This is only called during URI resolution, and the proptable bit should make
this relatively fast.
--HG--
extra : rebase_source : 866dd136e6630db3ff7423e30d59151a01c258a6
This fits a bit better with the other stuff, and allows us to add our new NAC
bit with the other NAC related bits, which also happens to be a field that
Servo already has easy access to.
--HG--
extra : rebase_source : 52ef902eb3b23dc44cefec899b02c9180b76160c
This is only called during URI resolution, and the proptable bit should make
this relatively fast.
--HG--
extra : rebase_source : 866dd136e6630db3ff7423e30d59151a01c258a6