unmark gray objects held alive by nsXBLDocGlobalObject of skippable nsXBLDocumentInfo

RESOLVED FIXED in mozilla14

Status

()

Core
XBL
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: mccr8, Assigned: mccr8)

Tracking

(Blocks: 2 bugs)

Trunk
mozilla14
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [snappy])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
This is another pattern that shows up very frequently on my simple test case of Gmail + error console: there's an nsXBLDocumentInfo that appears to be live, but it contains an nsXBLDocGlobalObject that points to a JSContext that points to another JSContext, which points to an "nsXBLPrototypeScript compilation scope" object, that reaches about 45 JS objects.  I think we can extend the CanSkip function for nsXBLDocumentInfo to reach through that chain and unmarkGray what the JSContext holds onto.  I see about a dozen of these in my CC graph, so that could be another 540 nodes we could get rid of.
(Assignee)

Comment 1

6 years ago
I should probably also just make nsXBLDocumentInfo into a skippable class, as there are a dozen or so in the graph with no children.
(Assignee)

Updated

6 years ago
Blocks: 716598
(Assignee)

Comment 2

6 years ago
Created attachment 605841 [details] [diff] [review]
WIP
(Assignee)

Comment 3

6 years ago
I just piggybacked on nsXBLDocumentInfo::MarkInCCGeneration instead of turning nsXBLDocumentInfo into a skippable class. I think we should use a more general solution for childless nodes.
(Assignee)

Comment 4

6 years ago
Created attachment 606787 [details] [diff] [review]
mark global held by live XBLDocInfo
Assignee: nobody → continuation
Attachment #605841 - Attachment is obsolete: true
(Assignee)

Comment 5

6 years ago
Comment on attachment 606787 [details] [diff] [review]
mark global held by live XBLDocInfo

This had a good try run with some of my other patches.
https://tbpl.mozilla.org/?tree=Try&rev=869ed959b506

In the medium term, I want to move all of these two unmarking functions that MarkInCCGeneration (unmark protos and unmark script context) into the GC.  If you think it makes sense, Olli, I can just directly do that instead of having this intermediate bug.
Attachment #606787 - Flags: review?(bugs)

Comment 6

6 years ago
Comment on attachment 606787 [details] [diff] [review]
mark global held by live XBLDocInfo

We could do this now.
Attachment #606787 - Flags: review?(bugs) → review+
(Assignee)

Comment 7

6 years ago
Thanks for the reviews.

https://hg.mozilla.org/integration/mozilla-inbound/rev/7c0ac8201f4e
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/7c0ac8201f4e
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
(Assignee)

Updated

6 years ago
Blocks: 722715
Whiteboard: [snappy]
You need to log in before you can comment on or make changes to this bug.