зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1113827 part 2. Remove some now-unnecessary [Throws] annotations in our IDL. r=peterv
This commit is contained in:
Родитель
dc9744dbac
Коммит
586b8be017
|
@ -72,24 +72,24 @@ interface BluetoothAdapter : EventTarget {
|
|||
* Several onattributechanged events would be triggered during processing the
|
||||
* request, and the last one indicates adapter.state becomes enabled/disabled.
|
||||
*/
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<void> enable();
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<void> disable();
|
||||
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<void> setName(DOMString aName);
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<void> setDiscoverable(boolean aDiscoverable);
|
||||
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<BluetoothDiscoveryHandle> startDiscovery();
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<void> stopDiscovery();
|
||||
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<void> pair(DOMString deviceAddress);
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<void> unpair(DOMString deviceAddress);
|
||||
|
||||
sequence<BluetoothDevice> getPairedDevices();
|
||||
|
|
|
@ -26,7 +26,7 @@ interface BluetoothDevice : EventTarget
|
|||
* If the operation succeeds, the promise will be resolved with up-to-date
|
||||
* UUID list which is identical to attribute uuids.
|
||||
*/
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<sequence<DOMString>> fetchUuids();
|
||||
};
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ interface BluetoothPairingHandle
|
|||
*/
|
||||
readonly attribute DOMString passkey;
|
||||
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<void> setPinCode(DOMString aPinCode);
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<void> setPairingConfirmation(boolean aConfirm);
|
||||
};
|
||||
|
|
|
@ -19,7 +19,7 @@ interface DOMRequestShared {
|
|||
interface DOMRequest : EventTarget {
|
||||
// The [TreatNonCallableAsNull] annotation is required since then() should do
|
||||
// nothing instead of throwing errors when non-callable arguments are passed.
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<any> then([TreatNonCallableAsNull] optional AnyCallback? fulfillCallback = null,
|
||||
[TreatNonCallableAsNull] optional AnyCallback? rejectCallback = null);
|
||||
};
|
||||
|
|
|
@ -86,7 +86,7 @@ interface DeviceStorage : EventTarget {
|
|||
// Indicates if the storage area denoted by storageName is removable
|
||||
readonly attribute boolean isRemovable;
|
||||
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
// XXXbz what type does this really return?
|
||||
Promise<any> getRoot();
|
||||
};
|
||||
|
|
|
@ -35,7 +35,7 @@ interface Directory {
|
|||
* @return If succeeds, the promise is resolved with the new created
|
||||
* File object. Otherwise, rejected with a DOM error.
|
||||
*/
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<File> createFile(DOMString path, optional CreateFileOptions options);
|
||||
|
||||
/*
|
||||
|
@ -47,7 +47,7 @@ interface Directory {
|
|||
* @return If succeeds, the promise is resolved with the new created
|
||||
* Directory object. Otherwise, rejected with a DOM error.
|
||||
*/
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<Directory> createDirectory(DOMString path);
|
||||
|
||||
/*
|
||||
|
@ -58,7 +58,7 @@ interface Directory {
|
|||
* with a File or Directory object, depending on the entry's type. Otherwise,
|
||||
* rejected with a DOM error.
|
||||
*/
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<(File or Directory)> get(DOMString path);
|
||||
|
||||
/*
|
||||
|
@ -72,7 +72,7 @@ interface Directory {
|
|||
* exist, the promise is resolved with boolean false. If the target did exist
|
||||
* and was successfully deleted, the promise is resolved with boolean true.
|
||||
*/
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<boolean> remove((DOMString or File or Directory) path);
|
||||
|
||||
/*
|
||||
|
@ -86,7 +86,7 @@ interface Directory {
|
|||
* resolved with boolean false. If the target did exist and was successfully
|
||||
* deleted, the promise is resolved with boolean true.
|
||||
*/
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<boolean> removeDeep((DOMString or File or Directory) path);
|
||||
};
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ partial interface HTMLMediaElement {
|
|||
readonly attribute MediaKeys? mediaKeys;
|
||||
|
||||
// void, not any: https://www.w3.org/Bugs/Public/show_bug.cgi?id=26457
|
||||
[Pref="media.eme.enabled", Throws, NewObject]
|
||||
[Pref="media.eme.enabled", NewObject]
|
||||
Promise<void> setMediaKeys(MediaKeys? mediaKeys);
|
||||
|
||||
[Pref="media.eme.enabled"]
|
||||
|
|
|
@ -23,22 +23,22 @@ interface MediaKeySession : EventTarget {
|
|||
|
||||
readonly attribute Promise<void> closed;
|
||||
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<void> generateRequest(DOMString initDataType, (ArrayBufferView or ArrayBuffer) initData);
|
||||
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<boolean> load(DOMString sessionId);
|
||||
|
||||
// session operations
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<void> update((ArrayBufferView or ArrayBuffer) response);
|
||||
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<void> close();
|
||||
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<void> remove();
|
||||
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<sequence<ArrayBuffer>> getUsableKeyIds();
|
||||
};
|
||||
|
|
|
@ -29,6 +29,6 @@ dictionary MediaKeySystemOptions {
|
|||
[Pref="media.eme.enabled"]
|
||||
interface MediaKeySystemAccess {
|
||||
readonly attribute DOMString keySystem;
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<MediaKeys> createMediaKeys();
|
||||
};
|
||||
|
|
|
@ -20,6 +20,6 @@ interface MediaKeys {
|
|||
[NewObject, Throws]
|
||||
MediaKeySession createSession(optional SessionType sessionType = "temporary");
|
||||
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<void> setServerCertificate((ArrayBufferView or ArrayBuffer) serverCertificate);
|
||||
};
|
||||
|
|
|
@ -351,6 +351,6 @@ interface MozIcc : EventTarget
|
|||
* If succeeds, the promise is resolved with boolean indicating the
|
||||
* availability of the service. Otherwise, rejected with a DOMError.
|
||||
*/
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<boolean> getServiceState(IccService service);
|
||||
};
|
||||
|
|
|
@ -132,7 +132,7 @@ Navigator implements NavigatorBattery;
|
|||
[NoInterfaceObject,
|
||||
Exposed=(Window,Worker)]
|
||||
interface NavigatorDataStore {
|
||||
[Throws, NewObject, Func="Navigator::HasDataStoreSupport"]
|
||||
[NewObject, Func="Navigator::HasDataStoreSupport"]
|
||||
Promise<sequence<DataStore>> getDataStores(DOMString name,
|
||||
optional DOMString? owner = null);
|
||||
};
|
||||
|
@ -173,7 +173,7 @@ interface NavigatorMobileId {
|
|||
// permission is set to PROMPT_ACTION and [CheckPermissions] only checks
|
||||
// for ALLOW_ACTION.
|
||||
// XXXbz what is this promise resolved with?
|
||||
[Throws, NewObject, Func="Navigator::HasMobileIdSupport"]
|
||||
[NewObject, Func="Navigator::HasMobileIdSupport"]
|
||||
Promise<any> getMobileIdAssertion(optional MobileIdOptions options);
|
||||
};
|
||||
Navigator implements NavigatorMobileId;
|
||||
|
@ -405,7 +405,7 @@ partial interface Navigator {
|
|||
|
||||
#ifdef MOZ_EME
|
||||
partial interface Navigator {
|
||||
[Pref="media.eme.enabled", Throws, NewObject]
|
||||
[Pref="media.eme.enabled", NewObject]
|
||||
Promise<MediaKeySystemAccess>
|
||||
requestMediaKeySystemAccess(DOMString keySystem,
|
||||
optional sequence<MediaKeySystemOptions> supportedConfigurations);
|
||||
|
|
|
@ -27,23 +27,23 @@ interface _Promise {
|
|||
// the proto of a promise object or someone screws up and manages to create a
|
||||
// Promise object in this scope without having resolved the interface object
|
||||
// first.
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
static Promise<any> resolve(optional any value);
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
static Promise<void> reject(optional any value);
|
||||
|
||||
// The [TreatNonCallableAsNull] annotation is required since then() should do
|
||||
// nothing instead of throwing errors when non-callable arguments are passed.
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<any> then([TreatNonCallableAsNull] optional AnyCallback? fulfillCallback = null,
|
||||
[TreatNonCallableAsNull] optional AnyCallback? rejectCallback = null);
|
||||
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<any> catch([TreatNonCallableAsNull] optional AnyCallback? rejectCallback = null);
|
||||
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
static Promise<any> all(sequence<any> iterable);
|
||||
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
static Promise<any> race(sequence<any> iterable);
|
||||
};
|
||||
|
|
|
@ -33,13 +33,13 @@ interface TelephonyCall : EventTarget {
|
|||
|
||||
readonly attribute TelephonyCallGroup? group;
|
||||
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<void> answer();
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<void> hangUp();
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<void> hold();
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<void> resume();
|
||||
|
||||
attribute EventHandler onstatechange;
|
||||
|
|
|
@ -17,7 +17,7 @@ interface TelephonyCallGroup : EventTarget {
|
|||
[Throws]
|
||||
void remove(TelephonyCall call);
|
||||
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<void> hangUp();
|
||||
|
||||
[Throws]
|
||||
|
|
|
@ -15,6 +15,6 @@
|
|||
interface TextEncoder {
|
||||
[Constant]
|
||||
readonly attribute DOMString encoding;
|
||||
[Throws, NewObject]
|
||||
[NewObject]
|
||||
Uint8Array encode(optional USVString input = "");
|
||||
};
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
AvailableIn="CertifiedApps",
|
||||
Constructor(unsigned long serviceId)]
|
||||
interface USSDSession {
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<void> send(DOMString ussd);
|
||||
|
||||
[NewObject, Throws]
|
||||
[NewObject]
|
||||
Promise<void> cancel();
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче