Bug 1489301 - Part 4: Remove unnecessary [Exposed=System] annotations, r=bzbarsky

We don't need to expose on both Window and System anymore, as Window now
implies System. I don't remove unnecessary [Exposed=Window] annotations, as
WebIDL upstream has removed PrimaryGlobal.

Differential Revision: https://phabricator.services.mozilla.com/D9399
This commit is contained in:
Nika Layzell 2018-10-20 20:02:53 -04:00
Родитель 7367cf400e
Коммит 2b21840f81
54 изменённых файлов: 69 добавлений и 71 удалений

Просмотреть файл

@ -5,7 +5,7 @@
interface nsIDocShell;
[Exposed=(Window, System), ChromeOnly]
[Exposed=Window, ChromeOnly]
interface BrowsingContext {
readonly attribute BrowsingContext? parent;

Просмотреть файл

@ -14,7 +14,7 @@
* C++ callers use a fast path, and never call the JSAPI or WebIDL methods of
* this object.
*/
[ChromeOnly, Exposed=(Window,System)]
[ChromeOnly, Exposed=Window]
interface MozQueryInterface {
[Throws]
legacycaller any (IID aIID);
@ -25,7 +25,7 @@ interface MozQueryInterface {
* This is exposed in all the system globals where we can expose stuff by
* default, so should only include methods that are **thread-safe**.
*/
[ChromeOnly, Exposed=(Window,System,Worker)]
[ChromeOnly, Exposed=(Window,Worker)]
namespace ChromeUtils {
/**
* Serialize a snapshot of the heap graph, as seen by |JS::ubi::Node| and
@ -148,7 +148,7 @@ namespace ChromeUtils {
* Additional ChromeUtils methods that are _not_ thread-safe, and hence not
* exposed in workers.
*/
[Exposed=(Window,System)]
[Exposed=Window]
partial namespace ChromeUtils {
/**
* A helper that converts OriginAttributesDictionary to a opaque suffix string.

Просмотреть файл

@ -38,7 +38,7 @@ typedef unsigned long long NodeSize;
* its retained size is therefore significant (assuming no external
* references into the tree).
*/
[ChromeOnly, Exposed=(Window,System,Worker)]
[ChromeOnly, Exposed=(Window,Worker)]
interface DominatorTree {
/**
* The `NodeId` for the root of the dominator tree. This is a "meta-root" in

Просмотреть файл

@ -7,7 +7,7 @@
/**
* A HeapSnapshot represents a snapshot of the heap graph
*/
[ChromeOnly, Exposed=(Window,System,Worker)]
[ChromeOnly, Exposed=(Window,Worker)]
interface HeapSnapshot {
/**
* A time stamp of when the heap snapshot was taken, if available. Units are

Просмотреть файл

@ -9,7 +9,7 @@
* occurrence of "?" in the glob matches any single literal character.
*/
[Constructor(DOMString glob, optional boolean allowQuestion = true),
ChromeOnly, Exposed=(Window,System)]
ChromeOnly, Exposed=Window]
interface MatchGlob {
/**
* Returns true if the string matches the glob.

Просмотреть файл

@ -30,7 +30,7 @@ interface URI;
* the URL path must exactly match the pattern path.
*/
[Constructor(DOMString pattern, optional MatchPatternOptions options),
ChromeOnly, Exposed=(Window,System)]
ChromeOnly, Exposed=Window]
interface MatchPattern {
/**
* Returns true if the given URI matches the pattern.
@ -74,7 +74,7 @@ interface MatchPattern {
* matches when any of its sub-patterns matches.
*/
[Constructor(sequence<(DOMString or MatchPattern)> patterns, optional MatchPatternOptions options),
ChromeOnly, Exposed=(Window,System)]
ChromeOnly, Exposed=Window]
interface MatchPatternSet {
/**
* Returns true if the given URI matches any sub-pattern.

Просмотреть файл

@ -12,12 +12,12 @@ enum PlacesEventType {
"bookmark-added",
};
[ChromeOnly, Exposed=(Window,System)]
[ChromeOnly, Exposed=Window]
interface PlacesEvent {
readonly attribute PlacesEventType type;
};
[ChromeOnly, Exposed=(Window,System)]
[ChromeOnly, Exposed=Window]
interface PlacesVisit : PlacesEvent {
/**
* URL of the visit.
@ -76,7 +76,7 @@ interface PlacesVisit : PlacesEvent {
/**
* Base class for properties that are common to all bookmark events.
*/
[ChromeOnly, Exposed=(Window,System)]
[ChromeOnly, Exposed=Window]
interface PlacesBookmark : PlacesEvent {
/**
* The id of the item.
@ -135,7 +135,7 @@ dictionary PlacesBookmarkAdditionInit {
required boolean isTagging;
};
[ChromeOnly, Exposed=(Window,System), Constructor(PlacesBookmarkAdditionInit initDict)]
[ChromeOnly, Exposed=Window, Constructor(PlacesBookmarkAdditionInit initDict)]
interface PlacesBookmarkAddition : PlacesBookmark {
/**
* The item's index in the folder.

Просмотреть файл

@ -6,13 +6,13 @@
callback PlacesEventCallback = void (sequence<PlacesEvent> events);
[ChromeOnly, Exposed=(Window,System),
[ChromeOnly, Exposed=Window,
Constructor(PlacesEventCallback callback)]
interface PlacesWeakCallbackWrapper {
};
// Global singleton which should handle all events for places.
[ChromeOnly, Exposed=(Window,System)]
[ChromeOnly, Exposed=Window]
namespace PlacesObservers {
[Throws]
void addListener(sequence<PlacesEventType> eventTypes,

Просмотреть файл

@ -8,7 +8,7 @@
* Represents a pre-compiled JS script, which can be repeatedly executed in
* different globals without being re-parsed.
*/
[ChromeOnly, Exposed=(Window,System)]
[ChromeOnly, Exposed=Window]
interface PrecompiledScript {
/**
* Executes the script in the context of, and with the security principal

Просмотреть файл

@ -4,7 +4,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[ChromeOnly, Exposed=(Window,System)]
[ChromeOnly, Exposed=Window]
namespace PrioEncoder {
[Throws, NewObject]
PrioEncodedData encode(ByteString batchID, PrioParams params);

Просмотреть файл

@ -50,7 +50,7 @@ callback interface UncaughtRejectionObserver {
void onConsumed(object p);
};
[ChromeOnly, Exposed=(Window,System)]
[ChromeOnly, Exposed=Window]
interface PromiseDebugging {
/**
* The various functions on this interface all expect to take promises but

Просмотреть файл

@ -8,7 +8,7 @@
* A holder for structured-clonable data which can itself be cloned with
* little overhead, and deserialized into an arbitrary global.
*/
[ChromeOnly, Exposed=(Window,System,Worker),
[ChromeOnly, Exposed=(Window,Worker),
/**
* Serializes the given value to an opaque structured clone blob, and
* returns the result.

Просмотреть файл

@ -7,7 +7,7 @@
* https://dom.spec.whatwg.org/#abortcontroller
*/
[Constructor(), Exposed=(Window,Worker,System)]
[Constructor(), Exposed=(Window,Worker)]
interface AbortController {
readonly attribute AbortSignal signal;

Просмотреть файл

@ -7,7 +7,7 @@
* https://dom.spec.whatwg.org/#abortsignal
*/
[Exposed=(Window,Worker,System)]
[Exposed=(Window,Worker)]
interface AbortSignal : EventTarget {
readonly attribute boolean aborted;

Просмотреть файл

@ -4,7 +4,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[NoInterfaceObject, Exposed=(Window,Worker,System)]
[NoInterfaceObject, Exposed=(Window,Worker)]
interface AbstractWorker {
attribute EventHandler onerror;
};

Просмотреть файл

@ -8,7 +8,7 @@
* https://console.spec.whatwg.org/#console-namespace
*/
[Exposed=(Window,Worker,WorkerDebugger,Worklet,System),
[Exposed=(Window,Worker,WorkerDebugger,Worklet),
ClassString="Console",
ProtoObjectHack]
namespace console {
@ -146,7 +146,7 @@ dictionary ConsoleCounterError {
};
[ChromeOnly,
Exposed=(Window,Worker,WorkerDebugger,Worklet,System)]
Exposed=(Window,Worker,WorkerDebugger,Worklet)]
// This is basically a copy of the console namespace.
interface ConsoleInstance {
// Logging

Просмотреть файл

@ -11,7 +11,7 @@
*/
[Constructor(DOMString name, optional DOMString message = ""),
Exposed=(Window,Worker,System)]
Exposed=(Window,Worker)]
interface DOMError {
[Constant, UseCounter]
readonly attribute DOMString name;

Просмотреть файл

@ -16,7 +16,7 @@
interface StackFrame;
[NoInterfaceObject,
Exposed=(Window,Worker,System)]
Exposed=(Window,Worker)]
interface ExceptionMembers
{
// The nsresult associated with this exception.
@ -66,7 +66,7 @@ Exception implements ExceptionMembers;
// XXXkhuey this is an 'exception', not an interface, but we don't have any
// parser or codegen mechanisms for dealing with exceptions.
[ExceptionClass,
Exposed=(Window, Worker,System),
Exposed=(Window, Worker),
Constructor(optional DOMString message = "", optional DOMString name)]
interface DOMException {
// The name of the error code (ie, a string repr of |result|).

Просмотреть файл

@ -5,7 +5,7 @@
enum DOMRequestReadyState { "pending", "done" };
[Exposed=(Window,Worker,System), NoInterfaceObject]
[Exposed=(Window,Worker), NoInterfaceObject]
interface DOMRequestShared {
readonly attribute DOMRequestReadyState readyState;
@ -16,7 +16,7 @@ interface DOMRequestShared {
attribute EventHandler onerror;
};
[Exposed=(Window,Worker,System)]
[Exposed=(Window,Worker)]
interface DOMRequest : EventTarget {
// The [TreatNonCallableAsNull] annotation is required since then() should do
// nothing instead of throwing errors when non-callable arguments are passed.

Просмотреть файл

@ -10,7 +10,7 @@
* liability, trademark and document use rules apply.
*/
[Exposed=(Window,Worker,System)]
[Exposed=(Window,Worker)]
interface DOMStringList {
readonly attribute unsigned long length;
getter DOMString? item(unsigned long index);

Просмотреть файл

@ -4,7 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
[Constructor(DOMString type, optional ErrorEventInit eventInitDict),
Exposed=(Window,Worker,System)]
Exposed=(Window,Worker)]
interface ErrorEvent : Event
{
readonly attribute DOMString message;

Просмотреть файл

@ -11,7 +11,7 @@
*/
[Constructor(DOMString type, optional EventInit eventInitDict),
Exposed=(Window,Worker,System), ProbablyShortLivingWrapper]
Exposed=(Window,Worker), ProbablyShortLivingWrapper]
interface Event {
[Pure]
readonly attribute DOMString type;

Просмотреть файл

@ -26,7 +26,7 @@ dictionary AddEventListenerOptions : EventListenerOptions {
};
[Constructor,
Exposed=(Window,Worker,WorkerDebugger,AudioWorklet,System)]
Exposed=(Window,Worker,WorkerDebugger,AudioWorklet)]
interface EventTarget {
/* Passing null for wantsUntrusted means "default behavior", which
differs in content and chrome. In content that default boolean
@ -65,6 +65,6 @@ partial interface EventTarget {
// chrome easier. This returns the window which can be used to create
// events to fire at this EventTarget, or null if there isn't one.
partial interface EventTarget {
[ChromeOnly, Exposed=(Window,System), BinaryName="ownerGlobalForBindings"]
[ChromeOnly, Exposed=Window, BinaryName="ownerGlobalForBindings"]
readonly attribute WindowProxy? ownerGlobal;
};

Просмотреть файл

@ -11,7 +11,7 @@
*/
[Constructor,
Exposed=(Window,Worker,System)]
Exposed=(Window,Worker)]
interface FileReader : EventTarget {
// async read methods
[Throws]

Просмотреть файл

@ -14,7 +14,7 @@ enum IDBCursorDirection {
"prevunique"
};
[Exposed=(Window,Worker,System)]
[Exposed=(Window,Worker)]
interface IDBCursor {
readonly attribute (IDBObjectStore or IDBIndex) source;
@ -42,7 +42,7 @@ interface IDBCursor {
IDBRequest delete ();
};
[Exposed=(Window,Worker,System)]
[Exposed=(Window,Worker)]
interface IDBCursorWithValue : IDBCursor {
[Throws]
readonly attribute any value;

Просмотреть файл

@ -10,7 +10,7 @@
* liability, trademark and document use rules apply.
*/
[Exposed=(Window,Worker,System)]
[Exposed=(Window,Worker)]
interface IDBDatabase : EventTarget {
readonly attribute DOMString name;
readonly attribute unsigned long long version;

Просмотреть файл

@ -23,7 +23,7 @@ dictionary IDBOpenDBOptions
* http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBFactory
* for more information.
*/
[Exposed=(Window,Worker,System)]
[Exposed=(Window,Worker)]
interface IDBFactory {
[Throws, NeedsCallerType]
IDBOpenDBRequest

Просмотреть файл

@ -8,7 +8,7 @@ dictionary IDBFileMetadataParameters
boolean lastModified = true;
};
[Exposed=(Window,System)]
[Exposed=(Window)]
interface IDBFileHandle : EventTarget
{
readonly attribute IDBMutableFile? mutableFile;

Просмотреть файл

@ -4,7 +4,7 @@
* 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/. */
[Exposed=(Window,System)]
[Exposed=Window]
interface IDBFileRequest : DOMRequest {
readonly attribute IDBFileHandle? fileHandle;
// this is deprecated due to renaming in the spec

Просмотреть файл

@ -18,7 +18,7 @@ dictionary IDBIndexParameters {
DOMString? locale = null;
};
[Exposed=(Window,Worker,System)]
[Exposed=(Window,Worker)]
interface IDBIndex {
[SetterThrows]
attribute DOMString name;

Просмотреть файл

@ -9,7 +9,7 @@
* liability, trademark and document use rules apply.
*/
[Exposed=(Window,Worker,System)]
[Exposed=(Window,Worker)]
interface IDBKeyRange {
[Throws]
readonly attribute any lower;
@ -33,7 +33,7 @@ interface IDBKeyRange {
static IDBKeyRange bound (any lower, any upper, optional boolean lowerOpen = false, optional boolean upperOpen = false);
};
[Exposed=(Window,Worker,System),
[Exposed=(Window,Worker),
Func="mozilla::dom::IndexedDatabaseManager::ExperimentalFeaturesEnabled"]
interface IDBLocaleAwareKeyRange : IDBKeyRange {
[NewObject, Throws]

Просмотреть файл

@ -3,7 +3,7 @@
* 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/. */
[Exposed=(Window,System)]
[Exposed=Window]
interface IDBMutableFile : EventTarget {
readonly attribute DOMString name;
readonly attribute DOMString type;

Просмотреть файл

@ -12,7 +12,7 @@ dictionary IDBObjectStoreParameters {
boolean autoIncrement = false;
};
[Exposed=(Window,Worker,System)]
[Exposed=(Window,Worker)]
interface IDBObjectStore {
[SetterThrows]
attribute DOMString name;

Просмотреть файл

@ -7,7 +7,7 @@
* https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBOpenDBRequest
*/
[Exposed=(Window,Worker,System)]
[Exposed=(Window,Worker)]
interface IDBOpenDBRequest : IDBRequest {
attribute EventHandler onblocked;

Просмотреть файл

@ -13,7 +13,7 @@ enum IDBRequestReadyState {
"done"
};
[Exposed=(Window,Worker,System)]
[Exposed=(Window,Worker)]
interface IDBRequest : EventTarget {
[Throws]
readonly attribute any result;

Просмотреть файл

@ -19,7 +19,7 @@ enum IDBTransactionMode {
"versionchange"
};
[Exposed=(Window,Worker,System)]
[Exposed=(Window,Worker)]
interface IDBTransaction : EventTarget {
[Throws]
readonly attribute IDBTransactionMode mode;

Просмотреть файл

@ -16,7 +16,7 @@ dictionary IDBVersionChangeEventInit : EventInit {
};
[Constructor(DOMString type, optional IDBVersionChangeEventInit eventInitDict),
Exposed=(Window,Worker,System)]
Exposed=(Window,Worker)]
interface IDBVersionChangeEvent : Event {
readonly attribute unsigned long long oldVersion;
readonly attribute unsigned long long? newVersion;

Просмотреть файл

@ -7,7 +7,7 @@
* https://w3c.github.io/requestidlecallback/
*/
[Exposed=(Window,System),
[Exposed=Window,
Func="nsGlobalWindowInner::IsRequestIdleCallbackEnabled"]
interface IdleDeadline {
DOMHighResTimeStamp timeRemaining();

Просмотреть файл

@ -10,10 +10,10 @@ interface IID;
[NoInterfaceObject,
// Need Exposed here, because this is a mixin onto things like Event
// that are exposed in workers.
Exposed=(Window,Worker,System)]
Exposed=(Window,Worker)]
interface LegacyQueryInterface {
// Legacy QueryInterface, only exposed to chrome code on the main thread.
[Exposed=(Window,System), ChromeOnly]
[Exposed=Window, ChromeOnly]
nsISupports QueryInterface(IID iid);
};

Просмотреть файл

@ -7,7 +7,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/#channel-messaging
*/
[Constructor, Exposed=(Window,Worker,System)]
[Constructor, Exposed=(Window,Worker)]
interface MessageChannel {
readonly attribute MessagePort port1;
readonly attribute MessagePort port2;

Просмотреть файл

@ -8,7 +8,7 @@
*/
[Constructor(DOMString type, optional MessageEventInit eventInitDict),
Exposed=(Window,Worker,System)]
Exposed=(Window,Worker)]
interface MessageEvent : Event {
/**
* Custom data associated with this event.

Просмотреть файл

@ -7,7 +7,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/#channel-messaging
*/
[Exposed=(Window,Worker,AudioWorklet,System)]
[Exposed=(Window,Worker,AudioWorklet)]
interface MessagePort : EventTarget {
[Throws]
void postMessage(any message, optional sequence<object> transferable = []);

Просмотреть файл

@ -14,7 +14,6 @@ callback AnyCallback = any (any value);
// Hack to allow us to have JS owning and properly tracing/CCing/etc a
// PromiseNativeHandler.
[NoInterfaceObject,
Exposed=(Window,Worker,System)]
[NoInterfaceObject, Exposed=(Window,Worker)]
interface PromiseNativeHandler {
};

Просмотреть файл

@ -57,7 +57,7 @@ enum StreamFilterStatus {
* An interface which allows an extension to intercept, and optionally modify,
* response data from an HTTP request.
*/
[Exposed=(Window,System),
[Exposed=Window,
Func="mozilla::extensions::StreamFilter::IsAllowedInContext"]
interface StreamFilter : EventTarget {
/**

Просмотреть файл

@ -13,7 +13,7 @@
[Constructor(DOMString type, optional StreamFilterDataEventInit eventInitDict),
Func="mozilla::extensions::StreamFilter::IsAllowedInContext",
Exposed=(Window,System)]
Exposed=Window]
interface StreamFilterDataEvent : Event {
/**
* Contains a chunk of data read from the input stream.

Просмотреть файл

@ -15,7 +15,7 @@ dictionary ServerSocketOptions {
[Constructor(unsigned short port, optional ServerSocketOptions options, optional unsigned short backlog = 0),
Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
Exposed=(Window,System)]
Exposed=Window]
interface TCPServerSocket : EventTarget {
/**
* The port of this server socket object.

Просмотреть файл

@ -5,7 +5,7 @@
[Constructor(DOMString type, optional TCPServerSocketEventInit eventInitDict),
Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
Exposed=(Window,System)]
Exposed=Window]
interface TCPServerSocketEvent : Event {
readonly attribute TCPSocket socket;
};

Просмотреть файл

@ -41,7 +41,7 @@ interface LegacyMozTCPSocket {
[Constructor(DOMString host, unsigned short port, optional SocketOptions options),
Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
Exposed=(Window,System)]
Exposed=Window]
interface TCPSocket : EventTarget {
/**
* Upgrade an insecure connection to use TLS. Throws if the ready state is not OPEN.

Просмотреть файл

@ -11,7 +11,7 @@
[Constructor(DOMString type, optional TCPSocketErrorEventInit eventInitDict),
Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
Exposed=(Window,System)]
Exposed=Window]
interface TCPSocketErrorEvent : Event {
readonly attribute DOMString name;
readonly attribute DOMString message;

Просмотреть файл

@ -11,7 +11,7 @@
[Constructor(DOMString type, optional TCPSocketEventInit eventInitDict),
Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
Exposed=(Window,System)]
Exposed=Window]
interface TCPSocketEvent : Event {
/**
* If the event is a "data" event, data will be the bytes read from the network;

Просмотреть файл

@ -11,7 +11,7 @@
*/
[Constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options),
Exposed=(Window,Worker,System)]
Exposed=(Window,Worker)]
interface TextDecoder {
[Constant]
readonly attribute DOMString encoding;

Просмотреть файл

@ -10,8 +10,7 @@
* http://creativecommons.org/publicdomain/zero/1.0/
*/
[Constructor,
Exposed=(Window,Worker,System)]
[Constructor, Exposed=(Window,Worker)]
interface TextEncoder {
[Constant]
readonly attribute DOMString encoding;

Просмотреть файл

@ -14,7 +14,7 @@
*/
[Constructor(optional (sequence<sequence<USVString>> or record<USVString, USVString> or USVString) init = ""),
Exposed=(Window,Worker,WorkerDebugger,System)]
Exposed=(Window,Worker,WorkerDebugger)]
interface URLSearchParams {
void append(USVString name, USVString value);
void delete(USVString name);

Просмотреть файл

@ -13,7 +13,7 @@
*/
[Constructor(USVString scriptURL, optional WorkerOptions options),
Exposed=(Window,DedicatedWorker,SharedWorker,System)]
Exposed=(Window,DedicatedWorker,SharedWorker)]
interface Worker : EventTarget {
void terminate();
@ -34,6 +34,6 @@ dictionary WorkerOptions {
[Constructor(USVString scriptURL),
Func="mozilla::dom::ChromeWorker::WorkerAvailable",
Exposed=(Window,DedicatedWorker,SharedWorker,System)]
Exposed=(Window,DedicatedWorker,SharedWorker)]
interface ChromeWorker : Worker {
};