Closed Bug 1439507 Opened 6 years ago Closed 6 years ago

Add more bits of XBL bindings to memory report

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: xidorn, Assigned: xidorn)

References

Details

Attachments

(1 file)

I thought the stylesheet lists should have been tracked by somewhere else... but it turns out they are not. So they should come to binding size as well. It is a pretty significant one, almost double the size accumulated in the xul cache.

Prototype handler is another big thing which I overlooked in bug 1438497. DMD shows it has some non-trivial allocation inside.
[ Triage 2017/02/20: P3 ]
Priority: -- → P3
Comment on attachment 8952308 [details]
Bug 1439507 - Add more XBL binding stuff to memory report.

https://reviewboard.mozilla.org/r/221554/#review227714
Attachment #8952308 - Flags: review?(n.nethercote) → review+
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f991fdfb4ca4
Add more XBL binding stuff to memory report. r=njn
https://hg.mozilla.org/mozilla-central/rev/f991fdfb4ca4
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Comment on attachment 8952308 [details]
Bug 1439507 - Add more XBL binding stuff to memory report.

https://reviewboard.mozilla.org/r/221554/#review228094

::: dom/xbl/nsXBLPrototypeHandler.cpp:1149
(Diff revision 1)
> +       handler; handler = handler->mNextHandler) {
> +    n += aMallocSizeOf(handler);
> +    if (!(mType & NS_HANDLER_TYPE_XUL)) {
> +      n += aMallocSizeOf(handler->mHandlerText);
> +    }
> +    n += mHandler ? aMallocSizeOf(handler->mHandler) : 0;

I might be missing something, but this seems incorrect. Should it be:

```
n += handlier->mHandler ? aMallocSizeOf(handler->mHandler) : 0;
```

Also, at least for mozilla, moz_malloc_size_of ends up handling nullptr.
Ah, good catch. I'll fix it.
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1da08053c5d6
followup - Don't do null-check for nsXBLPrototypeHandler::mHandler.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: