Skip to content

Commit 0562b4b

Browse files
committed
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
1 parent b54aa3a commit 0562b4b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+69
-71
lines changed

dom/chrome-webidl/BrowsingContext.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
interface nsIDocShell;
77

8-
[Exposed=(Window, System), ChromeOnly]
8+
[Exposed=Window, ChromeOnly]
99
interface BrowsingContext {
1010
readonly attribute BrowsingContext? parent;
1111

dom/chrome-webidl/ChromeUtils.webidl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* C++ callers use a fast path, and never call the JSAPI or WebIDL methods of
1515
* this object.
1616
*/
17-
[ChromeOnly, Exposed=(Window,System)]
17+
[ChromeOnly, Exposed=Window]
1818
interface MozQueryInterface {
1919
[Throws]
2020
legacycaller any (IID aIID);
@@ -25,7 +25,7 @@ interface MozQueryInterface {
2525
* This is exposed in all the system globals where we can expose stuff by
2626
* default, so should only include methods that are **thread-safe**.
2727
*/
28-
[ChromeOnly, Exposed=(Window,System,Worker)]
28+
[ChromeOnly, Exposed=(Window,Worker)]
2929
namespace ChromeUtils {
3030
/**
3131
* Serialize a snapshot of the heap graph, as seen by |JS::ubi::Node| and
@@ -148,7 +148,7 @@ namespace ChromeUtils {
148148
* Additional ChromeUtils methods that are _not_ thread-safe, and hence not
149149
* exposed in workers.
150150
*/
151-
[Exposed=(Window,System)]
151+
[Exposed=Window]
152152
partial namespace ChromeUtils {
153153
/**
154154
* A helper that converts OriginAttributesDictionary to a opaque suffix string.

dom/chrome-webidl/DominatorTree.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ typedef unsigned long long NodeSize;
3838
* its retained size is therefore significant (assuming no external
3939
* references into the tree).
4040
*/
41-
[ChromeOnly, Exposed=(Window,System,Worker)]
41+
[ChromeOnly, Exposed=(Window,Worker)]
4242
interface DominatorTree {
4343
/**
4444
* The `NodeId` for the root of the dominator tree. This is a "meta-root" in

dom/chrome-webidl/HeapSnapshot.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/**
88
* A HeapSnapshot represents a snapshot of the heap graph
99
*/
10-
[ChromeOnly, Exposed=(Window,System,Worker)]
10+
[ChromeOnly, Exposed=(Window,Worker)]
1111
interface HeapSnapshot {
1212
/**
1313
* A time stamp of when the heap snapshot was taken, if available. Units are

dom/chrome-webidl/MatchGlob.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* occurrence of "?" in the glob matches any single literal character.
1010
*/
1111
[Constructor(DOMString glob, optional boolean allowQuestion = true),
12-
ChromeOnly, Exposed=(Window,System)]
12+
ChromeOnly, Exposed=Window]
1313
interface MatchGlob {
1414
/**
1515
* Returns true if the string matches the glob.

dom/chrome-webidl/MatchPattern.webidl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ interface URI;
3030
* the URL path must exactly match the pattern path.
3131
*/
3232
[Constructor(DOMString pattern, optional MatchPatternOptions options),
33-
ChromeOnly, Exposed=(Window,System)]
33+
ChromeOnly, Exposed=Window]
3434
interface MatchPattern {
3535
/**
3636
* Returns true if the given URI matches the pattern.
@@ -74,7 +74,7 @@ interface MatchPattern {
7474
* matches when any of its sub-patterns matches.
7575
*/
7676
[Constructor(sequence<(DOMString or MatchPattern)> patterns, optional MatchPatternOptions options),
77-
ChromeOnly, Exposed=(Window,System)]
77+
ChromeOnly, Exposed=Window]
7878
interface MatchPatternSet {
7979
/**
8080
* Returns true if the given URI matches any sub-pattern.

dom/chrome-webidl/PlacesEvent.webidl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ enum PlacesEventType {
1212
"bookmark-added",
1313
};
1414

15-
[ChromeOnly, Exposed=(Window,System)]
15+
[ChromeOnly, Exposed=Window]
1616
interface PlacesEvent {
1717
readonly attribute PlacesEventType type;
1818
};
1919

20-
[ChromeOnly, Exposed=(Window,System)]
20+
[ChromeOnly, Exposed=Window]
2121
interface PlacesVisit : PlacesEvent {
2222
/**
2323
* URL of the visit.
@@ -76,7 +76,7 @@ interface PlacesVisit : PlacesEvent {
7676
/**
7777
* Base class for properties that are common to all bookmark events.
7878
*/
79-
[ChromeOnly, Exposed=(Window,System)]
79+
[ChromeOnly, Exposed=Window]
8080
interface PlacesBookmark : PlacesEvent {
8181
/**
8282
* The id of the item.
@@ -135,7 +135,7 @@ dictionary PlacesBookmarkAdditionInit {
135135
required boolean isTagging;
136136
};
137137

138-
[ChromeOnly, Exposed=(Window,System), Constructor(PlacesBookmarkAdditionInit initDict)]
138+
[ChromeOnly, Exposed=Window, Constructor(PlacesBookmarkAdditionInit initDict)]
139139
interface PlacesBookmarkAddition : PlacesBookmark {
140140
/**
141141
* The item's index in the folder.

dom/chrome-webidl/PlacesObservers.webidl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
callback PlacesEventCallback = void (sequence<PlacesEvent> events);
88

9-
[ChromeOnly, Exposed=(Window,System),
9+
[ChromeOnly, Exposed=Window,
1010
Constructor(PlacesEventCallback callback)]
1111
interface PlacesWeakCallbackWrapper {
1212
};
1313

1414
// Global singleton which should handle all events for places.
15-
[ChromeOnly, Exposed=(Window,System)]
15+
[ChromeOnly, Exposed=Window]
1616
namespace PlacesObservers {
1717
[Throws]
1818
void addListener(sequence<PlacesEventType> eventTypes,

dom/chrome-webidl/PrecompiledScript.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Represents a pre-compiled JS script, which can be repeatedly executed in
99
* different globals without being re-parsed.
1010
*/
11-
[ChromeOnly, Exposed=(Window,System)]
11+
[ChromeOnly, Exposed=Window]
1212
interface PrecompiledScript {
1313
/**
1414
* Executes the script in the context of, and with the security principal

dom/chrome-webidl/PrioEncoder.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* You can obtain one at http://mozilla.org/MPL/2.0/.
55
*/
66

7-
[ChromeOnly, Exposed=(Window,System)]
7+
[ChromeOnly, Exposed=Window]
88
namespace PrioEncoder {
99
[Throws, NewObject]
1010
PrioEncodedData encode(ByteString batchID, PrioParams params);

dom/chrome-webidl/PromiseDebugging.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ callback interface UncaughtRejectionObserver {
5050
void onConsumed(object p);
5151
};
5252

53-
[ChromeOnly, Exposed=(Window,System)]
53+
[ChromeOnly, Exposed=Window]
5454
interface PromiseDebugging {
5555
/**
5656
* The various functions on this interface all expect to take promises but

dom/chrome-webidl/StructuredCloneHolder.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* A holder for structured-clonable data which can itself be cloned with
99
* little overhead, and deserialized into an arbitrary global.
1010
*/
11-
[ChromeOnly, Exposed=(Window,System,Worker),
11+
[ChromeOnly, Exposed=(Window,Worker),
1212
/**
1313
* Serializes the given value to an opaque structured clone blob, and
1414
* returns the result.

dom/webidl/AbortController.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* https://dom.spec.whatwg.org/#abortcontroller
88
*/
99

10-
[Constructor(), Exposed=(Window,Worker,System)]
10+
[Constructor(), Exposed=(Window,Worker)]
1111
interface AbortController {
1212
readonly attribute AbortSignal signal;
1313

dom/webidl/AbortSignal.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* https://dom.spec.whatwg.org/#abortsignal
88
*/
99

10-
[Exposed=(Window,Worker,System)]
10+
[Exposed=(Window,Worker)]
1111
interface AbortSignal : EventTarget {
1212
readonly attribute boolean aborted;
1313

dom/webidl/AbstractWorker.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* You can obtain one at http://mozilla.org/MPL/2.0/.
55
*/
66

7-
[NoInterfaceObject, Exposed=(Window,Worker,System)]
7+
[NoInterfaceObject, Exposed=(Window,Worker)]
88
interface AbstractWorker {
99
attribute EventHandler onerror;
1010
};

dom/webidl/Console.webidl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* https://console.spec.whatwg.org/#console-namespace
99
*/
1010

11-
[Exposed=(Window,Worker,WorkerDebugger,Worklet,System),
11+
[Exposed=(Window,Worker,WorkerDebugger,Worklet),
1212
ClassString="Console",
1313
ProtoObjectHack]
1414
namespace console {
@@ -146,7 +146,7 @@ dictionary ConsoleCounterError {
146146
};
147147

148148
[ChromeOnly,
149-
Exposed=(Window,Worker,WorkerDebugger,Worklet,System)]
149+
Exposed=(Window,Worker,WorkerDebugger,Worklet)]
150150
// This is basically a copy of the console namespace.
151151
interface ConsoleInstance {
152152
// Logging

dom/webidl/DOMError.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
[Constructor(DOMString name, optional DOMString message = ""),
14-
Exposed=(Window,Worker,System)]
14+
Exposed=(Window,Worker)]
1515
interface DOMError {
1616
[Constant, UseCounter]
1717
readonly attribute DOMString name;

dom/webidl/DOMException.webidl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
interface StackFrame;
1717

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

dom/webidl/DOMRequest.webidl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
enum DOMRequestReadyState { "pending", "done" };
77

8-
[Exposed=(Window,Worker,System), NoInterfaceObject]
8+
[Exposed=(Window,Worker), NoInterfaceObject]
99
interface DOMRequestShared {
1010
readonly attribute DOMRequestReadyState readyState;
1111

@@ -16,7 +16,7 @@ interface DOMRequestShared {
1616
attribute EventHandler onerror;
1717
};
1818

19-
[Exposed=(Window,Worker,System)]
19+
[Exposed=(Window,Worker)]
2020
interface DOMRequest : EventTarget {
2121
// The [TreatNonCallableAsNull] annotation is required since then() should do
2222
// nothing instead of throwing errors when non-callable arguments are passed.

dom/webidl/DOMStringList.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* liability, trademark and document use rules apply.
1111
*/
1212

13-
[Exposed=(Window,Worker,System)]
13+
[Exposed=(Window,Worker)]
1414
interface DOMStringList {
1515
readonly attribute unsigned long length;
1616
getter DOMString? item(unsigned long index);

dom/webidl/ErrorEvent.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
55

66
[Constructor(DOMString type, optional ErrorEventInit eventInitDict),
7-
Exposed=(Window,Worker,System)]
7+
Exposed=(Window,Worker)]
88
interface ErrorEvent : Event
99
{
1010
readonly attribute DOMString message;

dom/webidl/Event.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
[Constructor(DOMString type, optional EventInit eventInitDict),
14-
Exposed=(Window,Worker,System), ProbablyShortLivingWrapper]
14+
Exposed=(Window,Worker), ProbablyShortLivingWrapper]
1515
interface Event {
1616
[Pure]
1717
readonly attribute DOMString type;

dom/webidl/EventTarget.webidl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dictionary AddEventListenerOptions : EventListenerOptions {
2626
};
2727

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

dom/webidl/FileReader.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
[Constructor,
14-
Exposed=(Window,Worker,System)]
14+
Exposed=(Window,Worker)]
1515
interface FileReader : EventTarget {
1616
// async read methods
1717
[Throws]

dom/webidl/IDBCursor.webidl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ enum IDBCursorDirection {
1414
"prevunique"
1515
};
1616

17-
[Exposed=(Window,Worker,System)]
17+
[Exposed=(Window,Worker)]
1818
interface IDBCursor {
1919
readonly attribute (IDBObjectStore or IDBIndex) source;
2020

@@ -42,7 +42,7 @@ interface IDBCursor {
4242
IDBRequest delete ();
4343
};
4444

45-
[Exposed=(Window,Worker,System)]
45+
[Exposed=(Window,Worker)]
4646
interface IDBCursorWithValue : IDBCursor {
4747
[Throws]
4848
readonly attribute any value;

dom/webidl/IDBDatabase.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* liability, trademark and document use rules apply.
1111
*/
1212

13-
[Exposed=(Window,Worker,System)]
13+
[Exposed=(Window,Worker)]
1414
interface IDBDatabase : EventTarget {
1515
readonly attribute DOMString name;
1616
readonly attribute unsigned long long version;

dom/webidl/IDBFactory.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dictionary IDBOpenDBOptions
2323
* http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBFactory
2424
* for more information.
2525
*/
26-
[Exposed=(Window,Worker,System)]
26+
[Exposed=(Window,Worker)]
2727
interface IDBFactory {
2828
[Throws, NeedsCallerType]
2929
IDBOpenDBRequest

dom/webidl/IDBFileHandle.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dictionary IDBFileMetadataParameters
88
boolean lastModified = true;
99
};
1010

11-
[Exposed=(Window,System)]
11+
[Exposed=(Window)]
1212
interface IDBFileHandle : EventTarget
1313
{
1414
readonly attribute IDBMutableFile? mutableFile;

dom/webidl/IDBFileRequest.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* License, v. 2.0. If a copy of the MPL was not distributed with this
55
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
66

7-
[Exposed=(Window,System)]
7+
[Exposed=Window]
88
interface IDBFileRequest : DOMRequest {
99
readonly attribute IDBFileHandle? fileHandle;
1010
// this is deprecated due to renaming in the spec

dom/webidl/IDBIndex.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dictionary IDBIndexParameters {
1818
DOMString? locale = null;
1919
};
2020

21-
[Exposed=(Window,Worker,System)]
21+
[Exposed=(Window,Worker)]
2222
interface IDBIndex {
2323
[SetterThrows]
2424
attribute DOMString name;

dom/webidl/IDBKeyRange.webidl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* liability, trademark and document use rules apply.
1010
*/
1111

12-
[Exposed=(Window,Worker,System)]
12+
[Exposed=(Window,Worker)]
1313
interface IDBKeyRange {
1414
[Throws]
1515
readonly attribute any lower;
@@ -33,7 +33,7 @@ interface IDBKeyRange {
3333
static IDBKeyRange bound (any lower, any upper, optional boolean lowerOpen = false, optional boolean upperOpen = false);
3434
};
3535

36-
[Exposed=(Window,Worker,System),
36+
[Exposed=(Window,Worker),
3737
Func="mozilla::dom::IndexedDatabaseManager::ExperimentalFeaturesEnabled"]
3838
interface IDBLocaleAwareKeyRange : IDBKeyRange {
3939
[NewObject, Throws]

dom/webidl/IDBMutableFile.webidl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* License, v. 2.0. If a copy of the MPL was not distributed with this
44
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
55

6-
[Exposed=(Window,System)]
6+
[Exposed=Window]
77
interface IDBMutableFile : EventTarget {
88
readonly attribute DOMString name;
99
readonly attribute DOMString type;

0 commit comments

Comments
 (0)