Closed
Bug 1210267
Opened 10 years ago
Closed 10 years ago
simplify AudioNode/AudioParam custom final release
Categories
(Core :: Web Audio, defect, P2)
Core
Web Audio
Tracking
()
RESOLVED
FIXED
mozilla44
| Tracking | Status | |
|---|---|---|
| firefox44 | --- | fixed |
People
(Reporter: karlt, Assigned: karlt)
Details
Attachments
(2 files)
|
40 bytes,
text/x-review-board-request
|
baku
:
review+
|
Details |
|
MozReview Request: bug 1210267 remove custom AudioParam::Release and disconnect in destructor r?baku
40 bytes,
text/x-review-board-request
|
baku
:
review+
|
Details |
No description provided.
| Assignee | ||
Comment 1•10 years ago
|
||
bug 1210267 use DOMEventTargetHelper::LastRelease instead of custom Release r?baku
AudioNode already has NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_LAST_RELEASE,
which performs mRefCnt.incr/decr for LastRelease(), so the kungFuDeathGrip
virtual AddRef/Release in DisconnectFromGraph() is additional noise when
debugging/tracing ownership.
Unlink() already assumes that the caller holds a reference (and it does).
Attachment #8668253 -
Flags: review?(amarchesini)
| Assignee | ||
Comment 2•10 years ago
|
||
bug 1210267 remove custom AudioParam::Release and disconnect in destructor r?baku
AudioParam has no derived type (and DisconnectFromGraphAndDestroyStream calls
no virtual functions) so no need for special release.
Attachment #8668254 -
Flags: review?(amarchesini)
Updated•10 years ago
|
Attachment #8668254 -
Flags: review?(amarchesini)
Comment 3•10 years ago
|
||
Comment on attachment 8668254 [details]
MozReview Request: bug 1210267 remove custom AudioParam::Release and disconnect in destructor r?baku
https://reviewboard.mozilla.org/r/20939/#review18831
::: dom/media/webaudio/AudioParam.cpp:62
(Diff revision 1)
> - // Addref this temporarily so the refcount bumping below doesn't destroy us
> + MOZ_ASSERT(mRefCnt.get() > mInputNodes.Length(),
I don't understand why this assertion can work.
This method is called in the DTOR of this class: why mRefCnt is > 0 ?
Comment 4•10 years ago
|
||
Comment on attachment 8668253 [details]
MozReview Request: bug 1210267 use DOMEventTargetHelper::LastRelease instead of custom Release r?baku
https://reviewboard.mozilla.org/r/20937/#review18833
The first patch looks good. Thanks for this simplification.
Attachment #8668253 -
Flags: review?(amarchesini) → review+
| Assignee | ||
Comment 5•10 years ago
|
||
https://reviewboard.mozilla.org/r/20939/#review18831
> I don't understand why this assertion can work.
> This method is called in the DTOR of this class: why mRefCnt is > 0 ?
The ref-count is 1 in the destructor because stabilizeForDeletion() is called
before DeleteCycleCollectable().
https://hg.mozilla.org/mozilla-central/annotate/2c1fb007137dcb68b1862a79553b53f1a34c99c3/xpcom/base/nsCycleCollector.cpp#l2653
The comment on the assertion was actually a little wrong.
I've corrected that.
The input disconnections part of this method is only relevant when this is
called from Unlink, but I have longer term wish to make those upstream
connections weak for bug 897796, in which case disconnection will also be
required when deleted without Unlink().
| Assignee | ||
Updated•10 years ago
|
Attachment #8668254 -
Flags: review?(amarchesini)
| Assignee | ||
Comment 6•10 years ago
|
||
Comment 7•10 years ago
|
||
Comment on attachment 8668254 [details]
MozReview Request: bug 1210267 remove custom AudioParam::Release and disconnect in destructor r?baku
https://reviewboard.mozilla.org/r/20939/#review18963
Attachment #8668254 -
Flags: review?(amarchesini) → review+
Comment 10•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d941427498c7
https://hg.mozilla.org/mozilla-central/rev/9fa379806dd4
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
| Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(karlt) → in-testsuite-
You need to log in
before you can comment on or make changes to this bug.
Description
•