Closed Bug 849916 Opened 12 years ago Closed 12 years ago

Do the plumbing necessary to make it possible to hook up PannerNode to the MSG backend

Categories

(Core :: Web Audio, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(4 files)

No description provided.
Blocks: 849918
Sorry I did not get to write a patch for this tonight. I will do that tomorrow morning.
Attachment #724051 - Flags: review?(paul) → review+
Attachment #724054 - Flags: review?(paul) → review+
Attachment #724053 - Flags: review?(paul) → review+
Backed out for build bustage. https://hg.mozilla.org/integration/mozilla-inbound/rev/03275a0cc91f https://tbpl.mozilla.org/php/getParsedLog.php?id=20575311&tree=Mozilla-Inbound ../../../../content/media/webaudio/PannerNode.cpp:126:45: error: use of undeclared identifier 'pannerNode' Context()->Listener()->RegisterPannerNode(pannerNode); ^ 1 error generated. make[7]: *** [PannerNode.o] Error 1
So it turns out that if the cycle collector unlinks us, mContext will be null in ~PannerNode, which means that this cleanup code will crash. I could modify the CC macros to do some magic before nulling out mContext but that's aweful since mContext lives in AudioNode, so let's just use a weak pointer.
Attachment #724192 - Flags: review?(roc)
Comment on attachment 724192 [details] [diff] [review] Part 4: Don't rely on things still being around when we run PannerNode's dtor, use a weak pointer instead Review of attachment 724192 [details] [diff] [review]: ----------------------------------------------------------------- Why don't we make mPanners strong, and traverse it and unlink it in CC? Seems like that would be better.
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #9) > Why don't we make mPanners strong, and traverse it and unlink it in CC? > Seems like that would be better. Because that would make implementing the node ownership model of making sure nodes will go away after playback is finished if script is not holding references to them more complicated than necessary. I think we should try to avoid holding references to nodes outside of the audio graph.
Comment on attachment 724192 [details] [diff] [review] Part 4: Don't rely on things still being around when we run PannerNode's dtor, use a weak pointer instead https://hg.mozilla.org/integration/mozilla-inbound/rev/0cb671b3125b
Attachment #724192 - Flags: checkin+
Mass moving Web Audio bugs to the Web Audio component. Filter on duckityduck.
Component: Video/Audio → Web Audio
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: