Closed Bug 598197 Opened 14 years ago Closed 14 years ago

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

Categories

(Core :: Audio/Video, defect)

All
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fennec 2.0b1+ ---

People

(Reporter: mwu, Assigned: mwu)

Details

(Keywords: crash)

Attachments

(1 file)

Attached patch FixSplinter Review
Otherwise we crash. This happens in the child process.
Attachment #476958 - Flags: review?(blassey.bugs)
tracking-fennec: --- → ?
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+
(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+
http://hg.mozilla.org/mozilla-central/rev/e90a6b6e4511

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

Attachment

General

Created:
Updated:
Size: