2014-08-01 05:54:44 +04:00
|
|
|
// This is a list of all interfaces that are exposed to workers.
|
|
|
|
// Please only add things to this list with great care and proper review
|
|
|
|
// from the associated module peers.
|
|
|
|
|
|
|
|
// This file lists global interfaces we want exposed and verifies they
|
|
|
|
// are what we intend. Each entry in the arrays below can either be a
|
|
|
|
// simple string with the interface name, or an object with a 'name'
|
|
|
|
// property giving the interface name as a string, and additional
|
|
|
|
// properties which qualify the exposure of that interface. For example:
|
|
|
|
//
|
|
|
|
// [
|
2018-01-16 22:39:58 +03:00
|
|
|
// "AGlobalInterface", // secure context only
|
2015-05-01 06:08:44 +03:00
|
|
|
// { name: "ExperimentalThing", release: false },
|
|
|
|
// { name: "ReallyExperimentalThing", nightly: true },
|
|
|
|
// { name: "DesktopOnlyThing", desktop: true },
|
|
|
|
// { name: "FancyControl", xbl: true },
|
|
|
|
// { name: "DisabledEverywhere", disabled: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// ];
|
|
|
|
//
|
|
|
|
// See createInterfaceMap() below for a complete list of properties.
|
2018-03-01 20:32:33 +03:00
|
|
|
//
|
|
|
|
// The values of the properties need to be literal true/false
|
|
|
|
// (e.g. indicating whether something is enabled on a particular
|
|
|
|
// channel/OS). If we ever end up in a situation where a propert
|
|
|
|
// value needs to depend on channel or OS, we will need to make sure
|
|
|
|
// we have that information before setting up the property lists.
|
2014-08-01 05:54:44 +04:00
|
|
|
|
|
|
|
// IMPORTANT: Do not change this list without review from
|
|
|
|
// a JavaScript Engine peer!
|
|
|
|
var ecmaGlobals = [
|
2020-06-24 03:52:46 +03:00
|
|
|
{ name: "AggregateError", insecureContext: true },
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "Array", insecureContext: true },
|
|
|
|
{ name: "ArrayBuffer", insecureContext: true },
|
2020-05-19 07:30:19 +03:00
|
|
|
{ name: "Atomics", insecureContext: true },
|
2019-05-02 22:19:00 +03:00
|
|
|
{ name: "BigInt", insecureContext: true },
|
|
|
|
{ name: "BigInt64Array", insecureContext: true },
|
|
|
|
{ name: "BigUint64Array", insecureContext: true },
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "Boolean", insecureContext: true },
|
2018-11-30 19:31:47 +03:00
|
|
|
{ name: "ByteLengthQueuingStrategy", insecureContext: true },
|
|
|
|
{ name: "CountQueuingStrategy", insecureContext: true },
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "DataView", insecureContext: true },
|
|
|
|
{ name: "Date", insecureContext: true },
|
|
|
|
{ name: "Error", insecureContext: true },
|
|
|
|
{ name: "EvalError", insecureContext: true },
|
2020-06-09 14:20:45 +03:00
|
|
|
{ name: "FinalizationRegistry", insecureContext: true },
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "Float32Array", insecureContext: true },
|
|
|
|
{ name: "Float64Array", insecureContext: true },
|
|
|
|
{ name: "Function", insecureContext: true },
|
|
|
|
{ name: "Infinity", insecureContext: true },
|
|
|
|
{ name: "Int16Array", insecureContext: true },
|
|
|
|
{ name: "Int32Array", insecureContext: true },
|
|
|
|
{ name: "Int8Array", insecureContext: true },
|
|
|
|
{ name: "InternalError", insecureContext: true },
|
|
|
|
{ name: "Intl", insecureContext: true },
|
|
|
|
{ name: "JSON", insecureContext: true },
|
|
|
|
{ name: "Map", insecureContext: true },
|
2018-08-11 20:37:08 +03:00
|
|
|
{ name: "MediaCapabilities", insecureContext: true },
|
|
|
|
{ name: "MediaCapabilitiesInfo", insecureContext: true },
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "Math", insecureContext: true },
|
|
|
|
{ name: "NaN", insecureContext: true },
|
|
|
|
{ name: "Number", insecureContext: true },
|
|
|
|
{ name: "Object", insecureContext: true },
|
|
|
|
{ name: "Promise", insecureContext: true },
|
|
|
|
{ name: "Proxy", insecureContext: true },
|
|
|
|
{ name: "RangeError", insecureContext: true },
|
2018-11-30 19:31:47 +03:00
|
|
|
{ name: "ReadableStream", insecureContext: true },
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "ReferenceError", insecureContext: true },
|
|
|
|
{ name: "Reflect", insecureContext: true },
|
|
|
|
{ name: "RegExp", insecureContext: true },
|
|
|
|
{ name: "Set", insecureContext: true },
|
2019-11-25 19:28:06 +03:00
|
|
|
{
|
|
|
|
name: "SharedArrayBuffer",
|
|
|
|
insecureContext: true,
|
2020-05-04 10:31:50 +03:00
|
|
|
crossOringinIsolated: true,
|
2019-11-25 19:28:06 +03:00
|
|
|
},
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "String", insecureContext: true },
|
|
|
|
{ name: "Symbol", insecureContext: true },
|
|
|
|
{ name: "SyntaxError", insecureContext: true },
|
|
|
|
{ name: "TypeError", insecureContext: true },
|
|
|
|
{ name: "Uint16Array", insecureContext: true },
|
|
|
|
{ name: "Uint32Array", insecureContext: true },
|
|
|
|
{ name: "Uint8Array", insecureContext: true },
|
|
|
|
{ name: "Uint8ClampedArray", insecureContext: true },
|
|
|
|
{ name: "URIError", insecureContext: true },
|
|
|
|
{ name: "WeakMap", insecureContext: true },
|
2020-06-09 14:20:45 +03:00
|
|
|
{ name: "WeakRef", insecureContext: true },
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "WeakSet", insecureContext: true },
|
2018-03-01 22:24:20 +03:00
|
|
|
{
|
|
|
|
name: "WebAssembly",
|
|
|
|
insecureContext: true,
|
|
|
|
disabled: !getJSTestingFunctions().wasmIsSupportedByHardware(),
|
|
|
|
},
|
2014-08-01 05:54:44 +04:00
|
|
|
];
|
|
|
|
// IMPORTANT: Do not change the list above without review from
|
|
|
|
// a JavaScript Engine peer!
|
|
|
|
|
|
|
|
// IMPORTANT: Do not change the list below without review from a DOM peer!
|
|
|
|
var interfaceNamesInGlobalScope = [
|
2017-08-29 12:31:06 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "AbortController", insecureContext: true },
|
2017-08-29 12:31:06 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "AbortSignal", insecureContext: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "Blob", insecureContext: true },
|
2015-01-15 19:58:41 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "BroadcastChannel", insecureContext: true },
|
2015-03-02 16:23:00 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "Cache", insecureContext: true },
|
2015-03-02 16:23:00 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "CacheStorage", insecureContext: true },
|
2017-01-26 19:57:59 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "CloseEvent", insecureContext: true },
|
2016-04-05 19:17:18 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "Crypto", insecureContext: true },
|
2016-03-09 13:13:12 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "CustomEvent", insecureContext: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "DedicatedWorkerGlobalScope", insecureContext: true },
|
2016-04-12 15:50:38 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "Directory", insecureContext: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "DOMException", insecureContext: true },
|
2019-06-16 01:15:03 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
|
|
|
{ name: "DOMMatrix", insecureContext: true },
|
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
|
|
|
{ name: "DOMMatrixReadOnly", insecureContext: true },
|
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
|
|
|
{ name: "DOMPoint", insecureContext: true },
|
2015-12-18 09:52:17 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2019-06-04 15:55:57 +03:00
|
|
|
{ name: "DOMPointReadOnly", insecureContext: true },
|
2019-06-16 01:15:03 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
|
|
|
{ name: "DOMQuad", insecureContext: true },
|
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
|
|
|
{ name: "DOMRect", insecureContext: true },
|
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
|
|
|
{ name: "DOMRectReadOnly", insecureContext: true },
|
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
|
|
|
{ name: "DOMRequest", insecureContext: true },
|
2015-06-28 19:34:01 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "DOMStringList", insecureContext: true },
|
2014-12-17 09:26:15 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "ErrorEvent", insecureContext: true },
|
2017-01-26 19:57:59 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "Event", insecureContext: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "EventSource", insecureContext: true },
|
2016-11-17 14:07:53 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "EventTarget", insecureContext: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "File", insecureContext: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "FileList", insecureContext: true },
|
2017-01-26 19:57:59 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "FileReader", insecureContext: true },
|
2015-12-18 11:44:00 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "FileReaderSync", insecureContext: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "FormData", insecureContext: true },
|
2015-01-28 02:16:21 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "Headers", insecureContext: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "IDBCursor", insecureContext: true },
|
2014-12-17 09:26:15 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "IDBCursorWithValue", insecureContext: true },
|
2015-07-29 01:59:55 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "IDBDatabase", insecureContext: true },
|
2014-12-17 09:26:15 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "IDBFactory", insecureContext: true },
|
2014-12-17 09:26:15 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "IDBIndex", insecureContext: true },
|
2014-12-17 09:26:15 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "IDBKeyRange", insecureContext: true },
|
2014-12-17 09:26:15 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "IDBObjectStore", insecureContext: true },
|
2014-12-17 09:26:15 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "IDBOpenDBRequest", insecureContext: true },
|
2014-12-17 09:26:15 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "IDBRequest", insecureContext: true },
|
2014-12-17 09:26:15 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "IDBTransaction", insecureContext: true },
|
2014-12-17 09:26:15 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "IDBVersionChangeEvent", insecureContext: true },
|
2014-12-17 09:26:15 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "ImageBitmap", insecureContext: true },
|
2015-07-30 21:45:00 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "ImageBitmapRenderingContext", insecureContext: true },
|
2015-12-18 09:52:17 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "ImageData", insecureContext: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "MessageChannel", insecureContext: true },
|
2015-06-17 13:45:17 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "MessageEvent", insecureContext: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "MessagePort", insecureContext: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "NetworkInformation", insecureContext: true, android: true },
|
2015-06-26 04:53:02 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "Notification", insecureContext: true },
|
2015-10-12 06:21:03 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "OffscreenCanvas", insecureContext: true, disabled: true },
|
2016-05-10 07:35:35 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "Performance", insecureContext: true },
|
2014-08-30 03:50:06 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "PerformanceEntry", insecureContext: true },
|
2015-05-25 19:53:07 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "PerformanceMark", insecureContext: true },
|
2015-05-25 19:53:07 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "PerformanceMeasure", insecureContext: true },
|
2015-05-25 19:53:07 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "PerformanceObserver", insecureContext: true },
|
2016-05-10 07:35:35 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "PerformanceObserverEntryList", insecureContext: true },
|
2016-05-10 07:35:35 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "PerformanceResourceTiming", insecureContext: true },
|
2018-01-24 19:17:32 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
|
|
|
{ name: "PerformanceServerTiming", insecureContext: false },
|
2018-01-10 06:02:00 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
|
|
|
{ name: "ProgressEvent", insecureContext: true },
|
2017-01-26 19:57:59 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "PromiseRejectionEvent", insecureContext: true },
|
2019-06-04 15:55:57 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2019-09-05 16:59:32 +03:00
|
|
|
{ name: "PushManager", insecureContext: true },
|
2015-07-27 22:35:28 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2019-09-05 16:59:32 +03:00
|
|
|
{ name: "PushSubscription", insecureContext: true },
|
2016-04-14 20:26:53 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-12-11 01:19:26 +03:00
|
|
|
{
|
|
|
|
name: "PushSubscriptionOptions",
|
|
|
|
insecureContext: true,
|
|
|
|
},
|
2015-02-22 12:52:10 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2020-04-18 15:26:15 +03:00
|
|
|
{ name: "Report", nightly: true, insecureContext: true },
|
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
|
|
|
{ name: "ReportBody", nightly: true, insecureContext: true },
|
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
|
|
|
{ name: "ReportingObserver", nightly: true, insecureContext: true },
|
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "Request", insecureContext: true },
|
2015-02-22 12:52:10 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "Response", insecureContext: true },
|
2015-04-04 08:46:07 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "ServiceWorkerRegistration", insecureContext: true },
|
2016-06-14 15:57:36 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2019-04-30 22:20:49 +03:00
|
|
|
{ name: "StorageManager", fennec: false },
|
2016-04-05 19:17:18 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2020-02-11 12:25:09 +03:00
|
|
|
{ name: "SubtleCrypto" },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "TextDecoder", insecureContext: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "TextEncoder", insecureContext: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "XMLHttpRequest", insecureContext: true },
|
2015-02-13 02:39:25 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "XMLHttpRequestEventTarget", insecureContext: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "XMLHttpRequestUpload", insecureContext: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "URL", insecureContext: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "URLSearchParams", insecureContext: true },
|
2015-10-12 06:21:03 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "WebGLActiveInfo", insecureContext: true, disabled: true },
|
2015-10-12 06:21:03 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "WebGLBuffer", insecureContext: true, disabled: true },
|
2016-05-12 02:45:43 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "WebGLContextEvent", insecureContext: true, disabled: true },
|
2015-10-12 06:21:03 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "WebGLFramebuffer", insecureContext: true, disabled: true },
|
2015-10-12 06:21:03 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "WebGLProgram", insecureContext: true, disabled: true },
|
2015-10-12 06:21:03 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "WebGLRenderbuffer", insecureContext: true, disabled: true },
|
2015-10-12 06:21:03 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "WebGLRenderingContext", insecureContext: true, disabled: true },
|
2015-10-12 06:21:03 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "WebGLShader", insecureContext: true, disabled: true },
|
2015-10-12 06:21:03 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "WebGLShaderPrecisionFormat", insecureContext: true, disabled: true },
|
2015-10-12 06:21:03 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "WebGLTexture", insecureContext: true, disabled: true },
|
2015-10-12 06:21:03 +03:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "WebGLUniformLocation", insecureContext: true, disabled: true },
|
2014-10-10 20:58:05 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "WebSocket", insecureContext: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "Worker", insecureContext: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "WorkerGlobalScope", insecureContext: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "WorkerLocation", insecureContext: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
2018-01-16 22:39:58 +03:00
|
|
|
{ name: "WorkerNavigator", insecureContext: true },
|
2014-08-01 05:54:44 +04:00
|
|
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
|
|
|
];
|
|
|
|
// IMPORTANT: Do not change the list above without review from a DOM peer!
|
|
|
|
|
2019-05-15 00:01:05 +03:00
|
|
|
function createInterfaceMap({
|
|
|
|
isNightly,
|
2020-02-03 19:47:37 +03:00
|
|
|
isEarlyBetaOrEarlier,
|
2019-05-15 00:01:05 +03:00
|
|
|
isRelease,
|
|
|
|
isDesktop,
|
|
|
|
isAndroid,
|
|
|
|
isInsecureContext,
|
|
|
|
isFennec,
|
2020-05-04 10:31:50 +03:00
|
|
|
isCrossOringinIsolated,
|
2019-05-15 00:01:05 +03:00
|
|
|
}) {
|
2014-08-01 05:54:44 +04:00
|
|
|
var interfaceMap = {};
|
|
|
|
|
|
|
|
function addInterfaces(interfaces) {
|
|
|
|
for (var entry of interfaces) {
|
|
|
|
if (typeof entry === "string") {
|
2018-01-16 22:39:58 +03:00
|
|
|
interfaceMap[entry] = !isInsecureContext;
|
2014-08-01 05:54:44 +04:00
|
|
|
} else {
|
2015-05-01 18:42:37 +03:00
|
|
|
ok(!("pref" in entry), "Bogus pref annotation for " + entry.name);
|
|
|
|
if (
|
|
|
|
entry.nightly === !isNightly ||
|
2016-03-08 02:14:06 +03:00
|
|
|
(entry.nightlyAndroid === !(isAndroid && isNightly) && isAndroid) ||
|
2015-05-01 18:42:37 +03:00
|
|
|
entry.desktop === !isDesktop ||
|
2017-07-18 08:21:47 +03:00
|
|
|
(entry.android === !isAndroid && !entry.nightlyAndroid) ||
|
2018-12-11 01:19:26 +03:00
|
|
|
entry.fennecOrDesktop === (isAndroid && !isFennec) ||
|
2019-04-30 22:20:49 +03:00
|
|
|
entry.fennec === !isFennec ||
|
2015-05-01 18:42:37 +03:00
|
|
|
entry.release === !isRelease ||
|
2018-01-16 22:39:58 +03:00
|
|
|
// The insecureContext test is very purposefully converting
|
|
|
|
// entry.insecureContext to boolean, so undefined will convert to
|
|
|
|
// false. That way entries without an insecureContext annotation
|
|
|
|
// will get treated as "insecureContext: false", which means exposed
|
|
|
|
// only in secure contexts.
|
2019-09-02 14:23:26 +03:00
|
|
|
(isInsecureContext && !entry.insecureContext) ||
|
2020-02-03 19:47:37 +03:00
|
|
|
entry.earlyBetaOrEarlier === !isEarlyBetaOrEarlier ||
|
2020-05-04 10:31:50 +03:00
|
|
|
entry.crossOringinIsolated === !isCrossOringinIsolated ||
|
2015-05-01 18:42:37 +03:00
|
|
|
entry.disabled
|
|
|
|
) {
|
|
|
|
interfaceMap[entry.name] = false;
|
|
|
|
} else {
|
|
|
|
interfaceMap[entry.name] = true;
|
|
|
|
}
|
2014-08-01 05:54:44 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
addInterfaces(ecmaGlobals);
|
|
|
|
addInterfaces(interfaceNamesInGlobalScope);
|
|
|
|
|
|
|
|
return interfaceMap;
|
|
|
|
}
|
|
|
|
|
2018-12-11 01:19:26 +03:00
|
|
|
function runTest(data) {
|
|
|
|
var interfaceMap = createInterfaceMap(data);
|
2014-08-01 05:54:44 +04:00
|
|
|
for (var name of Object.getOwnPropertyNames(self)) {
|
|
|
|
// An interface name should start with an upper case character.
|
|
|
|
if (!/^[A-Z]/.test(name)) {
|
|
|
|
continue;
|
|
|
|
}
|
2018-03-01 22:24:20 +03:00
|
|
|
ok(
|
|
|
|
interfaceMap[name],
|
2014-08-01 05:54:44 +04:00
|
|
|
"If this is failing: DANGER, are you sure you want to expose the new interface " +
|
|
|
|
name +
|
|
|
|
" to all webpages as a property on the worker? Do not make a change to this file without a " +
|
|
|
|
" review from a DOM peer for that specific change!!! (or a JS peer for changes to ecmaGlobals)"
|
|
|
|
);
|
|
|
|
delete interfaceMap[name];
|
|
|
|
}
|
|
|
|
for (var name of Object.keys(interfaceMap)) {
|
2018-03-01 22:24:20 +03:00
|
|
|
ok(
|
|
|
|
name in self === interfaceMap[name],
|
|
|
|
name +
|
|
|
|
" should " +
|
|
|
|
(interfaceMap[name] ? "" : " NOT") +
|
|
|
|
" be defined on the global scope"
|
|
|
|
);
|
|
|
|
if (!interfaceMap[name]) {
|
2014-08-01 05:54:44 +04:00
|
|
|
delete interfaceMap[name];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
is(
|
|
|
|
Object.keys(interfaceMap).length,
|
|
|
|
0,
|
|
|
|
"The following interface(s) are not enumerated: " +
|
|
|
|
Object.keys(interfaceMap).join(", ")
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2018-12-11 01:19:26 +03:00
|
|
|
workerTestGetHelperData(function(data) {
|
|
|
|
runTest(data);
|
|
|
|
workerTestDone();
|
2014-08-01 05:54:44 +04:00
|
|
|
});
|