Closed
Bug 859600
Opened 8 years ago
Closed 8 years ago
Make AudioContext an EventTarget
Categories
(Core :: Web Audio, defect)
Tracking
()
RESOLVED
FIXED
mozilla23
People
(Reporter: ehsan, Assigned: ehsan)
References
Details
Attachments
(1 file, 1 obsolete file)
5.00 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
Assignee | ||
Comment 1•8 years ago
|
||
This crashes when AddRefing an AudioContext: Assertion failure: e->mObject == owner (wrong entry), at ../../../dist/include/nsISupportsImpl.h:145 Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000 nsCycleCollectingAutoRefCnt::incr (this=0x124f61e58, owner=0x124f61e10) at nsISupportsImpl.h:145 145 MOZ_ASSERT(e->mObject == owner, "wrong entry"); (gdb) bt #0 nsCycleCollectingAutoRefCnt::incr (this=0x124f61e58, owner=0x124f61e10) at nsISupportsImpl.h:145 #1 0x0000000102639d54 in mozilla::dom::AudioContext::AddRef (this=0x124f61e10) at AudioContext.h:61 #2 0x0000000102639bd8 in nsRefPtr<mozilla::dom::AudioContext>::nsRefPtr (this=0x10d193de8, aRawPtr=0x124f61e10) at nsAutoPtr.h:904 #3 0x0000000102638f8d in nsRefPtr<mozilla::dom::AudioContext>::nsRefPtr (this=0x10d193de8, aRawPtr=0x124f61e10) at nsAutoPtr.h:905 #4 0x00000001026386a4 in mozilla::dom::AudioBuffer::AudioBuffer (this=0x10d193dc0, aContext=0x124f61e10, aLength=2048, aSampleRate=8000) at /Users/ehsanakhgari/moz/mozilla-central/content/media/webaudio/AudioBuffer.cpp:51 #5 0x00000001026385fd in mozilla::dom::AudioBuffer::AudioBuffer (this=0x10d193dc0, aContext=0x124f61e10, aLength=2048, aSampleRate=8000) at /Users/ehsanakhgari/moz/mozilla-central/content/media/webaudio/AudioBuffer.cpp:55 #6 0x000000010263f45f in mozilla::dom::AudioContext::CreateBuffer (this=0x124f61e10, aJSContext=0x123683f80, aNumberOfChannels=2, aLength=2048, aSampleRate=8000, aRv=@0x7fff5fbf4690) at /Users/ehsanakhgari/moz/mozilla-central/content/media/webaudio/AudioContext.cpp:100 #7 0x0000000103bca42d in mozilla::dom::AudioContextBinding::createBuffer (cx=0x123683f80, obj={<js::HandleBase<JSObject *>> = {<No data fields>}, ptr = 0x7fff5fbf4790}, self=0x124f61e10, argc=3, vp=0x10da321c0) at AudioContextBinding.cpp:226 Am I doing something wrong with the CC macros here?
Comment 2•8 years ago
|
||
Comment on attachment 741663 [details] [diff] [review] WIP Hmm. My interpretation is that it looks like nsDOMEventTargetHelper is nsISupports, so you are going to have to reCOMtaminate AudioContext. - Instead of NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING I think you want NS_DECL_ISUPPORTS_INHERITED. - Define a QI again with the right CC stuff. Probably other stuff.
Attachment #741663 -
Flags: feedback?(continuation)
Assignee | ||
Comment 3•8 years ago
|
||
I am a fool, and you are a hero! :-)
Assignee | ||
Comment 4•8 years ago
|
||
Attachment #741663 -
Attachment is obsolete: true
Attachment #741671 -
Flags: review?(paul)
Comment 5•8 years ago
|
||
Comment on attachment 741671 [details] [diff] [review] Patch (v1) Review of attachment 741671 [details] [diff] [review]: ----------------------------------------------------------------- I can't review that. While I think I understand what is going on, I have no idea if it is correct, sorry.
Attachment #741671 -
Flags: review?(paul)
Comment 6•8 years ago
|
||
Maybe Olli could review it?
Assignee | ||
Comment 7•8 years ago
|
||
Comment on attachment 741671 [details] [diff] [review] Patch (v1) Sure.
Attachment #741671 -
Flags: review?(bugs)
Comment 8•8 years ago
|
||
Comment on attachment 741671 [details] [diff] [review] Patch (v1) As far as I see, you can drop mWindow. nsDOMEventTargetHelper knows the owner and has GetOwner(). With that, r=me
Attachment #741671 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 9•8 years ago
|
||
Sweet! https://hg.mozilla.org/integration/mozilla-inbound/rev/120f3f229643
Comment 10•8 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/120f3f229643
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Assignee | ||
Comment 11•8 years ago
|
||
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.
Description
•