Bug 1344892 - Let native calls dispatch to XPCOM event queue; r=snorp
Bug 1344892 - 1. Add option to dispatch to priority queue; r=snorp For the regular "gecko" option, change to dispatching to the XPCOM event queue, and add a new "gecko_priority" option that dispatches calls to the widget event queue. Bug 1344892 - 2. Update dispatchTo = "gecko" options; r=snorp Update some existing dispatchTo = "gecko" options to "gecko_priority", which typically involve UI events or JNI management calls like disposeNative. Bug 1344892 - 3. Update auto-generated bindings; r=me
This commit is contained in:
@@ -254,20 +254,6 @@ public:
|
||||
MOZ_CRASH("Uncaught Java exception");
|
||||
}
|
||||
|
||||
static void SyncNotifyObservers(jni::String::Param aTopic,
|
||||
jni::String::Param aData)
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
||||
NotifyObservers(aTopic, aData);
|
||||
}
|
||||
|
||||
template<typename Functor>
|
||||
static void OnNativeCall(Functor&& aCall)
|
||||
{
|
||||
MOZ_ASSERT(aCall.IsTarget(&NotifyObservers));
|
||||
NS_DispatchToMainThread(NS_NewRunnableFunction(mozilla::Move(aCall)));
|
||||
}
|
||||
|
||||
static void NotifyObservers(jni::String::Param aTopic,
|
||||
jni::String::Param aData)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user