MallocSizeOf is similar to the existing HeapSizeOf trait from the
heapsize crate. The only difference is that MallocSizeOf's
malloc_size_of_children() function takes an additional MallocSizeOfFn
argument, which is used to measure heap blocks. This extra argument
makes MallocSizeOf match how Gecko's memory measurements work, and is
required for Stylo to integrate with DMD.
The patch also introduces a second trait, MallocSizeOfWithGuard, which
is much the same as MallocSizeOf, but with a |guard| argument for the
global style lock.
Finally, the patch uses the new traits to measure a small amount of
Stylo's memory usage.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because code is only for Gecko integration.
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Source-Repo: https://github.com/servo/servo
Source-Revision: aca09436b71e6defe007e1d17a9d79214d094a7b
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 1d5dc4e7ab75e8e0332922396b5b55ed67c4572e
Otherwise we might fail the assertion |!mRequest| in the destructor of MozPromiseRequestHolder.
MozReview-Commit-ID: HsVD2re0R7e
--HG--
extra : rebase_source : c023899d92501dd3e275000c9ef0eb50df117236
SplitStyleAbovePoint can return null for split node, but we don't check it.
Also, this crash occurs on paste operation, so I think that there is 100% reproduce test. But I cannot find it.
MozReview-Commit-ID: 69OlPTc0I9h
--HG--
extra : rebase_source : 61eea8af83e60cc4f9c6f25d2952d57d0fea1d05
Since our platform support is Windows 7+, we can replace nsWin32Locale::GetXPLocale with LCIDToLocaleName.
MozReview-Commit-ID: Tboh4P6cLc
--HG--
extra : rebase_source : 7dd6614b0aca25e82d194d104409400e1cc6b4a8
Since our platform support is Windows 7+, we can replace nsWin32Locale::GetXPLocale with LCIDToLocaleName.
LCIDToLocaleName has LOCALE_SYSTEM_DEFAULT and LOCALE_USER_DEFAULT, so we should it simply.
MozReview-Commit-ID: 7JhhXayIK7S
--HG--
extra : rebase_source : d6579e94b8471c73d03c1ac08cdb4b8ab072bed5
We install the tooltool packages to ${HOME}/.mozbuild by default, and
${HOME} may have spaces on Windows. The arguments to the command-line
options need to be quoted appropriately.
DONTBUILD because NPOTB
MozReview-Commit-ID: yHXUFw2fx6
***
Bug 1367062 - Change std::map to std::unordered_map in APZCTreeManager
changed gfx/layers/FrameMetrics.h by adding a ScrollableLayerGuidHash class that will be used as the hashing function for std::unordered_maps which use ScrollableLayerGuid as keys.
changed gfx/layers/apz/src/APZCTreeManager.cpp by changing mApzcMap to a std::unordered_map.
changed gfx/layers/apz/src/APZCTreeManager.h by changing mZoomConstraints to a std::unordered_map.
MozReview-Commit-ID: JmoQzh1MvKK
--HG--
extra : rebase_source : cb7bd9419085f83873c9fd019c4a379fae0ee278