Open Bug 930422 Opened 11 years ago Updated 2 years ago

explicit initialization for AudioDestinationNode

Categories

(Core :: Web Audio, defect, P3)

defect

Tracking

()

People

(Reporter: jwwang, Unassigned)

References

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36

Steps to reproduce:

Follow-up bug for https://bugzilla.mozilla.org/show_bug.cgi?id=927322#c19.

It's usually unsafe to pass the object pointer to generic XPCOM code before it's fully constructed and a first strong reference to it has been created. We might want to use 2-stage-initialization to enforce safe use of the object.
Depends on: 927322
OS: Linux → All
Hardware: x86_64 → All
Oh, sorry, I meant that we should do this for AudioDestinationNode.
Component: General → Web Audio
Summary: explicit initialization for XPCOM objects → explicit initialization for AudioDestinationNode
Or add a factory method and make the constructor private.
(In reply to comment #2)
> Or add a factory method and make the constructor private.

If the factory method returns an already_AddRefed, that's fine.  In fact, that may be a better option!  :-)
(In reply to :Ehsan Akhgari (needinfo? me!) [Away 10/29-11/6] from comment #1)
> Oh, sorry, I meant that we should do this for AudioDestinationNode.

It's a relief we just need to modify one class in this bug.
Priority: -- → P3
Rank: 25
Priority: P3 → P2
Mass change P2->P3 to align with new Mozilla triage process.
Priority: P2 → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.