Don't setup audio when we can't get the JNIEnv

RESOLVED FIXED

Status

()

RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: mwu, Assigned: mwu)

Tracking

({crash})

Trunk
All
Android
crash
Points:
---

Firefox Tracking Flags

(fennec2.0b1+)

Details

Attachments

(1 attachment)

(Assignee)

Description

8 years ago
Created attachment 476958 [details] [diff] [review]
Fix

Otherwise we crash. This happens in the child process.
Attachment #476958 - Flags: review?(blassey.bugs)
(Assignee)

Updated

8 years ago
tracking-fennec: --- → ?
(Assignee)

Updated

8 years ago
Attachment #476958 - Flags: review?(kinetik)
Comment on attachment 476958 [details] [diff] [review]
Fix

I'm not clear when this can happen, but would it make more sense to return SA_ERROR_NO_INIT when GetJNIForThread fails?
Attachment #476958 - Flags: review?(kinetik) → review+
(Assignee)

Comment 2

8 years ago
(In reply to comment #1)
> Comment on attachment 476958 [details] [diff] [review]
> Fix
> 
> I'm not clear when this can happen, but would it make more sense to return
> SA_ERROR_NO_INIT when GetJNIForThread fails?
Sure. For the first or both cases?

This happens in the child/content process where there is no JVM running.
Actually, looking at the other implementations, SA_ERROR_NO_DEVICE might make slightly more sense.  Just for the first case, I think.  I'm undecided about the second case--if GetJNIForThread fails in destroy, it must've also failed in create, right?  Therefore there's nothing to destroy and no error.
Comment on attachment 476958 [details] [diff] [review]
Fix

SA_ERROR_NOT_SUPPORTED makes more sense to me than SA_ERROR_NO_INIT (which I take to mean that we're not initialized). We don't support playing audio from the unprivileged processes. Though we could potentially if we remoted this.
Attachment #476958 - Flags: review?(blassey.bugs) → review+
tracking-fennec: ? → 2.0b1+
(Assignee)

Comment 5

8 years ago
http://hg.mozilla.org/mozilla-central/rev/e90a6b6e4511

I used SA_ERROR_NO_DEVICE.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.