Closed
Bug 1291885
Opened 8 years ago
Closed 8 years ago
stylo: Fix various leaks
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla51
Tracking | Status | |
---|---|---|
firefox51 | --- | fixed |
People
(Reporter: bholley, Assigned: bholley)
References
Details
Attachments
(3 files)
(deleted),
patch
|
emilio
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
emilio
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
emilio
:
review+
|
Details | Diff | Splinter Review |
I noticed we have some leaks reported when running reftests. It turns out that there were a couple of issues, which I've got patches for here and on the Servo side.
Assignee | ||
Updated•8 years ago
|
Summary: Fix various leaks in stylo → stylo: Fix various leaks
Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8777544 -
Flags: review?(ealvarez)
Assignee | ||
Comment 2•8 years ago
|
||
Attachment #8777545 -
Flags: review?(ealvarez)
Assignee | ||
Comment 3•8 years ago
|
||
Attachment #8777546 -
Flags: review?(ealvarez)
Assignee | ||
Comment 4•8 years ago
|
||
This requires corresponding servo code in https://github.com/servo/servo/pull/12725
Updated•8 years ago
|
Attachment #8777544 -
Flags: review?(ealvarez) → review+
Comment 5•8 years ago
|
||
Comment on attachment 8777545 [details] [diff] [review]
Part 2 - Use dont_AddRef for already-addrefed ServoComputedValues. v1
Review of attachment 8777545 [details] [diff] [review]:
-----------------------------------------------------------------
::: layout/style/ServoStyleSet.cpp
@@ +350,5 @@
> MOZ_ASSERT(aType < CSSPseudoElementType::Count);
> nsIAtom* pseudoTag = nsCSSPseudoElements::GetPseudoAtom(aType);
>
> RefPtr<ServoComputedValues> computedValues =
> + dont_AddRef(Servo_GetComputedValuesForPseudoElement(
Hmm... Seeing this makes me sad, we should really tackle bug 1275913. Though in practice I don't think it'd be a big deal once we have leak checks?
Attachment #8777545 -
Flags: review?(ealvarez) → review+
Comment 6•8 years ago
|
||
Comment on attachment 8777546 [details] [diff] [review]
Part 3 - Use leak logging in a few more places. v1
Review of attachment 8777546 [details] [diff] [review]:
-----------------------------------------------------------------
::: layout/style/nsStyleContext.cpp
@@ +91,5 @@
> #ifdef DEBUG
> , mFrameRefCnt(0)
> , mComputingStruct(nsStyleStructID_None)
> #endif
> +{ MOZ_COUNT_CTOR(nsStyleContext); }
Maybe putting this in its own line?
{
MOZ_COUNT_CTOR(nsStyleContext);
}
Attachment #8777546 -
Flags: review?(ealvarez) → review+
Assignee | ||
Comment 7•8 years ago
|
||
(In reply to Emilio Cobos Álvarez [:emilio] from comment #5)
> Hmm... Seeing this makes me sad, we should really tackle bug 1275913. Though
> in practice I don't think it'd be a big deal once we have leak checks?
I think it's definitely still important and that we should fix it ASAP.
It's might be kind of up Manish's alley given the other FFI safety stuff he's been working on. Manish, any chance you might have the cycles to fix our already_AddRefed story at some point?
Flags: needinfo?(manishearth)
Assignee | ||
Comment 8•8 years ago
|
||
(In reply to Emilio Cobos Álvarez [:emilio] from comment #6)
> Comment on attachment 8777546 [details] [diff] [review]
> Part 3 - Use leak logging in a few more places. v1
>
> Review of attachment 8777546 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: layout/style/nsStyleContext.cpp
> @@ +91,5 @@
> > #ifdef DEBUG
> > , mFrameRefCnt(0)
> > , mComputingStruct(nsStyleStructID_None)
> > #endif
> > +{ MOZ_COUNT_CTOR(nsStyleContext); }
>
> Maybe putting this in its own line?
> {
> MOZ_COUNT_CTOR(nsStyleContext);
> }
Done.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=3a8f0dbcb786
Pushed by bholley@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/867f638fcc50
Rejigger init hook and add shutdown hook. r=emilio
https://hg.mozilla.org/integration/mozilla-inbound/rev/14c9cd79e79e
Use dont_AddRef for already-addrefed ServoComputedValues. r=emilio
https://hg.mozilla.org/integration/mozilla-inbound/rev/2dbf104fa4b4
Use leak logging in a few more places. r=emilio
Comment 10•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/867f638fcc50
https://hg.mozilla.org/mozilla-central/rev/14c9cd79e79e
https://hg.mozilla.org/mozilla-central/rev/2dbf104fa4b4
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Comment 11•8 years ago
|
||
> It's might be kind of up Manish's alley given the other FFI safety stuff
> he's been working on. Manish, any chance you might have the cycles to fix
> our already_AddRefed story at some point?
At some point -- probably, but not too soon. I can prioritize it if it needs to be though.
I'm also not yet clear on how we're using it in Servo at the moment, so I'd have to investigate that.
Leaving this needinfo open till I have a closer look.
Flags: needinfo?(manishearth)
You need to log in
before you can comment on or make changes to this bug.
Description
•