https://github.com/kinetiknz/cubeb/commit/6b2c610 changed the output unit
from kAudioUnitSubType_DefaultOutput to kAudioUnitSubType_HALOutput because
capture is never available on the DefaultOutputUnit. For the case where
we're doing output only to the default device, this regressed the automatic
device switching when the output device was changed in the Sound system
preferences. Reverting to the DefaultOutputUnit for this case restores the
previous behaviour. This addresses BMO #1278612.
Slightly less than half (93 / 210) of the NS_METHOD instances in the codebase
are because of the use of NS_CALLBACK in
nsI{Input,Output,UnicharInput},Stream.idl. The use of __stdcall on Win32 isn't
important for these callbacks because they are only used as arguments to
[noscript] methods.
This patch converts them to vanilla |nsresult| functions. It increases the size
of xul.dll by about ~600 bytes, which is about 0.001%.
--HG--
extra : rebase_source : c15d85298e0975fd030cd8f8f8e54501f453959b
Refactor the dispatching code to be more streamlined, and add two
optimizations to the way we dispatch a call:
* avoid a pair of unnecessary calls to add/delete the global class ref,
when dispatching a static call to the Gecko thread without a class ref
parameter.
* avoid an extra allocation when dispatching to a proxy function.
Remove uses of UsesNativeCallProxy and UsesGeckoThreadProxy, now that
they are not needed.
Remove cases where we had to invoke a call in a proxy, because the call
is now specified to be invoked directly in the WrapForJNI annotation,
without the need to go through the proxy.
For SmsManager and AlarmReceiver, we no longer need to manually dispatch
everything to the Gecko thread because that's now handled automatically.
Implement checking the calling thread of a JNI call based on the
calledFrom attribute set in WrapForJNI. Also implement automatic call
dispatching based on the dispatchTo attribute set in WrapForJNI. This
eliminates the use of UsesNativeCallProxy and UsesGeckoThreadProxy.
Update the code generator and related classes in annotation processor to
use the new WrapForJNI flags. Also add some more sanity checking to make
sure the flags are used correctly.
Replace old flags in WrapForJNI usages with new flags. The calledFrom
and dispatchTo flags are set based on whether the method is native or
non-native, and how the method is used.
Also fix testEventDipatcher to respect NativeJSObject's calledFrom =
"gekco" flag, by moving a test to Gecko thread.
WrapForJNI has some flags that are obsolete or confusing. Clean it up so
that there are fewer but more meaningful flags. Add a "calledFrom" flag
to indicate the intended calling thread and add a "dispatchTo" flag to
indicate where a method call may be automatically dispatched.
We need to register the Java UI thread in native code very early in the
startup process, before libxul registers its JNI entry points. So it
makes sense to register the Java UI thread in mozglue.