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. GeckoThread.waitOnGecko is changed to wait on both the widget queue and the XPCOM queue. nsAppShell::SyncRunEvent is changed to avoid a possible deadlock condition involving locking sAppShellLock twice. 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. As a rule, disposeNative is dispatched to the queue with the least priority among the queues that other native members of the same class dispatch to (i.e. "gecko_priority" if all other native members dispatch to "gecko_priority", or "gecko" if any native members dispatch to "gecko"). Bug 1344892 - 3. Update auto-generated bindings; r=me
56 lines
1.4 KiB
Java
56 lines
1.4 KiB
Java
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
package org.mozilla.gecko.annotationProcessors;
|
|
|
|
/**
|
|
* Object holding annotation data. Used by GeneratableElementIterator.
|
|
*/
|
|
public class AnnotationInfo {
|
|
public enum ExceptionMode {
|
|
ABORT,
|
|
NSRESULT,
|
|
IGNORE;
|
|
|
|
String nativeValue() {
|
|
return "mozilla::jni::ExceptionMode::" + name();
|
|
}
|
|
}
|
|
|
|
public enum CallingThread {
|
|
GECKO,
|
|
UI,
|
|
ANY;
|
|
|
|
String nativeValue() {
|
|
return "mozilla::jni::CallingThread::" + name();
|
|
}
|
|
}
|
|
|
|
public enum DispatchTarget {
|
|
GECKO,
|
|
GECKO_PRIORITY,
|
|
PROXY,
|
|
CURRENT;
|
|
|
|
String nativeValue() {
|
|
return "mozilla::jni::DispatchTarget::" + name();
|
|
}
|
|
}
|
|
|
|
public final String wrapperName;
|
|
public final ExceptionMode exceptionMode;
|
|
public final CallingThread callingThread;
|
|
public final DispatchTarget dispatchTarget;
|
|
|
|
public AnnotationInfo(String wrapperName, ExceptionMode exceptionMode,
|
|
CallingThread callingThread, DispatchTarget dispatchTarget) {
|
|
|
|
this.wrapperName = wrapperName;
|
|
this.exceptionMode = exceptionMode;
|
|
this.callingThread = callingThread;
|
|
this.dispatchTarget = dispatchTarget;
|
|
}
|
|
}
|