1/*
2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY!
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#include "config.h"
22#include "JSWorkerGlobalScope.h"
23
24#include "EventNames.h"
25#include "JSAbortController.h"
26#include "JSAbortSignal.h"
27#include "JSBlob.h"
28#include "JSCanvasGradient.h"
29#include "JSCanvasPattern.h"
30#include "JSCloseEvent.h"
31#include "JSCrypto.h"
32#include "JSCustomEvent.h"
33#include "JSDOMAttribute.h"
34#include "JSDOMBinding.h"
35#include "JSDOMCache.h"
36#include "JSDOMCacheStorage.h"
37#include "JSDOMConstructorNotConstructable.h"
38#include "JSDOMConvertAny.h"
39#include "JSDOMConvertBoolean.h"
40#include "JSDOMConvertDictionary.h"
41#include "JSDOMConvertInterface.h"
42#include "JSDOMConvertNumbers.h"
43#include "JSDOMConvertScheduledAction.h"
44#include "JSDOMConvertStrings.h"
45#include "JSDOMConvertUnion.h"
46#include "JSDOMConvertVariadic.h"
47#include "JSDOMException.h"
48#include "JSDOMExceptionHandling.h"
49#include "JSDOMGlobalObject.h"
50#include "JSDOMMatrix.h"
51#include "JSDOMMatrixReadOnly.h"
52#include "JSDOMOperation.h"
53#include "JSDOMOperationReturningPromise.h"
54#include "JSDOMPoint.h"
55#include "JSDOMPointReadOnly.h"
56#include "JSDOMQuad.h"
57#include "JSDOMRect.h"
58#include "JSDOMRectReadOnly.h"
59#include "JSDOMURL.h"
60#include "JSDOMWrapperCache.h"
61#include "JSErrorEvent.h"
62#include "JSErrorHandler.h"
63#include "JSEvent.h"
64#include "JSEventListener.h"
65#include "JSEventSource.h"
66#include "JSEventTarget.h"
67#include "JSFetchHeaders.h"
68#include "JSFetchRequest.h"
69#include "JSFetchRequestInit.h"
70#include "JSFetchResponse.h"
71#include "JSFileReader.h"
72#include "JSFileReaderSync.h"
73#include "JSHTMLCanvasElement.h"
74#include "JSHTMLImageElement.h"
75#include "JSHTMLVideoElement.h"
76#include "JSImageBitmap.h"
77#include "JSImageBitmapOptions.h"
78#include "JSImageData.h"
79#include "JSMessageEvent.h"
80#include "JSMessagePort.h"
81#include "JSPath2D.h"
82#include "JSPerformance.h"
83#include "JSPerformanceEntry.h"
84#include "JSPerformanceMark.h"
85#include "JSPerformanceMeasure.h"
86#include "JSPerformanceObserver.h"
87#include "JSPerformanceObserverEntryList.h"
88#include "JSPerformanceResourceTiming.h"
89#include "JSPerformanceServerTiming.h"
90#include "JSProgressEvent.h"
91#include "JSPromiseRejectionEvent.h"
92#include "JSTextDecoder.h"
93#include "JSTextEncoder.h"
94#include "JSURLSearchParams.h"
95#include "JSWebSocket.h"
96#include "JSWorkerGlobalScope.h"
97#include "JSWorkerLocation.h"
98#include "JSWorkerNavigator.h"
99#include "JSXMLHttpRequestEventTarget.h"
100#include "RuntimeEnabledFeatures.h"
101#include "ScriptExecutionContext.h"
102#include "WebCoreJSClientData.h"
103#include "WorkerGlobalScope.h"
104#include "WorkerGlobalScopeCaches.h"
105#include "WorkerGlobalScopeFetch.h"
106#include <JavaScriptCore/HeapSnapshotBuilder.h>
107#include <JavaScriptCore/JSCInlines.h>
108#include <wtf/GetPtr.h>
109#include <wtf/PointerPreparations.h>
110#include <wtf/URL.h>
111#include <wtf/Variant.h>
112
113#if ENABLE(CHANNEL_MESSAGING)
114#include "JSMessageChannel.h"
115#endif
116
117#if ENABLE(CSS_TYPED_OM)
118#include "JSStylePropertyMapReadOnly.h"
119#include "JSTypedOMCSSImageValue.h"
120#include "JSTypedOMCSSNumericValue.h"
121#include "JSTypedOMCSSStyleValue.h"
122#include "JSTypedOMCSSUnitValue.h"
123#include "JSTypedOMCSSUnparsedValue.h"
124#endif
125
126#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
127#include "JSIDBCursor.h"
128#include "JSIDBCursorWithValue.h"
129#include "JSIDBDatabase.h"
130#include "JSIDBFactory.h"
131#include "JSIDBIndex.h"
132#include "JSIDBKeyRange.h"
133#include "JSIDBObjectStore.h"
134#include "JSIDBOpenDBRequest.h"
135#include "JSIDBRequest.h"
136#include "JSIDBTransaction.h"
137#include "JSIDBVersionChangeEvent.h"
138#include "WorkerGlobalScopeIndexedDatabase.h"
139#endif
140
141#if ENABLE(STREAMS_API)
142#include "JSByteLengthQueuingStrategy.h"
143#include "JSCountQueuingStrategy.h"
144#include "JSReadableByteStreamController.h"
145#include "JSReadableStream.h"
146#include "JSReadableStreamBYOBReader.h"
147#include "JSReadableStreamBYOBRequest.h"
148#include "JSReadableStreamDefaultController.h"
149#include "JSReadableStreamDefaultReader.h"
150#endif
151
152#if ENABLE(WEB_CRYPTO)
153#include "JSCryptoKey.h"
154#include "JSSubtleCrypto.h"
155#endif
156
157
158namespace WebCore {
159using namespace JSC;
160
161// Functions
162
163JSC::EncodedJSValue JSC_HOST_CALL jsWorkerGlobalScopePrototypeFunctionImportScripts(JSC::ExecState*);
164JSC::EncodedJSValue JSC_HOST_CALL jsWorkerGlobalScopePrototypeFunctionFetch(JSC::ExecState*);
165JSC::EncodedJSValue JSC_HOST_CALL jsWorkerGlobalScopePrototypeFunctionSetTimeout(JSC::ExecState*);
166JSC::EncodedJSValue JSC_HOST_CALL jsWorkerGlobalScopePrototypeFunctionClearTimeout(JSC::ExecState*);
167JSC::EncodedJSValue JSC_HOST_CALL jsWorkerGlobalScopePrototypeFunctionSetInterval(JSC::ExecState*);
168JSC::EncodedJSValue JSC_HOST_CALL jsWorkerGlobalScopePrototypeFunctionClearInterval(JSC::ExecState*);
169JSC::EncodedJSValue JSC_HOST_CALL jsWorkerGlobalScopePrototypeFunctionQueueMicrotask(JSC::ExecState*);
170JSC::EncodedJSValue JSC_HOST_CALL jsWorkerGlobalScopePrototypeFunctionAtob(JSC::ExecState*);
171JSC::EncodedJSValue JSC_HOST_CALL jsWorkerGlobalScopePrototypeFunctionBtoa(JSC::ExecState*);
172JSC::EncodedJSValue JSC_HOST_CALL jsWorkerGlobalScopePrototypeFunctionCreateImageBitmap(JSC::ExecState*);
173
174// Attributes
175
176JSC::EncodedJSValue jsWorkerGlobalScopeConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
177bool setJSWorkerGlobalScopeConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
178JSC::EncodedJSValue jsWorkerGlobalScopeSelf(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
179JSC::EncodedJSValue jsWorkerGlobalScopeLocation(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
180JSC::EncodedJSValue jsWorkerGlobalScopeOnerror(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
181bool setJSWorkerGlobalScopeOnerror(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
182JSC::EncodedJSValue jsWorkerGlobalScopeOnoffline(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
183bool setJSWorkerGlobalScopeOnoffline(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
184JSC::EncodedJSValue jsWorkerGlobalScopeOnonline(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
185bool setJSWorkerGlobalScopeOnonline(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
186JSC::EncodedJSValue jsWorkerGlobalScopeOnrejectionhandled(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
187bool setJSWorkerGlobalScopeOnrejectionhandled(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
188JSC::EncodedJSValue jsWorkerGlobalScopeOnunhandledrejection(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
189bool setJSWorkerGlobalScopeOnunhandledrejection(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
190JSC::EncodedJSValue jsWorkerGlobalScopeNavigator(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
191#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
192JSC::EncodedJSValue jsWorkerGlobalScopeIDBCursorConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
193bool setJSWorkerGlobalScopeIDBCursorConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
194#endif
195#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
196JSC::EncodedJSValue jsWorkerGlobalScopeIDBCursorWithValueConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
197bool setJSWorkerGlobalScopeIDBCursorWithValueConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
198#endif
199#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
200JSC::EncodedJSValue jsWorkerGlobalScopeIDBDatabaseConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
201bool setJSWorkerGlobalScopeIDBDatabaseConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
202#endif
203#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
204JSC::EncodedJSValue jsWorkerGlobalScopeIDBFactoryConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
205bool setJSWorkerGlobalScopeIDBFactoryConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
206#endif
207#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
208JSC::EncodedJSValue jsWorkerGlobalScopeIDBIndexConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
209bool setJSWorkerGlobalScopeIDBIndexConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
210#endif
211#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
212JSC::EncodedJSValue jsWorkerGlobalScopeIDBKeyRangeConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
213bool setJSWorkerGlobalScopeIDBKeyRangeConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
214#endif
215#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
216JSC::EncodedJSValue jsWorkerGlobalScopeIDBObjectStoreConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
217bool setJSWorkerGlobalScopeIDBObjectStoreConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
218#endif
219#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
220JSC::EncodedJSValue jsWorkerGlobalScopeIDBOpenDBRequestConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
221bool setJSWorkerGlobalScopeIDBOpenDBRequestConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
222#endif
223#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
224JSC::EncodedJSValue jsWorkerGlobalScopeIDBRequestConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
225bool setJSWorkerGlobalScopeIDBRequestConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
226#endif
227#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
228JSC::EncodedJSValue jsWorkerGlobalScopeIDBTransactionConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
229bool setJSWorkerGlobalScopeIDBTransactionConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
230#endif
231#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
232JSC::EncodedJSValue jsWorkerGlobalScopeIDBVersionChangeEventConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
233bool setJSWorkerGlobalScopeIDBVersionChangeEventConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
234#endif
235JSC::EncodedJSValue jsWorkerGlobalScopeCacheConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
236bool setJSWorkerGlobalScopeCacheConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
237JSC::EncodedJSValue jsWorkerGlobalScopeCacheStorageConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
238bool setJSWorkerGlobalScopeCacheStorageConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
239JSC::EncodedJSValue jsWorkerGlobalScopeHeadersConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
240bool setJSWorkerGlobalScopeHeadersConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
241JSC::EncodedJSValue jsWorkerGlobalScopeRequestConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
242bool setJSWorkerGlobalScopeRequestConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
243JSC::EncodedJSValue jsWorkerGlobalScopeResponseConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
244bool setJSWorkerGlobalScopeResponseConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
245#if ENABLE(STREAMS_API)
246JSC::EncodedJSValue jsWorkerGlobalScopeByteLengthQueuingStrategyConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
247bool setJSWorkerGlobalScopeByteLengthQueuingStrategyConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
248#endif
249#if ENABLE(STREAMS_API)
250JSC::EncodedJSValue jsWorkerGlobalScopeCountQueuingStrategyConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
251bool setJSWorkerGlobalScopeCountQueuingStrategyConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
252#endif
253#if ENABLE(STREAMS_API)
254JSC::EncodedJSValue jsWorkerGlobalScopeReadableByteStreamControllerConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
255bool setJSWorkerGlobalScopeReadableByteStreamControllerConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
256#endif
257#if ENABLE(STREAMS_API)
258JSC::EncodedJSValue jsWorkerGlobalScopeReadableStreamConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
259bool setJSWorkerGlobalScopeReadableStreamConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
260#endif
261#if ENABLE(STREAMS_API)
262JSC::EncodedJSValue jsWorkerGlobalScopeReadableStreamBYOBReaderConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
263bool setJSWorkerGlobalScopeReadableStreamBYOBReaderConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
264#endif
265#if ENABLE(STREAMS_API)
266JSC::EncodedJSValue jsWorkerGlobalScopeReadableStreamBYOBRequestConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
267bool setJSWorkerGlobalScopeReadableStreamBYOBRequestConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
268#endif
269#if ENABLE(STREAMS_API)
270JSC::EncodedJSValue jsWorkerGlobalScopeReadableStreamDefaultControllerConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
271bool setJSWorkerGlobalScopeReadableStreamDefaultControllerConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
272#endif
273#if ENABLE(STREAMS_API)
274JSC::EncodedJSValue jsWorkerGlobalScopeReadableStreamDefaultReaderConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
275bool setJSWorkerGlobalScopeReadableStreamDefaultReaderConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
276#endif
277JSC::EncodedJSValue jsWorkerGlobalScopeCloseEventConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
278bool setJSWorkerGlobalScopeCloseEventConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
279JSC::EncodedJSValue jsWorkerGlobalScopeWebSocketConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
280bool setJSWorkerGlobalScopeWebSocketConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
281#if ENABLE(WEB_CRYPTO)
282JSC::EncodedJSValue jsWorkerGlobalScopeCryptoKeyConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
283bool setJSWorkerGlobalScopeCryptoKeyConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
284#endif
285#if ENABLE(WEB_CRYPTO)
286JSC::EncodedJSValue jsWorkerGlobalScopeSubtleCryptoConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
287bool setJSWorkerGlobalScopeSubtleCryptoConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
288#endif
289JSC::EncodedJSValue jsWorkerGlobalScopeDOMMatrixConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
290bool setJSWorkerGlobalScopeDOMMatrixConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
291JSC::EncodedJSValue jsWorkerGlobalScopeDOMMatrixReadOnlyConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
292bool setJSWorkerGlobalScopeDOMMatrixReadOnlyConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
293#if ENABLE(CSS_TYPED_OM)
294JSC::EncodedJSValue jsWorkerGlobalScopeStylePropertyMapReadOnlyConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
295bool setJSWorkerGlobalScopeStylePropertyMapReadOnlyConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
296#endif
297#if ENABLE(CSS_TYPED_OM)
298JSC::EncodedJSValue jsWorkerGlobalScopeCSSImageValueConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
299bool setJSWorkerGlobalScopeCSSImageValueConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
300#endif
301#if ENABLE(CSS_TYPED_OM)
302JSC::EncodedJSValue jsWorkerGlobalScopeCSSNumericValueConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
303bool setJSWorkerGlobalScopeCSSNumericValueConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
304#endif
305#if ENABLE(CSS_TYPED_OM)
306JSC::EncodedJSValue jsWorkerGlobalScopeCSSStyleValueConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
307bool setJSWorkerGlobalScopeCSSStyleValueConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
308#endif
309#if ENABLE(CSS_TYPED_OM)
310JSC::EncodedJSValue jsWorkerGlobalScopeCSSUnitValueConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
311bool setJSWorkerGlobalScopeCSSUnitValueConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
312#endif
313#if ENABLE(CSS_TYPED_OM)
314JSC::EncodedJSValue jsWorkerGlobalScopeCSSUnparsedValueConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
315bool setJSWorkerGlobalScopeCSSUnparsedValueConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
316#endif
317JSC::EncodedJSValue jsWorkerGlobalScopeAbortControllerConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
318bool setJSWorkerGlobalScopeAbortControllerConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
319JSC::EncodedJSValue jsWorkerGlobalScopeAbortSignalConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
320bool setJSWorkerGlobalScopeAbortSignalConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
321JSC::EncodedJSValue jsWorkerGlobalScopeCustomEventConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
322bool setJSWorkerGlobalScopeCustomEventConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
323JSC::EncodedJSValue jsWorkerGlobalScopeDOMExceptionConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
324bool setJSWorkerGlobalScopeDOMExceptionConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
325JSC::EncodedJSValue jsWorkerGlobalScopeDOMPointConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
326bool setJSWorkerGlobalScopeDOMPointConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
327JSC::EncodedJSValue jsWorkerGlobalScopeDOMPointReadOnlyConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
328bool setJSWorkerGlobalScopeDOMPointReadOnlyConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
329JSC::EncodedJSValue jsWorkerGlobalScopeDOMQuadConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
330bool setJSWorkerGlobalScopeDOMQuadConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
331JSC::EncodedJSValue jsWorkerGlobalScopeDOMRectConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
332bool setJSWorkerGlobalScopeDOMRectConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
333JSC::EncodedJSValue jsWorkerGlobalScopeDOMRectReadOnlyConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
334bool setJSWorkerGlobalScopeDOMRectReadOnlyConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
335JSC::EncodedJSValue jsWorkerGlobalScopeErrorEventConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
336bool setJSWorkerGlobalScopeErrorEventConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
337JSC::EncodedJSValue jsWorkerGlobalScopeEventConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
338bool setJSWorkerGlobalScopeEventConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
339JSC::EncodedJSValue jsWorkerGlobalScopeEventTargetConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
340bool setJSWorkerGlobalScopeEventTargetConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
341#if ENABLE(CHANNEL_MESSAGING)
342JSC::EncodedJSValue jsWorkerGlobalScopeMessageChannelConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
343bool setJSWorkerGlobalScopeMessageChannelConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
344#endif
345JSC::EncodedJSValue jsWorkerGlobalScopeMessageEventConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
346bool setJSWorkerGlobalScopeMessageEventConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
347JSC::EncodedJSValue jsWorkerGlobalScopeMessagePortConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
348bool setJSWorkerGlobalScopeMessagePortConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
349JSC::EncodedJSValue jsWorkerGlobalScopeProgressEventConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
350bool setJSWorkerGlobalScopeProgressEventConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
351JSC::EncodedJSValue jsWorkerGlobalScopePromiseRejectionEventConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
352bool setJSWorkerGlobalScopePromiseRejectionEventConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
353JSC::EncodedJSValue jsWorkerGlobalScopeTextDecoderConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
354bool setJSWorkerGlobalScopeTextDecoderConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
355JSC::EncodedJSValue jsWorkerGlobalScopeTextEncoderConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
356bool setJSWorkerGlobalScopeTextEncoderConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
357JSC::EncodedJSValue jsWorkerGlobalScopeBlobConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
358bool setJSWorkerGlobalScopeBlobConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
359JSC::EncodedJSValue jsWorkerGlobalScopeFileReaderConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
360bool setJSWorkerGlobalScopeFileReaderConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
361JSC::EncodedJSValue jsWorkerGlobalScopeFileReaderSyncConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
362bool setJSWorkerGlobalScopeFileReaderSyncConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
363JSC::EncodedJSValue jsWorkerGlobalScopeURLConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
364bool setJSWorkerGlobalScopeURLConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
365JSC::EncodedJSValue jsWorkerGlobalScopeImageBitmapConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
366bool setJSWorkerGlobalScopeImageBitmapConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
367JSC::EncodedJSValue jsWorkerGlobalScopeImageDataConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
368bool setJSWorkerGlobalScopeImageDataConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
369JSC::EncodedJSValue jsWorkerGlobalScopeURLSearchParamsConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
370bool setJSWorkerGlobalScopeURLSearchParamsConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
371JSC::EncodedJSValue jsWorkerGlobalScopeCanvasGradientConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
372bool setJSWorkerGlobalScopeCanvasGradientConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
373JSC::EncodedJSValue jsWorkerGlobalScopeCanvasPatternConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
374bool setJSWorkerGlobalScopeCanvasPatternConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
375JSC::EncodedJSValue jsWorkerGlobalScopePath2DConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
376bool setJSWorkerGlobalScopePath2DConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
377JSC::EncodedJSValue jsWorkerGlobalScopeCryptoConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
378bool setJSWorkerGlobalScopeCryptoConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
379JSC::EncodedJSValue jsWorkerGlobalScopeEventSourceConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
380bool setJSWorkerGlobalScopeEventSourceConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
381JSC::EncodedJSValue jsWorkerGlobalScopePerformanceConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
382bool setJSWorkerGlobalScopePerformanceConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
383JSC::EncodedJSValue jsWorkerGlobalScopePerformanceEntryConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
384bool setJSWorkerGlobalScopePerformanceEntryConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
385JSC::EncodedJSValue jsWorkerGlobalScopePerformanceMarkConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
386bool setJSWorkerGlobalScopePerformanceMarkConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
387JSC::EncodedJSValue jsWorkerGlobalScopePerformanceMeasureConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
388bool setJSWorkerGlobalScopePerformanceMeasureConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
389JSC::EncodedJSValue jsWorkerGlobalScopePerformanceObserverConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
390bool setJSWorkerGlobalScopePerformanceObserverConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
391JSC::EncodedJSValue jsWorkerGlobalScopePerformanceObserverEntryListConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
392bool setJSWorkerGlobalScopePerformanceObserverEntryListConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
393JSC::EncodedJSValue jsWorkerGlobalScopePerformanceResourceTimingConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
394bool setJSWorkerGlobalScopePerformanceResourceTimingConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
395JSC::EncodedJSValue jsWorkerGlobalScopePerformanceServerTimingConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
396bool setJSWorkerGlobalScopePerformanceServerTimingConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
397JSC::EncodedJSValue jsWorkerGlobalScopeWorkerNavigatorConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
398bool setJSWorkerGlobalScopeWorkerNavigatorConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
399JSC::EncodedJSValue jsWorkerGlobalScopeWorkerGlobalScopeConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
400bool setJSWorkerGlobalScopeWorkerGlobalScopeConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
401JSC::EncodedJSValue jsWorkerGlobalScopeWorkerLocationConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
402bool setJSWorkerGlobalScopeWorkerLocationConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
403JSC::EncodedJSValue jsWorkerGlobalScopeXMLHttpRequestEventTargetConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
404bool setJSWorkerGlobalScopeXMLHttpRequestEventTargetConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
405JSC::EncodedJSValue jsWorkerGlobalScopeCaches(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
406#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
407JSC::EncodedJSValue jsWorkerGlobalScopeIndexedDB(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
408#endif
409JSC::EncodedJSValue jsWorkerGlobalScopeCrypto(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
410JSC::EncodedJSValue jsWorkerGlobalScopePerformance(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
411bool setJSWorkerGlobalScopePerformance(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
412JSC::EncodedJSValue jsWorkerGlobalScopeOrigin(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
413bool setJSWorkerGlobalScopeOrigin(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
414JSC::EncodedJSValue jsWorkerGlobalScopeIsSecureContext(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
415
416using JSWorkerGlobalScopeConstructor = JSDOMConstructorNotConstructable<JSWorkerGlobalScope>;
417
418/* Hash table */
419
420static const struct CompactHashIndex JSWorkerGlobalScopeTableIndex[133] = {
421 { -1, -1 },
422 { -1, -1 },
423 { -1, -1 },
424 { 12, -1 },
425 { 3, -1 },
426 { -1, -1 },
427 { 35, -1 },
428 { -1, -1 },
429 { -1, -1 },
430 { -1, -1 },
431 { -1, -1 },
432 { -1, -1 },
433 { -1, -1 },
434 { 38, -1 },
435 { -1, -1 },
436 { 23, -1 },
437 { -1, -1 },
438 { -1, -1 },
439 { -1, -1 },
440 { -1, -1 },
441 { -1, -1 },
442 { 26, -1 },
443 { 24, 130 },
444 { -1, -1 },
445 { 22, -1 },
446 { -1, -1 },
447 { -1, -1 },
448 { -1, -1 },
449 { -1, -1 },
450 { -1, -1 },
451 { -1, -1 },
452 { -1, -1 },
453 { -1, -1 },
454 { -1, -1 },
455 { -1, -1 },
456 { -1, -1 },
457 { -1, -1 },
458 { -1, -1 },
459 { -1, -1 },
460 { -1, -1 },
461 { -1, -1 },
462 { -1, -1 },
463 { -1, -1 },
464 { -1, -1 },
465 { 21, -1 },
466 { 2, -1 },
467 { -1, -1 },
468 { -1, -1 },
469 { 6, -1 },
470 { -1, -1 },
471 { 29, -1 },
472 { 39, -1 },
473 { -1, -1 },
474 { -1, -1 },
475 { -1, -1 },
476 { 33, -1 },
477 { 28, -1 },
478 { 0, -1 },
479 { 5, 128 },
480 { -1, -1 },
481 { -1, -1 },
482 { -1, -1 },
483 { -1, -1 },
484 { 30, -1 },
485 { 13, -1 },
486 { -1, -1 },
487 { -1, -1 },
488 { -1, -1 },
489 { -1, -1 },
490 { 9, -1 },
491 { 34, -1 },
492 { -1, -1 },
493 { 8, -1 },
494 { -1, -1 },
495 { -1, -1 },
496 { -1, -1 },
497 { 31, -1 },
498 { 7, -1 },
499 { -1, -1 },
500 { -1, -1 },
501 { -1, -1 },
502 { -1, -1 },
503 { -1, -1 },
504 { 19, -1 },
505 { 15, -1 },
506 { -1, -1 },
507 { -1, -1 },
508 { -1, -1 },
509 { -1, -1 },
510 { 20, 132 },
511 { -1, -1 },
512 { -1, -1 },
513 { -1, -1 },
514 { -1, -1 },
515 { -1, -1 },
516 { -1, -1 },
517 { 25, -1 },
518 { -1, -1 },
519 { -1, -1 },
520 { -1, -1 },
521 { -1, -1 },
522 { -1, -1 },
523 { 41, -1 },
524 { 10, -1 },
525 { -1, -1 },
526 { 18, 129 },
527 { -1, -1 },
528 { -1, -1 },
529 { -1, -1 },
530 { 4, -1 },
531 { -1, -1 },
532 { -1, -1 },
533 { 32, -1 },
534 { -1, -1 },
535 { 16, 131 },
536 { -1, -1 },
537 { -1, -1 },
538 { 37, -1 },
539 { 11, -1 },
540 { 14, -1 },
541 { -1, -1 },
542 { -1, -1 },
543 { -1, -1 },
544 { 1, -1 },
545 { -1, -1 },
546 { -1, -1 },
547 { -1, -1 },
548 { -1, -1 },
549 { 17, -1 },
550 { 27, -1 },
551 { 36, -1 },
552 { 40, -1 },
553 { 42, -1 },
554};
555
556
557static const HashTableValue JSWorkerGlobalScopeTableValues[] =
558{
559#if ENABLE(STREAMS_API)
560 { "ByteLengthQueuingStrategy", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeByteLengthQueuingStrategyConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeByteLengthQueuingStrategyConstructor) } },
561#else
562 { 0, 0, NoIntrinsic, { 0, 0 } },
563#endif
564#if ENABLE(STREAMS_API)
565 { "CountQueuingStrategy", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeCountQueuingStrategyConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeCountQueuingStrategyConstructor) } },
566#else
567 { 0, 0, NoIntrinsic, { 0, 0 } },
568#endif
569#if ENABLE(STREAMS_API)
570 { "ReadableStream", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeReadableStreamConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeReadableStreamConstructor) } },
571#else
572 { 0, 0, NoIntrinsic, { 0, 0 } },
573#endif
574 { "CloseEvent", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeCloseEventConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeCloseEventConstructor) } },
575#if ENABLE(WEB_CRYPTO)
576 { "CryptoKey", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeCryptoKeyConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeCryptoKeyConstructor) } },
577#else
578 { 0, 0, NoIntrinsic, { 0, 0 } },
579#endif
580#if ENABLE(WEB_CRYPTO)
581 { "SubtleCrypto", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeSubtleCryptoConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeSubtleCryptoConstructor) } },
582#else
583 { 0, 0, NoIntrinsic, { 0, 0 } },
584#endif
585 { "DOMMatrix", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeDOMMatrixConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeDOMMatrixConstructor) } },
586 { "DOMMatrixReadOnly", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeDOMMatrixReadOnlyConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeDOMMatrixReadOnlyConstructor) } },
587 { "AbortController", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeAbortControllerConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeAbortControllerConstructor) } },
588 { "AbortSignal", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeAbortSignalConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeAbortSignalConstructor) } },
589 { "CustomEvent", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeCustomEventConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeCustomEventConstructor) } },
590 { "DOMException", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeDOMExceptionConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeDOMExceptionConstructor) } },
591 { "DOMPoint", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeDOMPointConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeDOMPointConstructor) } },
592 { "DOMPointReadOnly", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeDOMPointReadOnlyConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeDOMPointReadOnlyConstructor) } },
593 { "DOMQuad", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeDOMQuadConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeDOMQuadConstructor) } },
594 { "DOMRect", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeDOMRectConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeDOMRectConstructor) } },
595 { "DOMRectReadOnly", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeDOMRectReadOnlyConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeDOMRectReadOnlyConstructor) } },
596 { "ErrorEvent", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeErrorEventConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeErrorEventConstructor) } },
597 { "Event", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeEventConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeEventConstructor) } },
598 { "EventTarget", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeEventTargetConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeEventTargetConstructor) } },
599#if ENABLE(CHANNEL_MESSAGING)
600 { "MessageChannel", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeMessageChannelConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeMessageChannelConstructor) } },
601#else
602 { 0, 0, NoIntrinsic, { 0, 0 } },
603#endif
604 { "MessageEvent", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeMessageEventConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeMessageEventConstructor) } },
605 { "MessagePort", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeMessagePortConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeMessagePortConstructor) } },
606 { "ProgressEvent", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeProgressEventConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeProgressEventConstructor) } },
607 { "PromiseRejectionEvent", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopePromiseRejectionEventConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopePromiseRejectionEventConstructor) } },
608 { "TextDecoder", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeTextDecoderConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeTextDecoderConstructor) } },
609 { "TextEncoder", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeTextEncoderConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeTextEncoderConstructor) } },
610 { "Blob", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeBlobConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeBlobConstructor) } },
611 { "FileReader", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeFileReaderConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeFileReaderConstructor) } },
612 { "FileReaderSync", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeFileReaderSyncConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeFileReaderSyncConstructor) } },
613 { "URL", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeURLConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeURLConstructor) } },
614 { "ImageData", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeImageDataConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeImageDataConstructor) } },
615 { "URLSearchParams", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeURLSearchParamsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeURLSearchParamsConstructor) } },
616 { "CanvasGradient", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeCanvasGradientConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeCanvasGradientConstructor) } },
617 { "CanvasPattern", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeCanvasPatternConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeCanvasPatternConstructor) } },
618 { "Path2D", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopePath2DConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopePath2DConstructor) } },
619 { "Crypto", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeCryptoConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeCryptoConstructor) } },
620 { "EventSource", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeEventSourceConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeEventSourceConstructor) } },
621 { "Performance", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopePerformanceConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopePerformanceConstructor) } },
622 { "WorkerNavigator", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeWorkerNavigatorConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeWorkerNavigatorConstructor) } },
623 { "WorkerGlobalScope", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeWorkerGlobalScopeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeWorkerGlobalScopeConstructor) } },
624 { "WorkerLocation", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeWorkerLocationConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeWorkerLocationConstructor) } },
625 { "XMLHttpRequestEventTarget", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeXMLHttpRequestEventTargetConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeXMLHttpRequestEventTargetConstructor) } },
626};
627
628static const HashTable JSWorkerGlobalScopeTable = { 43, 127, true, JSWorkerGlobalScope::info(), JSWorkerGlobalScopeTableValues, JSWorkerGlobalScopeTableIndex };
629template<> JSValue JSWorkerGlobalScopeConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
630{
631 return JSEventTarget::getConstructor(vm, &globalObject);
632}
633
634template<> void JSWorkerGlobalScopeConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
635{
636 putDirect(vm, vm.propertyNames->prototype, JSWorkerGlobalScope::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
637 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("WorkerGlobalScope"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
638 putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
639}
640
641template<> const ClassInfo JSWorkerGlobalScopeConstructor::s_info = { "WorkerGlobalScope", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSWorkerGlobalScopeConstructor) };
642
643/* Hash table for prototype */
644
645static const struct CompactHashIndex JSWorkerGlobalScopePrototypeTableIndex[69] = {
646 { -1, -1 },
647 { -1, -1 },
648 { -1, -1 },
649 { -1, -1 },
650 { 9, 64 },
651 { -1, -1 },
652 { 24, -1 },
653 { -1, -1 },
654 { 4, -1 },
655 { -1, -1 },
656 { 18, -1 },
657 { 6, 68 },
658 { -1, -1 },
659 { -1, -1 },
660 { -1, -1 },
661 { -1, -1 },
662 { -1, -1 },
663 { 14, -1 },
664 { -1, -1 },
665 { -1, -1 },
666 { 17, -1 },
667 { -1, -1 },
668 { -1, -1 },
669 { -1, -1 },
670 { -1, -1 },
671 { 0, -1 },
672 { -1, -1 },
673 { -1, -1 },
674 { -1, -1 },
675 { -1, -1 },
676 { -1, -1 },
677 { -1, -1 },
678 { 7, -1 },
679 { -1, -1 },
680 { -1, -1 },
681 { -1, -1 },
682 { -1, -1 },
683 { -1, -1 },
684 { 1, 67 },
685 { 11, -1 },
686 { -1, -1 },
687 { -1, -1 },
688 { -1, -1 },
689 { -1, -1 },
690 { 8, -1 },
691 { -1, -1 },
692 { 3, 66 },
693 { 12, -1 },
694 { 2, -1 },
695 { -1, -1 },
696 { 10, 65 },
697 { -1, -1 },
698 { -1, -1 },
699 { -1, -1 },
700 { 5, -1 },
701 { 15, -1 },
702 { -1, -1 },
703 { -1, -1 },
704 { 19, -1 },
705 { -1, -1 },
706 { -1, -1 },
707 { 20, -1 },
708 { -1, -1 },
709 { -1, -1 },
710 { 13, -1 },
711 { 16, -1 },
712 { 21, -1 },
713 { 22, -1 },
714 { 23, -1 },
715};
716
717
718static const HashTableValue JSWorkerGlobalScopePrototypeTableValues[] =
719{
720 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeConstructor) } },
721 { "self", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeSelf), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
722 { "location", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeLocation), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
723 { "onerror", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeOnerror), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeOnerror) } },
724 { "onoffline", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeOnoffline), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeOnoffline) } },
725 { "ononline", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeOnonline), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeOnonline) } },
726 { "onrejectionhandled", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeOnrejectionhandled), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeOnrejectionhandled) } },
727 { "onunhandledrejection", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeOnunhandledrejection), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeOnunhandledrejection) } },
728 { "navigator", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeNavigator), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
729 { "caches", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeCaches), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
730#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
731 { "indexedDB", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeIndexedDB), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
732#else
733 { 0, 0, NoIntrinsic, { 0, 0 } },
734#endif
735 { "crypto", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeCrypto), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
736 { "performance", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopePerformance), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopePerformance) } },
737 { "origin", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeOrigin), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSWorkerGlobalScopeOrigin) } },
738 { "isSecureContext", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeIsSecureContext), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
739 { "importScripts", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsWorkerGlobalScopePrototypeFunctionImportScripts), (intptr_t) (0) } },
740 { "fetch", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsWorkerGlobalScopePrototypeFunctionFetch), (intptr_t) (1) } },
741 { "setTimeout", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsWorkerGlobalScopePrototypeFunctionSetTimeout), (intptr_t) (1) } },
742 { "clearTimeout", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsWorkerGlobalScopePrototypeFunctionClearTimeout), (intptr_t) (0) } },
743 { "setInterval", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsWorkerGlobalScopePrototypeFunctionSetInterval), (intptr_t) (1) } },
744 { "clearInterval", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsWorkerGlobalScopePrototypeFunctionClearInterval), (intptr_t) (0) } },
745 { "queueMicrotask", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsWorkerGlobalScopePrototypeFunctionQueueMicrotask), (intptr_t) (1) } },
746 { "atob", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsWorkerGlobalScopePrototypeFunctionAtob), (intptr_t) (1) } },
747 { "btoa", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsWorkerGlobalScopePrototypeFunctionBtoa), (intptr_t) (1) } },
748 { "createImageBitmap", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsWorkerGlobalScopePrototypeFunctionCreateImageBitmap), (intptr_t) (1) } },
749};
750
751static const HashTable JSWorkerGlobalScopePrototypeTable = { 25, 63, true, JSWorkerGlobalScope::info(), JSWorkerGlobalScopePrototypeTableValues, JSWorkerGlobalScopePrototypeTableIndex };
752const ClassInfo JSWorkerGlobalScopePrototype::s_info = { "WorkerGlobalScopePrototype", &Base::s_info, &JSWorkerGlobalScopePrototypeTable, nullptr, CREATE_METHOD_TABLE(JSWorkerGlobalScopePrototype) };
753
754void JSWorkerGlobalScopePrototype::finishCreation(VM& vm)
755{
756 Base::finishCreation(vm);
757 reifyStaticProperties(vm, JSWorkerGlobalScope::info(), JSWorkerGlobalScopePrototypeTableValues, *this);
758 bool hasDisabledRuntimeProperties = false;
759 if (!RuntimeEnabledFeatures::sharedFeatures().fetchAPIEnabled()) {
760 hasDisabledRuntimeProperties = true;
761 auto propertyName = Identifier::fromString(&vm, reinterpret_cast<const LChar*>("fetch"), strlen("fetch"));
762 VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable);
763 JSObject::deleteProperty(this, globalObject()->globalExec(), propertyName);
764 }
765 if (!RuntimeEnabledFeatures::sharedFeatures().imageBitmapOffscreenCanvasEnabled()) {
766 hasDisabledRuntimeProperties = true;
767 auto propertyName = Identifier::fromString(&vm, reinterpret_cast<const LChar*>("createImageBitmap"), strlen("createImageBitmap"));
768 VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable);
769 JSObject::deleteProperty(this, globalObject()->globalExec(), propertyName);
770 }
771 if (!(jsCast<JSDOMGlobalObject*>(globalObject())->scriptExecutionContext()->isSecureContext() && RuntimeEnabledFeatures::sharedFeatures().cacheAPIEnabled())) {
772 hasDisabledRuntimeProperties = true;
773 auto propertyName = Identifier::fromString(&vm, reinterpret_cast<const LChar*>("caches"), strlen("caches"));
774 VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable);
775 JSObject::deleteProperty(this, globalObject()->globalExec(), propertyName);
776 }
777#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
778 if (!RuntimeEnabledFeatures::sharedFeatures().indexedDBWorkersEnabled()) {
779 hasDisabledRuntimeProperties = true;
780 auto propertyName = Identifier::fromString(&vm, reinterpret_cast<const LChar*>("indexedDB"), strlen("indexedDB"));
781 VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable);
782 JSObject::deleteProperty(this, globalObject()->globalExec(), propertyName);
783 }
784#endif
785 if (!RuntimeEnabledFeatures::sharedFeatures().isSecureContextAttributeEnabled()) {
786 hasDisabledRuntimeProperties = true;
787 auto propertyName = Identifier::fromString(&vm, reinterpret_cast<const LChar*>("isSecureContext"), strlen("isSecureContext"));
788 VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable);
789 JSObject::deleteProperty(this, globalObject()->globalExec(), propertyName);
790 }
791 if (hasDisabledRuntimeProperties && structure()->isDictionary())
792 flattenDictionaryObject(vm);
793}
794
795const ClassInfo JSWorkerGlobalScope::s_info = { "WorkerGlobalScope", &Base::s_info, &JSWorkerGlobalScopeTable, nullptr, CREATE_METHOD_TABLE(JSWorkerGlobalScope) };
796
797JSWorkerGlobalScope::JSWorkerGlobalScope(VM& vm, Structure* structure, Ref<WorkerGlobalScope>&& impl)
798 : JSWorkerGlobalScopeBase(vm, structure, WTFMove(impl))
799{
800}
801
802void JSWorkerGlobalScope::finishCreation(VM& vm, JSProxy* proxy)
803{
804 Base::finishCreation(vm, proxy);
805
806#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
807 if (RuntimeEnabledFeatures::sharedFeatures().indexedDBWorkersEnabled())
808 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().IDBCursorPublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeIDBCursorConstructor, setJSWorkerGlobalScopeIDBCursorConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
809#endif
810#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
811 if (RuntimeEnabledFeatures::sharedFeatures().indexedDBWorkersEnabled())
812 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().IDBCursorWithValuePublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeIDBCursorWithValueConstructor, setJSWorkerGlobalScopeIDBCursorWithValueConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
813#endif
814#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
815 if (RuntimeEnabledFeatures::sharedFeatures().indexedDBWorkersEnabled())
816 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().IDBDatabasePublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeIDBDatabaseConstructor, setJSWorkerGlobalScopeIDBDatabaseConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
817#endif
818#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
819 if (RuntimeEnabledFeatures::sharedFeatures().indexedDBWorkersEnabled())
820 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().IDBFactoryPublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeIDBFactoryConstructor, setJSWorkerGlobalScopeIDBFactoryConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
821#endif
822#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
823 if (RuntimeEnabledFeatures::sharedFeatures().indexedDBWorkersEnabled())
824 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().IDBIndexPublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeIDBIndexConstructor, setJSWorkerGlobalScopeIDBIndexConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
825#endif
826#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
827 if (RuntimeEnabledFeatures::sharedFeatures().indexedDBWorkersEnabled())
828 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().IDBKeyRangePublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeIDBKeyRangeConstructor, setJSWorkerGlobalScopeIDBKeyRangeConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
829#endif
830#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
831 if (RuntimeEnabledFeatures::sharedFeatures().indexedDBWorkersEnabled())
832 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().IDBObjectStorePublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeIDBObjectStoreConstructor, setJSWorkerGlobalScopeIDBObjectStoreConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
833#endif
834#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
835 if (RuntimeEnabledFeatures::sharedFeatures().indexedDBWorkersEnabled())
836 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().IDBOpenDBRequestPublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeIDBOpenDBRequestConstructor, setJSWorkerGlobalScopeIDBOpenDBRequestConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
837#endif
838#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
839 if (RuntimeEnabledFeatures::sharedFeatures().indexedDBWorkersEnabled())
840 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().IDBRequestPublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeIDBRequestConstructor, setJSWorkerGlobalScopeIDBRequestConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
841#endif
842#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
843 if (RuntimeEnabledFeatures::sharedFeatures().indexedDBWorkersEnabled())
844 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().IDBTransactionPublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeIDBTransactionConstructor, setJSWorkerGlobalScopeIDBTransactionConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
845#endif
846#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
847 if (RuntimeEnabledFeatures::sharedFeatures().indexedDBWorkersEnabled())
848 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().IDBVersionChangeEventPublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeIDBVersionChangeEventConstructor, setJSWorkerGlobalScopeIDBVersionChangeEventConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
849#endif
850 if ((jsCast<JSDOMGlobalObject*>(globalObject())->scriptExecutionContext()->isSecureContext() && RuntimeEnabledFeatures::sharedFeatures().cacheAPIEnabled()))
851 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().CachePublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeCacheConstructor, setJSWorkerGlobalScopeCacheConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
852 if ((jsCast<JSDOMGlobalObject*>(globalObject())->scriptExecutionContext()->isSecureContext() && RuntimeEnabledFeatures::sharedFeatures().cacheAPIEnabled()))
853 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().CacheStoragePublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeCacheStorageConstructor, setJSWorkerGlobalScopeCacheStorageConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
854 if (RuntimeEnabledFeatures::sharedFeatures().fetchAPIEnabled())
855 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().HeadersPublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeHeadersConstructor, setJSWorkerGlobalScopeHeadersConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
856 if (RuntimeEnabledFeatures::sharedFeatures().fetchAPIEnabled())
857 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().RequestPublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeRequestConstructor, setJSWorkerGlobalScopeRequestConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
858 if (RuntimeEnabledFeatures::sharedFeatures().fetchAPIEnabled())
859 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().ResponsePublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeResponseConstructor, setJSWorkerGlobalScopeResponseConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
860 if (RuntimeEnabledFeatures::sharedFeatures().webSocketEnabled())
861 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().WebSocketPublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeWebSocketConstructor, setJSWorkerGlobalScopeWebSocketConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
862#if ENABLE(CSS_TYPED_OM)
863 if (RuntimeEnabledFeatures::sharedFeatures().cssTypedOMEnabled())
864 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().StylePropertyMapReadOnlyPublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeStylePropertyMapReadOnlyConstructor, setJSWorkerGlobalScopeStylePropertyMapReadOnlyConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
865#endif
866#if ENABLE(CSS_TYPED_OM)
867 if (RuntimeEnabledFeatures::sharedFeatures().cssTypedOMEnabled())
868 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().CSSImageValuePublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeCSSImageValueConstructor, setJSWorkerGlobalScopeCSSImageValueConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
869#endif
870#if ENABLE(CSS_TYPED_OM)
871 if (RuntimeEnabledFeatures::sharedFeatures().cssTypedOMEnabled())
872 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().CSSNumericValuePublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeCSSNumericValueConstructor, setJSWorkerGlobalScopeCSSNumericValueConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
873#endif
874#if ENABLE(CSS_TYPED_OM)
875 if (RuntimeEnabledFeatures::sharedFeatures().cssTypedOMEnabled())
876 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().CSSStyleValuePublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeCSSStyleValueConstructor, setJSWorkerGlobalScopeCSSStyleValueConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
877#endif
878#if ENABLE(CSS_TYPED_OM)
879 if (RuntimeEnabledFeatures::sharedFeatures().cssTypedOMEnabled())
880 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().CSSUnitValuePublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeCSSUnitValueConstructor, setJSWorkerGlobalScopeCSSUnitValueConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
881#endif
882#if ENABLE(CSS_TYPED_OM)
883 if (RuntimeEnabledFeatures::sharedFeatures().cssTypedOMEnabled())
884 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().CSSUnparsedValuePublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeCSSUnparsedValueConstructor, setJSWorkerGlobalScopeCSSUnparsedValueConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
885#endif
886 if (RuntimeEnabledFeatures::sharedFeatures().imageBitmapOffscreenCanvasEnabled())
887 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().ImageBitmapPublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeImageBitmapConstructor, setJSWorkerGlobalScopeImageBitmapConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
888 if (RuntimeEnabledFeatures::sharedFeatures().performanceTimelineEnabled())
889 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().PerformanceEntryPublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopePerformanceEntryConstructor, setJSWorkerGlobalScopePerformanceEntryConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
890 if (RuntimeEnabledFeatures::sharedFeatures().userTimingEnabled())
891 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().PerformanceMarkPublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopePerformanceMarkConstructor, setJSWorkerGlobalScopePerformanceMarkConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
892 if (RuntimeEnabledFeatures::sharedFeatures().userTimingEnabled())
893 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().PerformanceMeasurePublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopePerformanceMeasureConstructor, setJSWorkerGlobalScopePerformanceMeasureConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
894 if (RuntimeEnabledFeatures::sharedFeatures().performanceTimelineEnabled())
895 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().PerformanceObserverPublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopePerformanceObserverConstructor, setJSWorkerGlobalScopePerformanceObserverConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
896 if (RuntimeEnabledFeatures::sharedFeatures().performanceTimelineEnabled())
897 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().PerformanceObserverEntryListPublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopePerformanceObserverEntryListConstructor, setJSWorkerGlobalScopePerformanceObserverEntryListConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
898 if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled())
899 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().PerformanceResourceTimingPublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopePerformanceResourceTimingConstructor, setJSWorkerGlobalScopePerformanceResourceTimingConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
900 if (RuntimeEnabledFeatures::sharedFeatures().serverTimingEnabled())
901 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().PerformanceServerTimingPublicName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopePerformanceServerTimingConstructor, setJSWorkerGlobalScopePerformanceServerTimingConstructor), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)));
902#if ENABLE(STREAMS_API)
903 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().ReadableByteStreamControllerPrivateName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeReadableByteStreamControllerConstructor, nullptr), attributesForStructure(JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly));
904#endif
905#if ENABLE(STREAMS_API)
906 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().ReadableStreamPrivateName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeReadableStreamConstructor, nullptr), attributesForStructure(JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly));
907#endif
908#if ENABLE(STREAMS_API)
909 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().ReadableStreamBYOBReaderPrivateName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeReadableStreamBYOBReaderConstructor, nullptr), attributesForStructure(JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly));
910#endif
911#if ENABLE(STREAMS_API)
912 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().ReadableStreamBYOBRequestPrivateName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeReadableStreamBYOBRequestConstructor, nullptr), attributesForStructure(JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly));
913#endif
914#if ENABLE(STREAMS_API)
915 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().ReadableStreamDefaultControllerPrivateName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeReadableStreamDefaultControllerConstructor, nullptr), attributesForStructure(JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly));
916#endif
917#if ENABLE(STREAMS_API)
918 putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().ReadableStreamDefaultReaderPrivateName(), CustomGetterSetter::create(vm, jsWorkerGlobalScopeReadableStreamDefaultReaderConstructor, nullptr), attributesForStructure(JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly));
919#endif
920}
921
922JSObject* JSWorkerGlobalScope::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
923{
924 return JSWorkerGlobalScopePrototype::create(vm, &globalObject, JSWorkerGlobalScopePrototype::createStructure(vm, &globalObject, JSEventTarget::prototype(vm, globalObject)));
925}
926
927JSObject* JSWorkerGlobalScope::prototype(VM& vm, JSDOMGlobalObject& globalObject)
928{
929 return getDOMPrototype<JSWorkerGlobalScope>(vm, globalObject);
930}
931
932JSValue JSWorkerGlobalScope::getConstructor(VM& vm, const JSGlobalObject* globalObject)
933{
934 return getDOMConstructor<JSWorkerGlobalScopeConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
935}
936
937template<> inline JSWorkerGlobalScope* IDLAttribute<JSWorkerGlobalScope>::cast(ExecState& state, EncodedJSValue thisValue)
938{
939 auto decodedThisValue = JSValue::decode(thisValue);
940 if (decodedThisValue.isUndefinedOrNull())
941 decodedThisValue = state.thisValue().toThis(&state, NotStrictMode);
942 return toJSWorkerGlobalScope(state.vm(), decodedThisValue);}
943
944template<> inline JSWorkerGlobalScope* IDLOperation<JSWorkerGlobalScope>::cast(ExecState& state)
945{
946 return toJSWorkerGlobalScope(state.vm(), state.thisValue().toThis(&state, NotStrictMode));
947}
948
949EncodedJSValue jsWorkerGlobalScopeConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
950{
951 VM& vm = state->vm();
952 auto throwScope = DECLARE_THROW_SCOPE(vm);
953 auto* prototype = jsDynamicCast<JSWorkerGlobalScopePrototype*>(vm, JSValue::decode(thisValue));
954 if (UNLIKELY(!prototype))
955 return throwVMTypeError(state, throwScope);
956 return JSValue::encode(JSWorkerGlobalScope::getConstructor(state->vm(), prototype->globalObject()));
957}
958
959bool setJSWorkerGlobalScopeConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
960{
961 VM& vm = state->vm();
962 auto throwScope = DECLARE_THROW_SCOPE(vm);
963 auto* prototype = jsDynamicCast<JSWorkerGlobalScopePrototype*>(vm, JSValue::decode(thisValue));
964 if (UNLIKELY(!prototype)) {
965 throwVMTypeError(state, throwScope);
966 return false;
967 }
968 // Shadowing a built-in constructor
969 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));
970}
971
972static inline JSValue jsWorkerGlobalScopeSelfGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
973{
974 UNUSED_PARAM(throwScope);
975 UNUSED_PARAM(state);
976 auto& impl = thisObject.wrapped();
977 JSValue result = toJS<IDLInterface<WorkerGlobalScope>>(state, *thisObject.globalObject(), throwScope, impl.self());
978 return result;
979}
980
981EncodedJSValue jsWorkerGlobalScopeSelf(ExecState* state, EncodedJSValue thisValue, PropertyName)
982{
983 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeSelfGetter>(*state, thisValue, "self");
984}
985
986static inline JSValue jsWorkerGlobalScopeLocationGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
987{
988 UNUSED_PARAM(throwScope);
989 UNUSED_PARAM(state);
990 auto& impl = thisObject.wrapped();
991 JSValue result = toJS<IDLInterface<WorkerLocation>>(state, *thisObject.globalObject(), throwScope, impl.location());
992 return result;
993}
994
995EncodedJSValue jsWorkerGlobalScopeLocation(ExecState* state, EncodedJSValue thisValue, PropertyName)
996{
997 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeLocationGetter>(*state, thisValue, "location");
998}
999
1000static inline JSValue jsWorkerGlobalScopeOnerrorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1001{
1002 UNUSED_PARAM(throwScope);
1003 UNUSED_PARAM(state);
1004 return eventHandlerAttribute(thisObject.wrapped(), eventNames().errorEvent, worldForDOMObject(thisObject));
1005}
1006
1007EncodedJSValue jsWorkerGlobalScopeOnerror(ExecState* state, EncodedJSValue thisValue, PropertyName)
1008{
1009 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeOnerrorGetter>(*state, thisValue, "onerror");
1010}
1011
1012static inline bool setJSWorkerGlobalScopeOnerrorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1013{
1014 UNUSED_PARAM(throwScope);
1015 thisObject.wrapped().setAttributeEventListener(eventNames().errorEvent, createJSErrorHandler(state, value, thisObject), worldForDOMObject(thisObject));
1016 return true;
1017}
1018
1019bool setJSWorkerGlobalScopeOnerror(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1020{
1021 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeOnerrorSetter>(*state, thisValue, encodedValue, "onerror");
1022}
1023
1024static inline JSValue jsWorkerGlobalScopeOnofflineGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1025{
1026 UNUSED_PARAM(throwScope);
1027 UNUSED_PARAM(state);
1028 return eventHandlerAttribute(thisObject.wrapped(), eventNames().offlineEvent, worldForDOMObject(thisObject));
1029}
1030
1031EncodedJSValue jsWorkerGlobalScopeOnoffline(ExecState* state, EncodedJSValue thisValue, PropertyName)
1032{
1033 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeOnofflineGetter>(*state, thisValue, "onoffline");
1034}
1035
1036static inline bool setJSWorkerGlobalScopeOnofflineSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1037{
1038 UNUSED_PARAM(throwScope);
1039 setEventHandlerAttribute(state, thisObject, thisObject.wrapped(), eventNames().offlineEvent, value);
1040 return true;
1041}
1042
1043bool setJSWorkerGlobalScopeOnoffline(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1044{
1045 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeOnofflineSetter>(*state, thisValue, encodedValue, "onoffline");
1046}
1047
1048static inline JSValue jsWorkerGlobalScopeOnonlineGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1049{
1050 UNUSED_PARAM(throwScope);
1051 UNUSED_PARAM(state);
1052 return eventHandlerAttribute(thisObject.wrapped(), eventNames().onlineEvent, worldForDOMObject(thisObject));
1053}
1054
1055EncodedJSValue jsWorkerGlobalScopeOnonline(ExecState* state, EncodedJSValue thisValue, PropertyName)
1056{
1057 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeOnonlineGetter>(*state, thisValue, "ononline");
1058}
1059
1060static inline bool setJSWorkerGlobalScopeOnonlineSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1061{
1062 UNUSED_PARAM(throwScope);
1063 setEventHandlerAttribute(state, thisObject, thisObject.wrapped(), eventNames().onlineEvent, value);
1064 return true;
1065}
1066
1067bool setJSWorkerGlobalScopeOnonline(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1068{
1069 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeOnonlineSetter>(*state, thisValue, encodedValue, "ononline");
1070}
1071
1072static inline JSValue jsWorkerGlobalScopeOnrejectionhandledGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1073{
1074 UNUSED_PARAM(throwScope);
1075 UNUSED_PARAM(state);
1076 return eventHandlerAttribute(thisObject.wrapped(), eventNames().rejectionhandledEvent, worldForDOMObject(thisObject));
1077}
1078
1079EncodedJSValue jsWorkerGlobalScopeOnrejectionhandled(ExecState* state, EncodedJSValue thisValue, PropertyName)
1080{
1081 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeOnrejectionhandledGetter>(*state, thisValue, "onrejectionhandled");
1082}
1083
1084static inline bool setJSWorkerGlobalScopeOnrejectionhandledSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1085{
1086 UNUSED_PARAM(throwScope);
1087 setEventHandlerAttribute(state, thisObject, thisObject.wrapped(), eventNames().rejectionhandledEvent, value);
1088 return true;
1089}
1090
1091bool setJSWorkerGlobalScopeOnrejectionhandled(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1092{
1093 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeOnrejectionhandledSetter>(*state, thisValue, encodedValue, "onrejectionhandled");
1094}
1095
1096static inline JSValue jsWorkerGlobalScopeOnunhandledrejectionGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1097{
1098 UNUSED_PARAM(throwScope);
1099 UNUSED_PARAM(state);
1100 return eventHandlerAttribute(thisObject.wrapped(), eventNames().unhandledrejectionEvent, worldForDOMObject(thisObject));
1101}
1102
1103EncodedJSValue jsWorkerGlobalScopeOnunhandledrejection(ExecState* state, EncodedJSValue thisValue, PropertyName)
1104{
1105 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeOnunhandledrejectionGetter>(*state, thisValue, "onunhandledrejection");
1106}
1107
1108static inline bool setJSWorkerGlobalScopeOnunhandledrejectionSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1109{
1110 UNUSED_PARAM(throwScope);
1111 setEventHandlerAttribute(state, thisObject, thisObject.wrapped(), eventNames().unhandledrejectionEvent, value);
1112 return true;
1113}
1114
1115bool setJSWorkerGlobalScopeOnunhandledrejection(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1116{
1117 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeOnunhandledrejectionSetter>(*state, thisValue, encodedValue, "onunhandledrejection");
1118}
1119
1120static inline JSValue jsWorkerGlobalScopeNavigatorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1121{
1122 UNUSED_PARAM(throwScope);
1123 UNUSED_PARAM(state);
1124 auto& impl = thisObject.wrapped();
1125 JSValue result = toJS<IDLInterface<WorkerNavigator>>(state, *thisObject.globalObject(), throwScope, impl.navigator());
1126 return result;
1127}
1128
1129EncodedJSValue jsWorkerGlobalScopeNavigator(ExecState* state, EncodedJSValue thisValue, PropertyName)
1130{
1131 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeNavigatorGetter>(*state, thisValue, "navigator");
1132}
1133
1134#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1135static inline JSValue jsWorkerGlobalScopeIDBCursorConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1136{
1137 UNUSED_PARAM(throwScope);
1138 UNUSED_PARAM(state);
1139 return JSIDBCursor::getConstructor(state.vm(), thisObject.globalObject());
1140}
1141
1142EncodedJSValue jsWorkerGlobalScopeIDBCursorConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1143{
1144 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeIDBCursorConstructorGetter>(*state, thisValue, "IDBCursor");
1145}
1146
1147#endif
1148
1149#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1150static inline bool setJSWorkerGlobalScopeIDBCursorConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1151{
1152 UNUSED_PARAM(throwScope);
1153 // Shadowing a built-in constructor.
1154 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("IDBCursor"), strlen("IDBCursor")), value);
1155}
1156
1157bool setJSWorkerGlobalScopeIDBCursorConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1158{
1159 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeIDBCursorConstructorSetter>(*state, thisValue, encodedValue, "IDBCursor");
1160}
1161
1162#endif
1163
1164#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1165static inline JSValue jsWorkerGlobalScopeIDBCursorWithValueConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1166{
1167 UNUSED_PARAM(throwScope);
1168 UNUSED_PARAM(state);
1169 return JSIDBCursorWithValue::getConstructor(state.vm(), thisObject.globalObject());
1170}
1171
1172EncodedJSValue jsWorkerGlobalScopeIDBCursorWithValueConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1173{
1174 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeIDBCursorWithValueConstructorGetter>(*state, thisValue, "IDBCursorWithValue");
1175}
1176
1177#endif
1178
1179#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1180static inline bool setJSWorkerGlobalScopeIDBCursorWithValueConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1181{
1182 UNUSED_PARAM(throwScope);
1183 // Shadowing a built-in constructor.
1184 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("IDBCursorWithValue"), strlen("IDBCursorWithValue")), value);
1185}
1186
1187bool setJSWorkerGlobalScopeIDBCursorWithValueConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1188{
1189 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeIDBCursorWithValueConstructorSetter>(*state, thisValue, encodedValue, "IDBCursorWithValue");
1190}
1191
1192#endif
1193
1194#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1195static inline JSValue jsWorkerGlobalScopeIDBDatabaseConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1196{
1197 UNUSED_PARAM(throwScope);
1198 UNUSED_PARAM(state);
1199 return JSIDBDatabase::getConstructor(state.vm(), thisObject.globalObject());
1200}
1201
1202EncodedJSValue jsWorkerGlobalScopeIDBDatabaseConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1203{
1204 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeIDBDatabaseConstructorGetter>(*state, thisValue, "IDBDatabase");
1205}
1206
1207#endif
1208
1209#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1210static inline bool setJSWorkerGlobalScopeIDBDatabaseConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1211{
1212 UNUSED_PARAM(throwScope);
1213 // Shadowing a built-in constructor.
1214 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("IDBDatabase"), strlen("IDBDatabase")), value);
1215}
1216
1217bool setJSWorkerGlobalScopeIDBDatabaseConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1218{
1219 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeIDBDatabaseConstructorSetter>(*state, thisValue, encodedValue, "IDBDatabase");
1220}
1221
1222#endif
1223
1224#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1225static inline JSValue jsWorkerGlobalScopeIDBFactoryConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1226{
1227 UNUSED_PARAM(throwScope);
1228 UNUSED_PARAM(state);
1229 return JSIDBFactory::getConstructor(state.vm(), thisObject.globalObject());
1230}
1231
1232EncodedJSValue jsWorkerGlobalScopeIDBFactoryConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1233{
1234 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeIDBFactoryConstructorGetter>(*state, thisValue, "IDBFactory");
1235}
1236
1237#endif
1238
1239#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1240static inline bool setJSWorkerGlobalScopeIDBFactoryConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1241{
1242 UNUSED_PARAM(throwScope);
1243 // Shadowing a built-in constructor.
1244 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("IDBFactory"), strlen("IDBFactory")), value);
1245}
1246
1247bool setJSWorkerGlobalScopeIDBFactoryConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1248{
1249 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeIDBFactoryConstructorSetter>(*state, thisValue, encodedValue, "IDBFactory");
1250}
1251
1252#endif
1253
1254#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1255static inline JSValue jsWorkerGlobalScopeIDBIndexConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1256{
1257 UNUSED_PARAM(throwScope);
1258 UNUSED_PARAM(state);
1259 return JSIDBIndex::getConstructor(state.vm(), thisObject.globalObject());
1260}
1261
1262EncodedJSValue jsWorkerGlobalScopeIDBIndexConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1263{
1264 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeIDBIndexConstructorGetter>(*state, thisValue, "IDBIndex");
1265}
1266
1267#endif
1268
1269#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1270static inline bool setJSWorkerGlobalScopeIDBIndexConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1271{
1272 UNUSED_PARAM(throwScope);
1273 // Shadowing a built-in constructor.
1274 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("IDBIndex"), strlen("IDBIndex")), value);
1275}
1276
1277bool setJSWorkerGlobalScopeIDBIndexConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1278{
1279 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeIDBIndexConstructorSetter>(*state, thisValue, encodedValue, "IDBIndex");
1280}
1281
1282#endif
1283
1284#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1285static inline JSValue jsWorkerGlobalScopeIDBKeyRangeConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1286{
1287 UNUSED_PARAM(throwScope);
1288 UNUSED_PARAM(state);
1289 return JSIDBKeyRange::getConstructor(state.vm(), thisObject.globalObject());
1290}
1291
1292EncodedJSValue jsWorkerGlobalScopeIDBKeyRangeConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1293{
1294 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeIDBKeyRangeConstructorGetter>(*state, thisValue, "IDBKeyRange");
1295}
1296
1297#endif
1298
1299#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1300static inline bool setJSWorkerGlobalScopeIDBKeyRangeConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1301{
1302 UNUSED_PARAM(throwScope);
1303 // Shadowing a built-in constructor.
1304 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("IDBKeyRange"), strlen("IDBKeyRange")), value);
1305}
1306
1307bool setJSWorkerGlobalScopeIDBKeyRangeConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1308{
1309 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeIDBKeyRangeConstructorSetter>(*state, thisValue, encodedValue, "IDBKeyRange");
1310}
1311
1312#endif
1313
1314#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1315static inline JSValue jsWorkerGlobalScopeIDBObjectStoreConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1316{
1317 UNUSED_PARAM(throwScope);
1318 UNUSED_PARAM(state);
1319 return JSIDBObjectStore::getConstructor(state.vm(), thisObject.globalObject());
1320}
1321
1322EncodedJSValue jsWorkerGlobalScopeIDBObjectStoreConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1323{
1324 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeIDBObjectStoreConstructorGetter>(*state, thisValue, "IDBObjectStore");
1325}
1326
1327#endif
1328
1329#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1330static inline bool setJSWorkerGlobalScopeIDBObjectStoreConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1331{
1332 UNUSED_PARAM(throwScope);
1333 // Shadowing a built-in constructor.
1334 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("IDBObjectStore"), strlen("IDBObjectStore")), value);
1335}
1336
1337bool setJSWorkerGlobalScopeIDBObjectStoreConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1338{
1339 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeIDBObjectStoreConstructorSetter>(*state, thisValue, encodedValue, "IDBObjectStore");
1340}
1341
1342#endif
1343
1344#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1345static inline JSValue jsWorkerGlobalScopeIDBOpenDBRequestConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1346{
1347 UNUSED_PARAM(throwScope);
1348 UNUSED_PARAM(state);
1349 return JSIDBOpenDBRequest::getConstructor(state.vm(), thisObject.globalObject());
1350}
1351
1352EncodedJSValue jsWorkerGlobalScopeIDBOpenDBRequestConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1353{
1354 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeIDBOpenDBRequestConstructorGetter>(*state, thisValue, "IDBOpenDBRequest");
1355}
1356
1357#endif
1358
1359#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1360static inline bool setJSWorkerGlobalScopeIDBOpenDBRequestConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1361{
1362 UNUSED_PARAM(throwScope);
1363 // Shadowing a built-in constructor.
1364 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("IDBOpenDBRequest"), strlen("IDBOpenDBRequest")), value);
1365}
1366
1367bool setJSWorkerGlobalScopeIDBOpenDBRequestConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1368{
1369 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeIDBOpenDBRequestConstructorSetter>(*state, thisValue, encodedValue, "IDBOpenDBRequest");
1370}
1371
1372#endif
1373
1374#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1375static inline JSValue jsWorkerGlobalScopeIDBRequestConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1376{
1377 UNUSED_PARAM(throwScope);
1378 UNUSED_PARAM(state);
1379 return JSIDBRequest::getConstructor(state.vm(), thisObject.globalObject());
1380}
1381
1382EncodedJSValue jsWorkerGlobalScopeIDBRequestConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1383{
1384 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeIDBRequestConstructorGetter>(*state, thisValue, "IDBRequest");
1385}
1386
1387#endif
1388
1389#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1390static inline bool setJSWorkerGlobalScopeIDBRequestConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1391{
1392 UNUSED_PARAM(throwScope);
1393 // Shadowing a built-in constructor.
1394 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("IDBRequest"), strlen("IDBRequest")), value);
1395}
1396
1397bool setJSWorkerGlobalScopeIDBRequestConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1398{
1399 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeIDBRequestConstructorSetter>(*state, thisValue, encodedValue, "IDBRequest");
1400}
1401
1402#endif
1403
1404#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1405static inline JSValue jsWorkerGlobalScopeIDBTransactionConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1406{
1407 UNUSED_PARAM(throwScope);
1408 UNUSED_PARAM(state);
1409 return JSIDBTransaction::getConstructor(state.vm(), thisObject.globalObject());
1410}
1411
1412EncodedJSValue jsWorkerGlobalScopeIDBTransactionConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1413{
1414 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeIDBTransactionConstructorGetter>(*state, thisValue, "IDBTransaction");
1415}
1416
1417#endif
1418
1419#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1420static inline bool setJSWorkerGlobalScopeIDBTransactionConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1421{
1422 UNUSED_PARAM(throwScope);
1423 // Shadowing a built-in constructor.
1424 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("IDBTransaction"), strlen("IDBTransaction")), value);
1425}
1426
1427bool setJSWorkerGlobalScopeIDBTransactionConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1428{
1429 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeIDBTransactionConstructorSetter>(*state, thisValue, encodedValue, "IDBTransaction");
1430}
1431
1432#endif
1433
1434#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1435static inline JSValue jsWorkerGlobalScopeIDBVersionChangeEventConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1436{
1437 UNUSED_PARAM(throwScope);
1438 UNUSED_PARAM(state);
1439 return JSIDBVersionChangeEvent::getConstructor(state.vm(), thisObject.globalObject());
1440}
1441
1442EncodedJSValue jsWorkerGlobalScopeIDBVersionChangeEventConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1443{
1444 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeIDBVersionChangeEventConstructorGetter>(*state, thisValue, "IDBVersionChangeEvent");
1445}
1446
1447#endif
1448
1449#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
1450static inline bool setJSWorkerGlobalScopeIDBVersionChangeEventConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1451{
1452 UNUSED_PARAM(throwScope);
1453 // Shadowing a built-in constructor.
1454 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("IDBVersionChangeEvent"), strlen("IDBVersionChangeEvent")), value);
1455}
1456
1457bool setJSWorkerGlobalScopeIDBVersionChangeEventConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1458{
1459 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeIDBVersionChangeEventConstructorSetter>(*state, thisValue, encodedValue, "IDBVersionChangeEvent");
1460}
1461
1462#endif
1463
1464static inline JSValue jsWorkerGlobalScopeCacheConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1465{
1466 UNUSED_PARAM(throwScope);
1467 UNUSED_PARAM(state);
1468 return JSDOMCache::getConstructor(state.vm(), thisObject.globalObject());
1469}
1470
1471EncodedJSValue jsWorkerGlobalScopeCacheConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1472{
1473 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeCacheConstructorGetter>(*state, thisValue, "Cache");
1474}
1475
1476static inline bool setJSWorkerGlobalScopeCacheConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1477{
1478 UNUSED_PARAM(throwScope);
1479 // Shadowing a built-in constructor.
1480 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("Cache"), strlen("Cache")), value);
1481}
1482
1483bool setJSWorkerGlobalScopeCacheConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1484{
1485 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeCacheConstructorSetter>(*state, thisValue, encodedValue, "Cache");
1486}
1487
1488static inline JSValue jsWorkerGlobalScopeCacheStorageConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1489{
1490 UNUSED_PARAM(throwScope);
1491 UNUSED_PARAM(state);
1492 return JSDOMCacheStorage::getConstructor(state.vm(), thisObject.globalObject());
1493}
1494
1495EncodedJSValue jsWorkerGlobalScopeCacheStorageConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1496{
1497 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeCacheStorageConstructorGetter>(*state, thisValue, "CacheStorage");
1498}
1499
1500static inline bool setJSWorkerGlobalScopeCacheStorageConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1501{
1502 UNUSED_PARAM(throwScope);
1503 // Shadowing a built-in constructor.
1504 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("CacheStorage"), strlen("CacheStorage")), value);
1505}
1506
1507bool setJSWorkerGlobalScopeCacheStorageConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1508{
1509 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeCacheStorageConstructorSetter>(*state, thisValue, encodedValue, "CacheStorage");
1510}
1511
1512static inline JSValue jsWorkerGlobalScopeHeadersConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1513{
1514 UNUSED_PARAM(throwScope);
1515 UNUSED_PARAM(state);
1516 return JSFetchHeaders::getConstructor(state.vm(), thisObject.globalObject());
1517}
1518
1519EncodedJSValue jsWorkerGlobalScopeHeadersConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1520{
1521 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeHeadersConstructorGetter>(*state, thisValue, "Headers");
1522}
1523
1524static inline bool setJSWorkerGlobalScopeHeadersConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1525{
1526 UNUSED_PARAM(throwScope);
1527 // Shadowing a built-in constructor.
1528 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("Headers"), strlen("Headers")), value);
1529}
1530
1531bool setJSWorkerGlobalScopeHeadersConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1532{
1533 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeHeadersConstructorSetter>(*state, thisValue, encodedValue, "Headers");
1534}
1535
1536static inline JSValue jsWorkerGlobalScopeRequestConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1537{
1538 UNUSED_PARAM(throwScope);
1539 UNUSED_PARAM(state);
1540 return JSFetchRequest::getConstructor(state.vm(), thisObject.globalObject());
1541}
1542
1543EncodedJSValue jsWorkerGlobalScopeRequestConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1544{
1545 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeRequestConstructorGetter>(*state, thisValue, "Request");
1546}
1547
1548static inline bool setJSWorkerGlobalScopeRequestConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1549{
1550 UNUSED_PARAM(throwScope);
1551 // Shadowing a built-in constructor.
1552 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("Request"), strlen("Request")), value);
1553}
1554
1555bool setJSWorkerGlobalScopeRequestConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1556{
1557 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeRequestConstructorSetter>(*state, thisValue, encodedValue, "Request");
1558}
1559
1560static inline JSValue jsWorkerGlobalScopeResponseConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1561{
1562 UNUSED_PARAM(throwScope);
1563 UNUSED_PARAM(state);
1564 return JSFetchResponse::getConstructor(state.vm(), thisObject.globalObject());
1565}
1566
1567EncodedJSValue jsWorkerGlobalScopeResponseConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1568{
1569 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeResponseConstructorGetter>(*state, thisValue, "Response");
1570}
1571
1572static inline bool setJSWorkerGlobalScopeResponseConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1573{
1574 UNUSED_PARAM(throwScope);
1575 // Shadowing a built-in constructor.
1576 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("Response"), strlen("Response")), value);
1577}
1578
1579bool setJSWorkerGlobalScopeResponseConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1580{
1581 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeResponseConstructorSetter>(*state, thisValue, encodedValue, "Response");
1582}
1583
1584#if ENABLE(STREAMS_API)
1585static inline JSValue jsWorkerGlobalScopeByteLengthQueuingStrategyConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1586{
1587 UNUSED_PARAM(throwScope);
1588 UNUSED_PARAM(state);
1589 return JSByteLengthQueuingStrategy::getConstructor(state.vm(), thisObject.globalObject());
1590}
1591
1592EncodedJSValue jsWorkerGlobalScopeByteLengthQueuingStrategyConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1593{
1594 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeByteLengthQueuingStrategyConstructorGetter>(*state, thisValue, "ByteLengthQueuingStrategy");
1595}
1596
1597#endif
1598
1599#if ENABLE(STREAMS_API)
1600static inline bool setJSWorkerGlobalScopeByteLengthQueuingStrategyConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1601{
1602 UNUSED_PARAM(throwScope);
1603 // Shadowing a built-in constructor.
1604 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("ByteLengthQueuingStrategy"), strlen("ByteLengthQueuingStrategy")), value);
1605}
1606
1607bool setJSWorkerGlobalScopeByteLengthQueuingStrategyConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1608{
1609 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeByteLengthQueuingStrategyConstructorSetter>(*state, thisValue, encodedValue, "ByteLengthQueuingStrategy");
1610}
1611
1612#endif
1613
1614#if ENABLE(STREAMS_API)
1615static inline JSValue jsWorkerGlobalScopeCountQueuingStrategyConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1616{
1617 UNUSED_PARAM(throwScope);
1618 UNUSED_PARAM(state);
1619 return JSCountQueuingStrategy::getConstructor(state.vm(), thisObject.globalObject());
1620}
1621
1622EncodedJSValue jsWorkerGlobalScopeCountQueuingStrategyConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1623{
1624 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeCountQueuingStrategyConstructorGetter>(*state, thisValue, "CountQueuingStrategy");
1625}
1626
1627#endif
1628
1629#if ENABLE(STREAMS_API)
1630static inline bool setJSWorkerGlobalScopeCountQueuingStrategyConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1631{
1632 UNUSED_PARAM(throwScope);
1633 // Shadowing a built-in constructor.
1634 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("CountQueuingStrategy"), strlen("CountQueuingStrategy")), value);
1635}
1636
1637bool setJSWorkerGlobalScopeCountQueuingStrategyConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1638{
1639 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeCountQueuingStrategyConstructorSetter>(*state, thisValue, encodedValue, "CountQueuingStrategy");
1640}
1641
1642#endif
1643
1644#if ENABLE(STREAMS_API)
1645static inline JSValue jsWorkerGlobalScopeReadableByteStreamControllerConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1646{
1647 UNUSED_PARAM(throwScope);
1648 UNUSED_PARAM(state);
1649 return JSReadableByteStreamController::getConstructor(state.vm(), thisObject.globalObject());
1650}
1651
1652EncodedJSValue jsWorkerGlobalScopeReadableByteStreamControllerConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1653{
1654 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeReadableByteStreamControllerConstructorGetter>(*state, thisValue, "ReadableByteStreamController");
1655}
1656
1657#endif
1658
1659#if ENABLE(STREAMS_API)
1660static inline bool setJSWorkerGlobalScopeReadableByteStreamControllerConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1661{
1662 UNUSED_PARAM(throwScope);
1663 // Shadowing a built-in constructor.
1664 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("ReadableByteStreamController"), strlen("ReadableByteStreamController")), value);
1665}
1666
1667bool setJSWorkerGlobalScopeReadableByteStreamControllerConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1668{
1669 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeReadableByteStreamControllerConstructorSetter>(*state, thisValue, encodedValue, "ReadableByteStreamController");
1670}
1671
1672#endif
1673
1674#if ENABLE(STREAMS_API)
1675static inline JSValue jsWorkerGlobalScopeReadableStreamConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1676{
1677 UNUSED_PARAM(throwScope);
1678 UNUSED_PARAM(state);
1679 return JSReadableStream::getConstructor(state.vm(), thisObject.globalObject());
1680}
1681
1682EncodedJSValue jsWorkerGlobalScopeReadableStreamConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1683{
1684 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeReadableStreamConstructorGetter>(*state, thisValue, "ReadableStream");
1685}
1686
1687#endif
1688
1689#if ENABLE(STREAMS_API)
1690static inline bool setJSWorkerGlobalScopeReadableStreamConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1691{
1692 UNUSED_PARAM(throwScope);
1693 // Shadowing a built-in constructor.
1694 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("ReadableStream"), strlen("ReadableStream")), value);
1695}
1696
1697bool setJSWorkerGlobalScopeReadableStreamConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1698{
1699 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeReadableStreamConstructorSetter>(*state, thisValue, encodedValue, "ReadableStream");
1700}
1701
1702#endif
1703
1704#if ENABLE(STREAMS_API)
1705static inline JSValue jsWorkerGlobalScopeReadableStreamBYOBReaderConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1706{
1707 UNUSED_PARAM(throwScope);
1708 UNUSED_PARAM(state);
1709 return JSReadableStreamBYOBReader::getConstructor(state.vm(), thisObject.globalObject());
1710}
1711
1712EncodedJSValue jsWorkerGlobalScopeReadableStreamBYOBReaderConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1713{
1714 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeReadableStreamBYOBReaderConstructorGetter>(*state, thisValue, "ReadableStreamBYOBReader");
1715}
1716
1717#endif
1718
1719#if ENABLE(STREAMS_API)
1720static inline bool setJSWorkerGlobalScopeReadableStreamBYOBReaderConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1721{
1722 UNUSED_PARAM(throwScope);
1723 // Shadowing a built-in constructor.
1724 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("ReadableStreamBYOBReader"), strlen("ReadableStreamBYOBReader")), value);
1725}
1726
1727bool setJSWorkerGlobalScopeReadableStreamBYOBReaderConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1728{
1729 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeReadableStreamBYOBReaderConstructorSetter>(*state, thisValue, encodedValue, "ReadableStreamBYOBReader");
1730}
1731
1732#endif
1733
1734#if ENABLE(STREAMS_API)
1735static inline JSValue jsWorkerGlobalScopeReadableStreamBYOBRequestConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1736{
1737 UNUSED_PARAM(throwScope);
1738 UNUSED_PARAM(state);
1739 return JSReadableStreamBYOBRequest::getConstructor(state.vm(), thisObject.globalObject());
1740}
1741
1742EncodedJSValue jsWorkerGlobalScopeReadableStreamBYOBRequestConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1743{
1744 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeReadableStreamBYOBRequestConstructorGetter>(*state, thisValue, "ReadableStreamBYOBRequest");
1745}
1746
1747#endif
1748
1749#if ENABLE(STREAMS_API)
1750static inline bool setJSWorkerGlobalScopeReadableStreamBYOBRequestConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1751{
1752 UNUSED_PARAM(throwScope);
1753 // Shadowing a built-in constructor.
1754 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("ReadableStreamBYOBRequest"), strlen("ReadableStreamBYOBRequest")), value);
1755}
1756
1757bool setJSWorkerGlobalScopeReadableStreamBYOBRequestConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1758{
1759 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeReadableStreamBYOBRequestConstructorSetter>(*state, thisValue, encodedValue, "ReadableStreamBYOBRequest");
1760}
1761
1762#endif
1763
1764#if ENABLE(STREAMS_API)
1765static inline JSValue jsWorkerGlobalScopeReadableStreamDefaultControllerConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1766{
1767 UNUSED_PARAM(throwScope);
1768 UNUSED_PARAM(state);
1769 return JSReadableStreamDefaultController::getConstructor(state.vm(), thisObject.globalObject());
1770}
1771
1772EncodedJSValue jsWorkerGlobalScopeReadableStreamDefaultControllerConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1773{
1774 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeReadableStreamDefaultControllerConstructorGetter>(*state, thisValue, "ReadableStreamDefaultController");
1775}
1776
1777#endif
1778
1779#if ENABLE(STREAMS_API)
1780static inline bool setJSWorkerGlobalScopeReadableStreamDefaultControllerConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1781{
1782 UNUSED_PARAM(throwScope);
1783 // Shadowing a built-in constructor.
1784 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("ReadableStreamDefaultController"), strlen("ReadableStreamDefaultController")), value);
1785}
1786
1787bool setJSWorkerGlobalScopeReadableStreamDefaultControllerConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1788{
1789 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeReadableStreamDefaultControllerConstructorSetter>(*state, thisValue, encodedValue, "ReadableStreamDefaultController");
1790}
1791
1792#endif
1793
1794#if ENABLE(STREAMS_API)
1795static inline JSValue jsWorkerGlobalScopeReadableStreamDefaultReaderConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1796{
1797 UNUSED_PARAM(throwScope);
1798 UNUSED_PARAM(state);
1799 return JSReadableStreamDefaultReader::getConstructor(state.vm(), thisObject.globalObject());
1800}
1801
1802EncodedJSValue jsWorkerGlobalScopeReadableStreamDefaultReaderConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1803{
1804 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeReadableStreamDefaultReaderConstructorGetter>(*state, thisValue, "ReadableStreamDefaultReader");
1805}
1806
1807#endif
1808
1809#if ENABLE(STREAMS_API)
1810static inline bool setJSWorkerGlobalScopeReadableStreamDefaultReaderConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1811{
1812 UNUSED_PARAM(throwScope);
1813 // Shadowing a built-in constructor.
1814 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("ReadableStreamDefaultReader"), strlen("ReadableStreamDefaultReader")), value);
1815}
1816
1817bool setJSWorkerGlobalScopeReadableStreamDefaultReaderConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1818{
1819 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeReadableStreamDefaultReaderConstructorSetter>(*state, thisValue, encodedValue, "ReadableStreamDefaultReader");
1820}
1821
1822#endif
1823
1824static inline JSValue jsWorkerGlobalScopeCloseEventConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1825{
1826 UNUSED_PARAM(throwScope);
1827 UNUSED_PARAM(state);
1828 return JSCloseEvent::getConstructor(state.vm(), thisObject.globalObject());
1829}
1830
1831EncodedJSValue jsWorkerGlobalScopeCloseEventConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1832{
1833 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeCloseEventConstructorGetter>(*state, thisValue, "CloseEvent");
1834}
1835
1836static inline bool setJSWorkerGlobalScopeCloseEventConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1837{
1838 UNUSED_PARAM(throwScope);
1839 // Shadowing a built-in constructor.
1840 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("CloseEvent"), strlen("CloseEvent")), value);
1841}
1842
1843bool setJSWorkerGlobalScopeCloseEventConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1844{
1845 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeCloseEventConstructorSetter>(*state, thisValue, encodedValue, "CloseEvent");
1846}
1847
1848static inline JSValue jsWorkerGlobalScopeWebSocketConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1849{
1850 UNUSED_PARAM(throwScope);
1851 UNUSED_PARAM(state);
1852 return JSWebSocket::getConstructor(state.vm(), thisObject.globalObject());
1853}
1854
1855EncodedJSValue jsWorkerGlobalScopeWebSocketConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1856{
1857 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeWebSocketConstructorGetter>(*state, thisValue, "WebSocket");
1858}
1859
1860static inline bool setJSWorkerGlobalScopeWebSocketConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1861{
1862 UNUSED_PARAM(throwScope);
1863 // Shadowing a built-in constructor.
1864 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("WebSocket"), strlen("WebSocket")), value);
1865}
1866
1867bool setJSWorkerGlobalScopeWebSocketConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1868{
1869 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeWebSocketConstructorSetter>(*state, thisValue, encodedValue, "WebSocket");
1870}
1871
1872#if ENABLE(WEB_CRYPTO)
1873static inline JSValue jsWorkerGlobalScopeCryptoKeyConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1874{
1875 UNUSED_PARAM(throwScope);
1876 UNUSED_PARAM(state);
1877 return JSCryptoKey::getConstructor(state.vm(), thisObject.globalObject());
1878}
1879
1880EncodedJSValue jsWorkerGlobalScopeCryptoKeyConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1881{
1882 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeCryptoKeyConstructorGetter>(*state, thisValue, "CryptoKey");
1883}
1884
1885#endif
1886
1887#if ENABLE(WEB_CRYPTO)
1888static inline bool setJSWorkerGlobalScopeCryptoKeyConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1889{
1890 UNUSED_PARAM(throwScope);
1891 // Shadowing a built-in constructor.
1892 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("CryptoKey"), strlen("CryptoKey")), value);
1893}
1894
1895bool setJSWorkerGlobalScopeCryptoKeyConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1896{
1897 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeCryptoKeyConstructorSetter>(*state, thisValue, encodedValue, "CryptoKey");
1898}
1899
1900#endif
1901
1902#if ENABLE(WEB_CRYPTO)
1903static inline JSValue jsWorkerGlobalScopeSubtleCryptoConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1904{
1905 UNUSED_PARAM(throwScope);
1906 UNUSED_PARAM(state);
1907 return JSSubtleCrypto::getConstructor(state.vm(), thisObject.globalObject());
1908}
1909
1910EncodedJSValue jsWorkerGlobalScopeSubtleCryptoConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1911{
1912 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeSubtleCryptoConstructorGetter>(*state, thisValue, "SubtleCrypto");
1913}
1914
1915#endif
1916
1917#if ENABLE(WEB_CRYPTO)
1918static inline bool setJSWorkerGlobalScopeSubtleCryptoConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1919{
1920 UNUSED_PARAM(throwScope);
1921 // Shadowing a built-in constructor.
1922 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("SubtleCrypto"), strlen("SubtleCrypto")), value);
1923}
1924
1925bool setJSWorkerGlobalScopeSubtleCryptoConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1926{
1927 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeSubtleCryptoConstructorSetter>(*state, thisValue, encodedValue, "SubtleCrypto");
1928}
1929
1930#endif
1931
1932static inline JSValue jsWorkerGlobalScopeDOMMatrixConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1933{
1934 UNUSED_PARAM(throwScope);
1935 UNUSED_PARAM(state);
1936 return JSDOMMatrix::getConstructor(state.vm(), thisObject.globalObject());
1937}
1938
1939EncodedJSValue jsWorkerGlobalScopeDOMMatrixConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1940{
1941 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeDOMMatrixConstructorGetter>(*state, thisValue, "DOMMatrix");
1942}
1943
1944static inline bool setJSWorkerGlobalScopeDOMMatrixConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1945{
1946 UNUSED_PARAM(throwScope);
1947 // Shadowing a built-in constructor.
1948 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("DOMMatrix"), strlen("DOMMatrix")), value);
1949}
1950
1951bool setJSWorkerGlobalScopeDOMMatrixConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1952{
1953 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeDOMMatrixConstructorSetter>(*state, thisValue, encodedValue, "DOMMatrix");
1954}
1955
1956static inline JSValue jsWorkerGlobalScopeDOMMatrixReadOnlyConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1957{
1958 UNUSED_PARAM(throwScope);
1959 UNUSED_PARAM(state);
1960 return JSDOMMatrixReadOnly::getConstructor(state.vm(), thisObject.globalObject());
1961}
1962
1963EncodedJSValue jsWorkerGlobalScopeDOMMatrixReadOnlyConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1964{
1965 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeDOMMatrixReadOnlyConstructorGetter>(*state, thisValue, "DOMMatrixReadOnly");
1966}
1967
1968static inline bool setJSWorkerGlobalScopeDOMMatrixReadOnlyConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1969{
1970 UNUSED_PARAM(throwScope);
1971 // Shadowing a built-in constructor.
1972 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("DOMMatrixReadOnly"), strlen("DOMMatrixReadOnly")), value);
1973}
1974
1975bool setJSWorkerGlobalScopeDOMMatrixReadOnlyConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1976{
1977 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeDOMMatrixReadOnlyConstructorSetter>(*state, thisValue, encodedValue, "DOMMatrixReadOnly");
1978}
1979
1980#if ENABLE(CSS_TYPED_OM)
1981static inline JSValue jsWorkerGlobalScopeStylePropertyMapReadOnlyConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
1982{
1983 UNUSED_PARAM(throwScope);
1984 UNUSED_PARAM(state);
1985 return JSStylePropertyMapReadOnly::getConstructor(state.vm(), thisObject.globalObject());
1986}
1987
1988EncodedJSValue jsWorkerGlobalScopeStylePropertyMapReadOnlyConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1989{
1990 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeStylePropertyMapReadOnlyConstructorGetter>(*state, thisValue, "StylePropertyMapReadOnly");
1991}
1992
1993#endif
1994
1995#if ENABLE(CSS_TYPED_OM)
1996static inline bool setJSWorkerGlobalScopeStylePropertyMapReadOnlyConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
1997{
1998 UNUSED_PARAM(throwScope);
1999 // Shadowing a built-in constructor.
2000 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("StylePropertyMapReadOnly"), strlen("StylePropertyMapReadOnly")), value);
2001}
2002
2003bool setJSWorkerGlobalScopeStylePropertyMapReadOnlyConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2004{
2005 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeStylePropertyMapReadOnlyConstructorSetter>(*state, thisValue, encodedValue, "StylePropertyMapReadOnly");
2006}
2007
2008#endif
2009
2010#if ENABLE(CSS_TYPED_OM)
2011static inline JSValue jsWorkerGlobalScopeCSSImageValueConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2012{
2013 UNUSED_PARAM(throwScope);
2014 UNUSED_PARAM(state);
2015 return JSTypedOMCSSImageValue::getConstructor(state.vm(), thisObject.globalObject());
2016}
2017
2018EncodedJSValue jsWorkerGlobalScopeCSSImageValueConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2019{
2020 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeCSSImageValueConstructorGetter>(*state, thisValue, "CSSImageValue");
2021}
2022
2023#endif
2024
2025#if ENABLE(CSS_TYPED_OM)
2026static inline bool setJSWorkerGlobalScopeCSSImageValueConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2027{
2028 UNUSED_PARAM(throwScope);
2029 // Shadowing a built-in constructor.
2030 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("CSSImageValue"), strlen("CSSImageValue")), value);
2031}
2032
2033bool setJSWorkerGlobalScopeCSSImageValueConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2034{
2035 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeCSSImageValueConstructorSetter>(*state, thisValue, encodedValue, "CSSImageValue");
2036}
2037
2038#endif
2039
2040#if ENABLE(CSS_TYPED_OM)
2041static inline JSValue jsWorkerGlobalScopeCSSNumericValueConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2042{
2043 UNUSED_PARAM(throwScope);
2044 UNUSED_PARAM(state);
2045 return JSTypedOMCSSNumericValue::getConstructor(state.vm(), thisObject.globalObject());
2046}
2047
2048EncodedJSValue jsWorkerGlobalScopeCSSNumericValueConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2049{
2050 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeCSSNumericValueConstructorGetter>(*state, thisValue, "CSSNumericValue");
2051}
2052
2053#endif
2054
2055#if ENABLE(CSS_TYPED_OM)
2056static inline bool setJSWorkerGlobalScopeCSSNumericValueConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2057{
2058 UNUSED_PARAM(throwScope);
2059 // Shadowing a built-in constructor.
2060 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("CSSNumericValue"), strlen("CSSNumericValue")), value);
2061}
2062
2063bool setJSWorkerGlobalScopeCSSNumericValueConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2064{
2065 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeCSSNumericValueConstructorSetter>(*state, thisValue, encodedValue, "CSSNumericValue");
2066}
2067
2068#endif
2069
2070#if ENABLE(CSS_TYPED_OM)
2071static inline JSValue jsWorkerGlobalScopeCSSStyleValueConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2072{
2073 UNUSED_PARAM(throwScope);
2074 UNUSED_PARAM(state);
2075 return JSTypedOMCSSStyleValue::getConstructor(state.vm(), thisObject.globalObject());
2076}
2077
2078EncodedJSValue jsWorkerGlobalScopeCSSStyleValueConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2079{
2080 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeCSSStyleValueConstructorGetter>(*state, thisValue, "CSSStyleValue");
2081}
2082
2083#endif
2084
2085#if ENABLE(CSS_TYPED_OM)
2086static inline bool setJSWorkerGlobalScopeCSSStyleValueConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2087{
2088 UNUSED_PARAM(throwScope);
2089 // Shadowing a built-in constructor.
2090 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("CSSStyleValue"), strlen("CSSStyleValue")), value);
2091}
2092
2093bool setJSWorkerGlobalScopeCSSStyleValueConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2094{
2095 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeCSSStyleValueConstructorSetter>(*state, thisValue, encodedValue, "CSSStyleValue");
2096}
2097
2098#endif
2099
2100#if ENABLE(CSS_TYPED_OM)
2101static inline JSValue jsWorkerGlobalScopeCSSUnitValueConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2102{
2103 UNUSED_PARAM(throwScope);
2104 UNUSED_PARAM(state);
2105 return JSTypedOMCSSUnitValue::getConstructor(state.vm(), thisObject.globalObject());
2106}
2107
2108EncodedJSValue jsWorkerGlobalScopeCSSUnitValueConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2109{
2110 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeCSSUnitValueConstructorGetter>(*state, thisValue, "CSSUnitValue");
2111}
2112
2113#endif
2114
2115#if ENABLE(CSS_TYPED_OM)
2116static inline bool setJSWorkerGlobalScopeCSSUnitValueConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2117{
2118 UNUSED_PARAM(throwScope);
2119 // Shadowing a built-in constructor.
2120 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("CSSUnitValue"), strlen("CSSUnitValue")), value);
2121}
2122
2123bool setJSWorkerGlobalScopeCSSUnitValueConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2124{
2125 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeCSSUnitValueConstructorSetter>(*state, thisValue, encodedValue, "CSSUnitValue");
2126}
2127
2128#endif
2129
2130#if ENABLE(CSS_TYPED_OM)
2131static inline JSValue jsWorkerGlobalScopeCSSUnparsedValueConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2132{
2133 UNUSED_PARAM(throwScope);
2134 UNUSED_PARAM(state);
2135 return JSTypedOMCSSUnparsedValue::getConstructor(state.vm(), thisObject.globalObject());
2136}
2137
2138EncodedJSValue jsWorkerGlobalScopeCSSUnparsedValueConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2139{
2140 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeCSSUnparsedValueConstructorGetter>(*state, thisValue, "CSSUnparsedValue");
2141}
2142
2143#endif
2144
2145#if ENABLE(CSS_TYPED_OM)
2146static inline bool setJSWorkerGlobalScopeCSSUnparsedValueConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2147{
2148 UNUSED_PARAM(throwScope);
2149 // Shadowing a built-in constructor.
2150 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("CSSUnparsedValue"), strlen("CSSUnparsedValue")), value);
2151}
2152
2153bool setJSWorkerGlobalScopeCSSUnparsedValueConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2154{
2155 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeCSSUnparsedValueConstructorSetter>(*state, thisValue, encodedValue, "CSSUnparsedValue");
2156}
2157
2158#endif
2159
2160static inline JSValue jsWorkerGlobalScopeAbortControllerConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2161{
2162 UNUSED_PARAM(throwScope);
2163 UNUSED_PARAM(state);
2164 return JSAbortController::getConstructor(state.vm(), thisObject.globalObject());
2165}
2166
2167EncodedJSValue jsWorkerGlobalScopeAbortControllerConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2168{
2169 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeAbortControllerConstructorGetter>(*state, thisValue, "AbortController");
2170}
2171
2172static inline bool setJSWorkerGlobalScopeAbortControllerConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2173{
2174 UNUSED_PARAM(throwScope);
2175 // Shadowing a built-in constructor.
2176 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("AbortController"), strlen("AbortController")), value);
2177}
2178
2179bool setJSWorkerGlobalScopeAbortControllerConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2180{
2181 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeAbortControllerConstructorSetter>(*state, thisValue, encodedValue, "AbortController");
2182}
2183
2184static inline JSValue jsWorkerGlobalScopeAbortSignalConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2185{
2186 UNUSED_PARAM(throwScope);
2187 UNUSED_PARAM(state);
2188 return JSAbortSignal::getConstructor(state.vm(), thisObject.globalObject());
2189}
2190
2191EncodedJSValue jsWorkerGlobalScopeAbortSignalConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2192{
2193 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeAbortSignalConstructorGetter>(*state, thisValue, "AbortSignal");
2194}
2195
2196static inline bool setJSWorkerGlobalScopeAbortSignalConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2197{
2198 UNUSED_PARAM(throwScope);
2199 // Shadowing a built-in constructor.
2200 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("AbortSignal"), strlen("AbortSignal")), value);
2201}
2202
2203bool setJSWorkerGlobalScopeAbortSignalConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2204{
2205 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeAbortSignalConstructorSetter>(*state, thisValue, encodedValue, "AbortSignal");
2206}
2207
2208static inline JSValue jsWorkerGlobalScopeCustomEventConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2209{
2210 UNUSED_PARAM(throwScope);
2211 UNUSED_PARAM(state);
2212 return JSCustomEvent::getConstructor(state.vm(), thisObject.globalObject());
2213}
2214
2215EncodedJSValue jsWorkerGlobalScopeCustomEventConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2216{
2217 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeCustomEventConstructorGetter>(*state, thisValue, "CustomEvent");
2218}
2219
2220static inline bool setJSWorkerGlobalScopeCustomEventConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2221{
2222 UNUSED_PARAM(throwScope);
2223 // Shadowing a built-in constructor.
2224 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("CustomEvent"), strlen("CustomEvent")), value);
2225}
2226
2227bool setJSWorkerGlobalScopeCustomEventConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2228{
2229 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeCustomEventConstructorSetter>(*state, thisValue, encodedValue, "CustomEvent");
2230}
2231
2232static inline JSValue jsWorkerGlobalScopeDOMExceptionConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2233{
2234 UNUSED_PARAM(throwScope);
2235 UNUSED_PARAM(state);
2236 return JSDOMException::getConstructor(state.vm(), thisObject.globalObject());
2237}
2238
2239EncodedJSValue jsWorkerGlobalScopeDOMExceptionConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2240{
2241 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeDOMExceptionConstructorGetter>(*state, thisValue, "DOMException");
2242}
2243
2244static inline bool setJSWorkerGlobalScopeDOMExceptionConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2245{
2246 UNUSED_PARAM(throwScope);
2247 // Shadowing a built-in constructor.
2248 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("DOMException"), strlen("DOMException")), value);
2249}
2250
2251bool setJSWorkerGlobalScopeDOMExceptionConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2252{
2253 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeDOMExceptionConstructorSetter>(*state, thisValue, encodedValue, "DOMException");
2254}
2255
2256static inline JSValue jsWorkerGlobalScopeDOMPointConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2257{
2258 UNUSED_PARAM(throwScope);
2259 UNUSED_PARAM(state);
2260 return JSDOMPoint::getConstructor(state.vm(), thisObject.globalObject());
2261}
2262
2263EncodedJSValue jsWorkerGlobalScopeDOMPointConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2264{
2265 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeDOMPointConstructorGetter>(*state, thisValue, "DOMPoint");
2266}
2267
2268static inline bool setJSWorkerGlobalScopeDOMPointConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2269{
2270 UNUSED_PARAM(throwScope);
2271 // Shadowing a built-in constructor.
2272 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("DOMPoint"), strlen("DOMPoint")), value);
2273}
2274
2275bool setJSWorkerGlobalScopeDOMPointConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2276{
2277 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeDOMPointConstructorSetter>(*state, thisValue, encodedValue, "DOMPoint");
2278}
2279
2280static inline JSValue jsWorkerGlobalScopeDOMPointReadOnlyConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2281{
2282 UNUSED_PARAM(throwScope);
2283 UNUSED_PARAM(state);
2284 return JSDOMPointReadOnly::getConstructor(state.vm(), thisObject.globalObject());
2285}
2286
2287EncodedJSValue jsWorkerGlobalScopeDOMPointReadOnlyConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2288{
2289 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeDOMPointReadOnlyConstructorGetter>(*state, thisValue, "DOMPointReadOnly");
2290}
2291
2292static inline bool setJSWorkerGlobalScopeDOMPointReadOnlyConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2293{
2294 UNUSED_PARAM(throwScope);
2295 // Shadowing a built-in constructor.
2296 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("DOMPointReadOnly"), strlen("DOMPointReadOnly")), value);
2297}
2298
2299bool setJSWorkerGlobalScopeDOMPointReadOnlyConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2300{
2301 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeDOMPointReadOnlyConstructorSetter>(*state, thisValue, encodedValue, "DOMPointReadOnly");
2302}
2303
2304static inline JSValue jsWorkerGlobalScopeDOMQuadConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2305{
2306 UNUSED_PARAM(throwScope);
2307 UNUSED_PARAM(state);
2308 return JSDOMQuad::getConstructor(state.vm(), thisObject.globalObject());
2309}
2310
2311EncodedJSValue jsWorkerGlobalScopeDOMQuadConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2312{
2313 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeDOMQuadConstructorGetter>(*state, thisValue, "DOMQuad");
2314}
2315
2316static inline bool setJSWorkerGlobalScopeDOMQuadConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2317{
2318 UNUSED_PARAM(throwScope);
2319 // Shadowing a built-in constructor.
2320 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("DOMQuad"), strlen("DOMQuad")), value);
2321}
2322
2323bool setJSWorkerGlobalScopeDOMQuadConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2324{
2325 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeDOMQuadConstructorSetter>(*state, thisValue, encodedValue, "DOMQuad");
2326}
2327
2328static inline JSValue jsWorkerGlobalScopeDOMRectConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2329{
2330 UNUSED_PARAM(throwScope);
2331 UNUSED_PARAM(state);
2332 return JSDOMRect::getConstructor(state.vm(), thisObject.globalObject());
2333}
2334
2335EncodedJSValue jsWorkerGlobalScopeDOMRectConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2336{
2337 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeDOMRectConstructorGetter>(*state, thisValue, "DOMRect");
2338}
2339
2340static inline bool setJSWorkerGlobalScopeDOMRectConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2341{
2342 UNUSED_PARAM(throwScope);
2343 // Shadowing a built-in constructor.
2344 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("DOMRect"), strlen("DOMRect")), value);
2345}
2346
2347bool setJSWorkerGlobalScopeDOMRectConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2348{
2349 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeDOMRectConstructorSetter>(*state, thisValue, encodedValue, "DOMRect");
2350}
2351
2352static inline JSValue jsWorkerGlobalScopeDOMRectReadOnlyConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2353{
2354 UNUSED_PARAM(throwScope);
2355 UNUSED_PARAM(state);
2356 return JSDOMRectReadOnly::getConstructor(state.vm(), thisObject.globalObject());
2357}
2358
2359EncodedJSValue jsWorkerGlobalScopeDOMRectReadOnlyConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2360{
2361 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeDOMRectReadOnlyConstructorGetter>(*state, thisValue, "DOMRectReadOnly");
2362}
2363
2364static inline bool setJSWorkerGlobalScopeDOMRectReadOnlyConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2365{
2366 UNUSED_PARAM(throwScope);
2367 // Shadowing a built-in constructor.
2368 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("DOMRectReadOnly"), strlen("DOMRectReadOnly")), value);
2369}
2370
2371bool setJSWorkerGlobalScopeDOMRectReadOnlyConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2372{
2373 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeDOMRectReadOnlyConstructorSetter>(*state, thisValue, encodedValue, "DOMRectReadOnly");
2374}
2375
2376static inline JSValue jsWorkerGlobalScopeErrorEventConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2377{
2378 UNUSED_PARAM(throwScope);
2379 UNUSED_PARAM(state);
2380 return JSErrorEvent::getConstructor(state.vm(), thisObject.globalObject());
2381}
2382
2383EncodedJSValue jsWorkerGlobalScopeErrorEventConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2384{
2385 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeErrorEventConstructorGetter>(*state, thisValue, "ErrorEvent");
2386}
2387
2388static inline bool setJSWorkerGlobalScopeErrorEventConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2389{
2390 UNUSED_PARAM(throwScope);
2391 // Shadowing a built-in constructor.
2392 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("ErrorEvent"), strlen("ErrorEvent")), value);
2393}
2394
2395bool setJSWorkerGlobalScopeErrorEventConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2396{
2397 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeErrorEventConstructorSetter>(*state, thisValue, encodedValue, "ErrorEvent");
2398}
2399
2400static inline JSValue jsWorkerGlobalScopeEventConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2401{
2402 UNUSED_PARAM(throwScope);
2403 UNUSED_PARAM(state);
2404 return JSEvent::getConstructor(state.vm(), thisObject.globalObject());
2405}
2406
2407EncodedJSValue jsWorkerGlobalScopeEventConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2408{
2409 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeEventConstructorGetter>(*state, thisValue, "Event");
2410}
2411
2412static inline bool setJSWorkerGlobalScopeEventConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2413{
2414 UNUSED_PARAM(throwScope);
2415 // Shadowing a built-in constructor.
2416 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("Event"), strlen("Event")), value);
2417}
2418
2419bool setJSWorkerGlobalScopeEventConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2420{
2421 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeEventConstructorSetter>(*state, thisValue, encodedValue, "Event");
2422}
2423
2424static inline JSValue jsWorkerGlobalScopeEventTargetConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2425{
2426 UNUSED_PARAM(throwScope);
2427 UNUSED_PARAM(state);
2428 return JSEventTarget::getConstructor(state.vm(), thisObject.globalObject());
2429}
2430
2431EncodedJSValue jsWorkerGlobalScopeEventTargetConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2432{
2433 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeEventTargetConstructorGetter>(*state, thisValue, "EventTarget");
2434}
2435
2436static inline bool setJSWorkerGlobalScopeEventTargetConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2437{
2438 UNUSED_PARAM(throwScope);
2439 // Shadowing a built-in constructor.
2440 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("EventTarget"), strlen("EventTarget")), value);
2441}
2442
2443bool setJSWorkerGlobalScopeEventTargetConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2444{
2445 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeEventTargetConstructorSetter>(*state, thisValue, encodedValue, "EventTarget");
2446}
2447
2448#if ENABLE(CHANNEL_MESSAGING)
2449static inline JSValue jsWorkerGlobalScopeMessageChannelConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2450{
2451 UNUSED_PARAM(throwScope);
2452 UNUSED_PARAM(state);
2453 return JSMessageChannel::getConstructor(state.vm(), thisObject.globalObject());
2454}
2455
2456EncodedJSValue jsWorkerGlobalScopeMessageChannelConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2457{
2458 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeMessageChannelConstructorGetter>(*state, thisValue, "MessageChannel");
2459}
2460
2461#endif
2462
2463#if ENABLE(CHANNEL_MESSAGING)
2464static inline bool setJSWorkerGlobalScopeMessageChannelConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2465{
2466 UNUSED_PARAM(throwScope);
2467 // Shadowing a built-in constructor.
2468 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("MessageChannel"), strlen("MessageChannel")), value);
2469}
2470
2471bool setJSWorkerGlobalScopeMessageChannelConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2472{
2473 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeMessageChannelConstructorSetter>(*state, thisValue, encodedValue, "MessageChannel");
2474}
2475
2476#endif
2477
2478static inline JSValue jsWorkerGlobalScopeMessageEventConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2479{
2480 UNUSED_PARAM(throwScope);
2481 UNUSED_PARAM(state);
2482 return JSMessageEvent::getConstructor(state.vm(), thisObject.globalObject());
2483}
2484
2485EncodedJSValue jsWorkerGlobalScopeMessageEventConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2486{
2487 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeMessageEventConstructorGetter>(*state, thisValue, "MessageEvent");
2488}
2489
2490static inline bool setJSWorkerGlobalScopeMessageEventConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2491{
2492 UNUSED_PARAM(throwScope);
2493 // Shadowing a built-in constructor.
2494 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("MessageEvent"), strlen("MessageEvent")), value);
2495}
2496
2497bool setJSWorkerGlobalScopeMessageEventConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2498{
2499 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeMessageEventConstructorSetter>(*state, thisValue, encodedValue, "MessageEvent");
2500}
2501
2502static inline JSValue jsWorkerGlobalScopeMessagePortConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2503{
2504 UNUSED_PARAM(throwScope);
2505 UNUSED_PARAM(state);
2506 return JSMessagePort::getConstructor(state.vm(), thisObject.globalObject());
2507}
2508
2509EncodedJSValue jsWorkerGlobalScopeMessagePortConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2510{
2511 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeMessagePortConstructorGetter>(*state, thisValue, "MessagePort");
2512}
2513
2514static inline bool setJSWorkerGlobalScopeMessagePortConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2515{
2516 UNUSED_PARAM(throwScope);
2517 // Shadowing a built-in constructor.
2518 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("MessagePort"), strlen("MessagePort")), value);
2519}
2520
2521bool setJSWorkerGlobalScopeMessagePortConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2522{
2523 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeMessagePortConstructorSetter>(*state, thisValue, encodedValue, "MessagePort");
2524}
2525
2526static inline JSValue jsWorkerGlobalScopeProgressEventConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2527{
2528 UNUSED_PARAM(throwScope);
2529 UNUSED_PARAM(state);
2530 return JSProgressEvent::getConstructor(state.vm(), thisObject.globalObject());
2531}
2532
2533EncodedJSValue jsWorkerGlobalScopeProgressEventConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2534{
2535 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeProgressEventConstructorGetter>(*state, thisValue, "ProgressEvent");
2536}
2537
2538static inline bool setJSWorkerGlobalScopeProgressEventConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2539{
2540 UNUSED_PARAM(throwScope);
2541 // Shadowing a built-in constructor.
2542 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("ProgressEvent"), strlen("ProgressEvent")), value);
2543}
2544
2545bool setJSWorkerGlobalScopeProgressEventConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2546{
2547 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeProgressEventConstructorSetter>(*state, thisValue, encodedValue, "ProgressEvent");
2548}
2549
2550static inline JSValue jsWorkerGlobalScopePromiseRejectionEventConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2551{
2552 UNUSED_PARAM(throwScope);
2553 UNUSED_PARAM(state);
2554 return JSPromiseRejectionEvent::getConstructor(state.vm(), thisObject.globalObject());
2555}
2556
2557EncodedJSValue jsWorkerGlobalScopePromiseRejectionEventConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2558{
2559 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopePromiseRejectionEventConstructorGetter>(*state, thisValue, "PromiseRejectionEvent");
2560}
2561
2562static inline bool setJSWorkerGlobalScopePromiseRejectionEventConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2563{
2564 UNUSED_PARAM(throwScope);
2565 // Shadowing a built-in constructor.
2566 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("PromiseRejectionEvent"), strlen("PromiseRejectionEvent")), value);
2567}
2568
2569bool setJSWorkerGlobalScopePromiseRejectionEventConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2570{
2571 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopePromiseRejectionEventConstructorSetter>(*state, thisValue, encodedValue, "PromiseRejectionEvent");
2572}
2573
2574static inline JSValue jsWorkerGlobalScopeTextDecoderConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2575{
2576 UNUSED_PARAM(throwScope);
2577 UNUSED_PARAM(state);
2578 return JSTextDecoder::getConstructor(state.vm(), thisObject.globalObject());
2579}
2580
2581EncodedJSValue jsWorkerGlobalScopeTextDecoderConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2582{
2583 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeTextDecoderConstructorGetter>(*state, thisValue, "TextDecoder");
2584}
2585
2586static inline bool setJSWorkerGlobalScopeTextDecoderConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2587{
2588 UNUSED_PARAM(throwScope);
2589 // Shadowing a built-in constructor.
2590 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("TextDecoder"), strlen("TextDecoder")), value);
2591}
2592
2593bool setJSWorkerGlobalScopeTextDecoderConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2594{
2595 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeTextDecoderConstructorSetter>(*state, thisValue, encodedValue, "TextDecoder");
2596}
2597
2598static inline JSValue jsWorkerGlobalScopeTextEncoderConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2599{
2600 UNUSED_PARAM(throwScope);
2601 UNUSED_PARAM(state);
2602 return JSTextEncoder::getConstructor(state.vm(), thisObject.globalObject());
2603}
2604
2605EncodedJSValue jsWorkerGlobalScopeTextEncoderConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2606{
2607 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeTextEncoderConstructorGetter>(*state, thisValue, "TextEncoder");
2608}
2609
2610static inline bool setJSWorkerGlobalScopeTextEncoderConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2611{
2612 UNUSED_PARAM(throwScope);
2613 // Shadowing a built-in constructor.
2614 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("TextEncoder"), strlen("TextEncoder")), value);
2615}
2616
2617bool setJSWorkerGlobalScopeTextEncoderConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2618{
2619 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeTextEncoderConstructorSetter>(*state, thisValue, encodedValue, "TextEncoder");
2620}
2621
2622static inline JSValue jsWorkerGlobalScopeBlobConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2623{
2624 UNUSED_PARAM(throwScope);
2625 UNUSED_PARAM(state);
2626 return JSBlob::getConstructor(state.vm(), thisObject.globalObject());
2627}
2628
2629EncodedJSValue jsWorkerGlobalScopeBlobConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2630{
2631 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeBlobConstructorGetter>(*state, thisValue, "Blob");
2632}
2633
2634static inline bool setJSWorkerGlobalScopeBlobConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2635{
2636 UNUSED_PARAM(throwScope);
2637 // Shadowing a built-in constructor.
2638 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("Blob"), strlen("Blob")), value);
2639}
2640
2641bool setJSWorkerGlobalScopeBlobConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2642{
2643 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeBlobConstructorSetter>(*state, thisValue, encodedValue, "Blob");
2644}
2645
2646static inline JSValue jsWorkerGlobalScopeFileReaderConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2647{
2648 UNUSED_PARAM(throwScope);
2649 UNUSED_PARAM(state);
2650 return JSFileReader::getConstructor(state.vm(), thisObject.globalObject());
2651}
2652
2653EncodedJSValue jsWorkerGlobalScopeFileReaderConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2654{
2655 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeFileReaderConstructorGetter>(*state, thisValue, "FileReader");
2656}
2657
2658static inline bool setJSWorkerGlobalScopeFileReaderConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2659{
2660 UNUSED_PARAM(throwScope);
2661 // Shadowing a built-in constructor.
2662 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("FileReader"), strlen("FileReader")), value);
2663}
2664
2665bool setJSWorkerGlobalScopeFileReaderConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2666{
2667 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeFileReaderConstructorSetter>(*state, thisValue, encodedValue, "FileReader");
2668}
2669
2670static inline JSValue jsWorkerGlobalScopeFileReaderSyncConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2671{
2672 UNUSED_PARAM(throwScope);
2673 UNUSED_PARAM(state);
2674 return JSFileReaderSync::getConstructor(state.vm(), thisObject.globalObject());
2675}
2676
2677EncodedJSValue jsWorkerGlobalScopeFileReaderSyncConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2678{
2679 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeFileReaderSyncConstructorGetter>(*state, thisValue, "FileReaderSync");
2680}
2681
2682static inline bool setJSWorkerGlobalScopeFileReaderSyncConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2683{
2684 UNUSED_PARAM(throwScope);
2685 // Shadowing a built-in constructor.
2686 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("FileReaderSync"), strlen("FileReaderSync")), value);
2687}
2688
2689bool setJSWorkerGlobalScopeFileReaderSyncConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2690{
2691 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeFileReaderSyncConstructorSetter>(*state, thisValue, encodedValue, "FileReaderSync");
2692}
2693
2694static inline JSValue jsWorkerGlobalScopeURLConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2695{
2696 UNUSED_PARAM(throwScope);
2697 UNUSED_PARAM(state);
2698 return JSDOMURL::getConstructor(state.vm(), thisObject.globalObject());
2699}
2700
2701EncodedJSValue jsWorkerGlobalScopeURLConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2702{
2703 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeURLConstructorGetter>(*state, thisValue, "URL");
2704}
2705
2706static inline bool setJSWorkerGlobalScopeURLConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2707{
2708 UNUSED_PARAM(throwScope);
2709 // Shadowing a built-in constructor.
2710 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("URL"), strlen("URL")), value);
2711}
2712
2713bool setJSWorkerGlobalScopeURLConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2714{
2715 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeURLConstructorSetter>(*state, thisValue, encodedValue, "URL");
2716}
2717
2718static inline JSValue jsWorkerGlobalScopeImageBitmapConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2719{
2720 UNUSED_PARAM(throwScope);
2721 UNUSED_PARAM(state);
2722 return JSImageBitmap::getConstructor(state.vm(), thisObject.globalObject());
2723}
2724
2725EncodedJSValue jsWorkerGlobalScopeImageBitmapConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2726{
2727 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeImageBitmapConstructorGetter>(*state, thisValue, "ImageBitmap");
2728}
2729
2730static inline bool setJSWorkerGlobalScopeImageBitmapConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2731{
2732 UNUSED_PARAM(throwScope);
2733 // Shadowing a built-in constructor.
2734 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("ImageBitmap"), strlen("ImageBitmap")), value);
2735}
2736
2737bool setJSWorkerGlobalScopeImageBitmapConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2738{
2739 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeImageBitmapConstructorSetter>(*state, thisValue, encodedValue, "ImageBitmap");
2740}
2741
2742static inline JSValue jsWorkerGlobalScopeImageDataConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2743{
2744 UNUSED_PARAM(throwScope);
2745 UNUSED_PARAM(state);
2746 return JSImageData::getConstructor(state.vm(), thisObject.globalObject());
2747}
2748
2749EncodedJSValue jsWorkerGlobalScopeImageDataConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2750{
2751 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeImageDataConstructorGetter>(*state, thisValue, "ImageData");
2752}
2753
2754static inline bool setJSWorkerGlobalScopeImageDataConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2755{
2756 UNUSED_PARAM(throwScope);
2757 // Shadowing a built-in constructor.
2758 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("ImageData"), strlen("ImageData")), value);
2759}
2760
2761bool setJSWorkerGlobalScopeImageDataConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2762{
2763 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeImageDataConstructorSetter>(*state, thisValue, encodedValue, "ImageData");
2764}
2765
2766static inline JSValue jsWorkerGlobalScopeURLSearchParamsConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2767{
2768 UNUSED_PARAM(throwScope);
2769 UNUSED_PARAM(state);
2770 return JSURLSearchParams::getConstructor(state.vm(), thisObject.globalObject());
2771}
2772
2773EncodedJSValue jsWorkerGlobalScopeURLSearchParamsConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2774{
2775 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeURLSearchParamsConstructorGetter>(*state, thisValue, "URLSearchParams");
2776}
2777
2778static inline bool setJSWorkerGlobalScopeURLSearchParamsConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2779{
2780 UNUSED_PARAM(throwScope);
2781 // Shadowing a built-in constructor.
2782 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("URLSearchParams"), strlen("URLSearchParams")), value);
2783}
2784
2785bool setJSWorkerGlobalScopeURLSearchParamsConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2786{
2787 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeURLSearchParamsConstructorSetter>(*state, thisValue, encodedValue, "URLSearchParams");
2788}
2789
2790static inline JSValue jsWorkerGlobalScopeCanvasGradientConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2791{
2792 UNUSED_PARAM(throwScope);
2793 UNUSED_PARAM(state);
2794 return JSCanvasGradient::getConstructor(state.vm(), thisObject.globalObject());
2795}
2796
2797EncodedJSValue jsWorkerGlobalScopeCanvasGradientConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2798{
2799 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeCanvasGradientConstructorGetter>(*state, thisValue, "CanvasGradient");
2800}
2801
2802static inline bool setJSWorkerGlobalScopeCanvasGradientConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2803{
2804 UNUSED_PARAM(throwScope);
2805 // Shadowing a built-in constructor.
2806 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("CanvasGradient"), strlen("CanvasGradient")), value);
2807}
2808
2809bool setJSWorkerGlobalScopeCanvasGradientConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2810{
2811 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeCanvasGradientConstructorSetter>(*state, thisValue, encodedValue, "CanvasGradient");
2812}
2813
2814static inline JSValue jsWorkerGlobalScopeCanvasPatternConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2815{
2816 UNUSED_PARAM(throwScope);
2817 UNUSED_PARAM(state);
2818 return JSCanvasPattern::getConstructor(state.vm(), thisObject.globalObject());
2819}
2820
2821EncodedJSValue jsWorkerGlobalScopeCanvasPatternConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2822{
2823 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeCanvasPatternConstructorGetter>(*state, thisValue, "CanvasPattern");
2824}
2825
2826static inline bool setJSWorkerGlobalScopeCanvasPatternConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2827{
2828 UNUSED_PARAM(throwScope);
2829 // Shadowing a built-in constructor.
2830 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("CanvasPattern"), strlen("CanvasPattern")), value);
2831}
2832
2833bool setJSWorkerGlobalScopeCanvasPatternConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2834{
2835 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeCanvasPatternConstructorSetter>(*state, thisValue, encodedValue, "CanvasPattern");
2836}
2837
2838static inline JSValue jsWorkerGlobalScopePath2DConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2839{
2840 UNUSED_PARAM(throwScope);
2841 UNUSED_PARAM(state);
2842 return JSPath2D::getConstructor(state.vm(), thisObject.globalObject());
2843}
2844
2845EncodedJSValue jsWorkerGlobalScopePath2DConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2846{
2847 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopePath2DConstructorGetter>(*state, thisValue, "Path2D");
2848}
2849
2850static inline bool setJSWorkerGlobalScopePath2DConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2851{
2852 UNUSED_PARAM(throwScope);
2853 // Shadowing a built-in constructor.
2854 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("Path2D"), strlen("Path2D")), value);
2855}
2856
2857bool setJSWorkerGlobalScopePath2DConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2858{
2859 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopePath2DConstructorSetter>(*state, thisValue, encodedValue, "Path2D");
2860}
2861
2862static inline JSValue jsWorkerGlobalScopeCryptoConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2863{
2864 UNUSED_PARAM(throwScope);
2865 UNUSED_PARAM(state);
2866 return JSCrypto::getConstructor(state.vm(), thisObject.globalObject());
2867}
2868
2869EncodedJSValue jsWorkerGlobalScopeCryptoConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2870{
2871 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeCryptoConstructorGetter>(*state, thisValue, "Crypto");
2872}
2873
2874static inline bool setJSWorkerGlobalScopeCryptoConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2875{
2876 UNUSED_PARAM(throwScope);
2877 // Shadowing a built-in constructor.
2878 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("Crypto"), strlen("Crypto")), value);
2879}
2880
2881bool setJSWorkerGlobalScopeCryptoConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2882{
2883 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeCryptoConstructorSetter>(*state, thisValue, encodedValue, "Crypto");
2884}
2885
2886static inline JSValue jsWorkerGlobalScopeEventSourceConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2887{
2888 UNUSED_PARAM(throwScope);
2889 UNUSED_PARAM(state);
2890 return JSEventSource::getConstructor(state.vm(), thisObject.globalObject());
2891}
2892
2893EncodedJSValue jsWorkerGlobalScopeEventSourceConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2894{
2895 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeEventSourceConstructorGetter>(*state, thisValue, "EventSource");
2896}
2897
2898static inline bool setJSWorkerGlobalScopeEventSourceConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2899{
2900 UNUSED_PARAM(throwScope);
2901 // Shadowing a built-in constructor.
2902 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("EventSource"), strlen("EventSource")), value);
2903}
2904
2905bool setJSWorkerGlobalScopeEventSourceConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2906{
2907 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeEventSourceConstructorSetter>(*state, thisValue, encodedValue, "EventSource");
2908}
2909
2910static inline JSValue jsWorkerGlobalScopePerformanceConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2911{
2912 UNUSED_PARAM(throwScope);
2913 UNUSED_PARAM(state);
2914 return JSPerformance::getConstructor(state.vm(), thisObject.globalObject());
2915}
2916
2917EncodedJSValue jsWorkerGlobalScopePerformanceConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2918{
2919 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopePerformanceConstructorGetter>(*state, thisValue, "Performance");
2920}
2921
2922static inline bool setJSWorkerGlobalScopePerformanceConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2923{
2924 UNUSED_PARAM(throwScope);
2925 // Shadowing a built-in constructor.
2926 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("Performance"), strlen("Performance")), value);
2927}
2928
2929bool setJSWorkerGlobalScopePerformanceConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2930{
2931 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopePerformanceConstructorSetter>(*state, thisValue, encodedValue, "Performance");
2932}
2933
2934static inline JSValue jsWorkerGlobalScopePerformanceEntryConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2935{
2936 UNUSED_PARAM(throwScope);
2937 UNUSED_PARAM(state);
2938 return JSPerformanceEntry::getConstructor(state.vm(), thisObject.globalObject());
2939}
2940
2941EncodedJSValue jsWorkerGlobalScopePerformanceEntryConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2942{
2943 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopePerformanceEntryConstructorGetter>(*state, thisValue, "PerformanceEntry");
2944}
2945
2946static inline bool setJSWorkerGlobalScopePerformanceEntryConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2947{
2948 UNUSED_PARAM(throwScope);
2949 // Shadowing a built-in constructor.
2950 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("PerformanceEntry"), strlen("PerformanceEntry")), value);
2951}
2952
2953bool setJSWorkerGlobalScopePerformanceEntryConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2954{
2955 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopePerformanceEntryConstructorSetter>(*state, thisValue, encodedValue, "PerformanceEntry");
2956}
2957
2958static inline JSValue jsWorkerGlobalScopePerformanceMarkConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2959{
2960 UNUSED_PARAM(throwScope);
2961 UNUSED_PARAM(state);
2962 return JSPerformanceMark::getConstructor(state.vm(), thisObject.globalObject());
2963}
2964
2965EncodedJSValue jsWorkerGlobalScopePerformanceMarkConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2966{
2967 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopePerformanceMarkConstructorGetter>(*state, thisValue, "PerformanceMark");
2968}
2969
2970static inline bool setJSWorkerGlobalScopePerformanceMarkConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2971{
2972 UNUSED_PARAM(throwScope);
2973 // Shadowing a built-in constructor.
2974 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("PerformanceMark"), strlen("PerformanceMark")), value);
2975}
2976
2977bool setJSWorkerGlobalScopePerformanceMarkConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2978{
2979 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopePerformanceMarkConstructorSetter>(*state, thisValue, encodedValue, "PerformanceMark");
2980}
2981
2982static inline JSValue jsWorkerGlobalScopePerformanceMeasureConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
2983{
2984 UNUSED_PARAM(throwScope);
2985 UNUSED_PARAM(state);
2986 return JSPerformanceMeasure::getConstructor(state.vm(), thisObject.globalObject());
2987}
2988
2989EncodedJSValue jsWorkerGlobalScopePerformanceMeasureConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2990{
2991 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopePerformanceMeasureConstructorGetter>(*state, thisValue, "PerformanceMeasure");
2992}
2993
2994static inline bool setJSWorkerGlobalScopePerformanceMeasureConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
2995{
2996 UNUSED_PARAM(throwScope);
2997 // Shadowing a built-in constructor.
2998 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("PerformanceMeasure"), strlen("PerformanceMeasure")), value);
2999}
3000
3001bool setJSWorkerGlobalScopePerformanceMeasureConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3002{
3003 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopePerformanceMeasureConstructorSetter>(*state, thisValue, encodedValue, "PerformanceMeasure");
3004}
3005
3006static inline JSValue jsWorkerGlobalScopePerformanceObserverConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
3007{
3008 UNUSED_PARAM(throwScope);
3009 UNUSED_PARAM(state);
3010 return JSPerformanceObserver::getConstructor(state.vm(), thisObject.globalObject());
3011}
3012
3013EncodedJSValue jsWorkerGlobalScopePerformanceObserverConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
3014{
3015 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopePerformanceObserverConstructorGetter>(*state, thisValue, "PerformanceObserver");
3016}
3017
3018static inline bool setJSWorkerGlobalScopePerformanceObserverConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
3019{
3020 UNUSED_PARAM(throwScope);
3021 // Shadowing a built-in constructor.
3022 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("PerformanceObserver"), strlen("PerformanceObserver")), value);
3023}
3024
3025bool setJSWorkerGlobalScopePerformanceObserverConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3026{
3027 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopePerformanceObserverConstructorSetter>(*state, thisValue, encodedValue, "PerformanceObserver");
3028}
3029
3030static inline JSValue jsWorkerGlobalScopePerformanceObserverEntryListConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
3031{
3032 UNUSED_PARAM(throwScope);
3033 UNUSED_PARAM(state);
3034 return JSPerformanceObserverEntryList::getConstructor(state.vm(), thisObject.globalObject());
3035}
3036
3037EncodedJSValue jsWorkerGlobalScopePerformanceObserverEntryListConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
3038{
3039 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopePerformanceObserverEntryListConstructorGetter>(*state, thisValue, "PerformanceObserverEntryList");
3040}
3041
3042static inline bool setJSWorkerGlobalScopePerformanceObserverEntryListConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
3043{
3044 UNUSED_PARAM(throwScope);
3045 // Shadowing a built-in constructor.
3046 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("PerformanceObserverEntryList"), strlen("PerformanceObserverEntryList")), value);
3047}
3048
3049bool setJSWorkerGlobalScopePerformanceObserverEntryListConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3050{
3051 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopePerformanceObserverEntryListConstructorSetter>(*state, thisValue, encodedValue, "PerformanceObserverEntryList");
3052}
3053
3054static inline JSValue jsWorkerGlobalScopePerformanceResourceTimingConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
3055{
3056 UNUSED_PARAM(throwScope);
3057 UNUSED_PARAM(state);
3058 return JSPerformanceResourceTiming::getConstructor(state.vm(), thisObject.globalObject());
3059}
3060
3061EncodedJSValue jsWorkerGlobalScopePerformanceResourceTimingConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
3062{
3063 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopePerformanceResourceTimingConstructorGetter>(*state, thisValue, "PerformanceResourceTiming");
3064}
3065
3066static inline bool setJSWorkerGlobalScopePerformanceResourceTimingConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
3067{
3068 UNUSED_PARAM(throwScope);
3069 // Shadowing a built-in constructor.
3070 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("PerformanceResourceTiming"), strlen("PerformanceResourceTiming")), value);
3071}
3072
3073bool setJSWorkerGlobalScopePerformanceResourceTimingConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3074{
3075 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopePerformanceResourceTimingConstructorSetter>(*state, thisValue, encodedValue, "PerformanceResourceTiming");
3076}
3077
3078static inline JSValue jsWorkerGlobalScopePerformanceServerTimingConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
3079{
3080 UNUSED_PARAM(throwScope);
3081 UNUSED_PARAM(state);
3082 return JSPerformanceServerTiming::getConstructor(state.vm(), thisObject.globalObject());
3083}
3084
3085EncodedJSValue jsWorkerGlobalScopePerformanceServerTimingConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
3086{
3087 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopePerformanceServerTimingConstructorGetter>(*state, thisValue, "PerformanceServerTiming");
3088}
3089
3090static inline bool setJSWorkerGlobalScopePerformanceServerTimingConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
3091{
3092 UNUSED_PARAM(throwScope);
3093 // Shadowing a built-in constructor.
3094 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("PerformanceServerTiming"), strlen("PerformanceServerTiming")), value);
3095}
3096
3097bool setJSWorkerGlobalScopePerformanceServerTimingConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3098{
3099 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopePerformanceServerTimingConstructorSetter>(*state, thisValue, encodedValue, "PerformanceServerTiming");
3100}
3101
3102static inline JSValue jsWorkerGlobalScopeWorkerNavigatorConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
3103{
3104 UNUSED_PARAM(throwScope);
3105 UNUSED_PARAM(state);
3106 return JSWorkerNavigator::getConstructor(state.vm(), thisObject.globalObject());
3107}
3108
3109EncodedJSValue jsWorkerGlobalScopeWorkerNavigatorConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
3110{
3111 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeWorkerNavigatorConstructorGetter>(*state, thisValue, "WorkerNavigator");
3112}
3113
3114static inline bool setJSWorkerGlobalScopeWorkerNavigatorConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
3115{
3116 UNUSED_PARAM(throwScope);
3117 // Shadowing a built-in constructor.
3118 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("WorkerNavigator"), strlen("WorkerNavigator")), value);
3119}
3120
3121bool setJSWorkerGlobalScopeWorkerNavigatorConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3122{
3123 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeWorkerNavigatorConstructorSetter>(*state, thisValue, encodedValue, "WorkerNavigator");
3124}
3125
3126static inline JSValue jsWorkerGlobalScopeWorkerGlobalScopeConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
3127{
3128 UNUSED_PARAM(throwScope);
3129 UNUSED_PARAM(state);
3130 return JSWorkerGlobalScope::getConstructor(state.vm(), thisObject.globalObject());
3131}
3132
3133EncodedJSValue jsWorkerGlobalScopeWorkerGlobalScopeConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
3134{
3135 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeWorkerGlobalScopeConstructorGetter>(*state, thisValue, "WorkerGlobalScope");
3136}
3137
3138static inline bool setJSWorkerGlobalScopeWorkerGlobalScopeConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
3139{
3140 UNUSED_PARAM(throwScope);
3141 // Shadowing a built-in constructor.
3142 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("WorkerGlobalScope"), strlen("WorkerGlobalScope")), value);
3143}
3144
3145bool setJSWorkerGlobalScopeWorkerGlobalScopeConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3146{
3147 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeWorkerGlobalScopeConstructorSetter>(*state, thisValue, encodedValue, "WorkerGlobalScope");
3148}
3149
3150static inline JSValue jsWorkerGlobalScopeWorkerLocationConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
3151{
3152 UNUSED_PARAM(throwScope);
3153 UNUSED_PARAM(state);
3154 return JSWorkerLocation::getConstructor(state.vm(), thisObject.globalObject());
3155}
3156
3157EncodedJSValue jsWorkerGlobalScopeWorkerLocationConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
3158{
3159 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeWorkerLocationConstructorGetter>(*state, thisValue, "WorkerLocation");
3160}
3161
3162static inline bool setJSWorkerGlobalScopeWorkerLocationConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
3163{
3164 UNUSED_PARAM(throwScope);
3165 // Shadowing a built-in constructor.
3166 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("WorkerLocation"), strlen("WorkerLocation")), value);
3167}
3168
3169bool setJSWorkerGlobalScopeWorkerLocationConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3170{
3171 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeWorkerLocationConstructorSetter>(*state, thisValue, encodedValue, "WorkerLocation");
3172}
3173
3174static inline JSValue jsWorkerGlobalScopeXMLHttpRequestEventTargetConstructorGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
3175{
3176 UNUSED_PARAM(throwScope);
3177 UNUSED_PARAM(state);
3178 return JSXMLHttpRequestEventTarget::getConstructor(state.vm(), thisObject.globalObject());
3179}
3180
3181EncodedJSValue jsWorkerGlobalScopeXMLHttpRequestEventTargetConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
3182{
3183 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeXMLHttpRequestEventTargetConstructorGetter>(*state, thisValue, "XMLHttpRequestEventTarget");
3184}
3185
3186static inline bool setJSWorkerGlobalScopeXMLHttpRequestEventTargetConstructorSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
3187{
3188 UNUSED_PARAM(throwScope);
3189 // Shadowing a built-in constructor.
3190 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("XMLHttpRequestEventTarget"), strlen("XMLHttpRequestEventTarget")), value);
3191}
3192
3193bool setJSWorkerGlobalScopeXMLHttpRequestEventTargetConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3194{
3195 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeXMLHttpRequestEventTargetConstructorSetter>(*state, thisValue, encodedValue, "XMLHttpRequestEventTarget");
3196}
3197
3198static inline JSValue jsWorkerGlobalScopeCachesGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
3199{
3200 UNUSED_PARAM(throwScope);
3201 UNUSED_PARAM(state);
3202 auto& impl = thisObject.wrapped();
3203 JSValue result = toJS<IDLInterface<DOMCacheStorage>>(state, *thisObject.globalObject(), throwScope, WebCore::WorkerGlobalScopeCaches::caches(impl));
3204 return result;
3205}
3206
3207EncodedJSValue jsWorkerGlobalScopeCaches(ExecState* state, EncodedJSValue thisValue, PropertyName)
3208{
3209 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeCachesGetter>(*state, thisValue, "caches");
3210}
3211
3212#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
3213static inline JSValue jsWorkerGlobalScopeIndexedDBGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
3214{
3215 UNUSED_PARAM(throwScope);
3216 UNUSED_PARAM(state);
3217 auto& impl = thisObject.wrapped();
3218 JSValue result = toJS<IDLInterface<IDBFactory>>(state, *thisObject.globalObject(), throwScope, WebCore::WorkerGlobalScopeIndexedDatabase::indexedDB(impl));
3219 return result;
3220}
3221
3222EncodedJSValue jsWorkerGlobalScopeIndexedDB(ExecState* state, EncodedJSValue thisValue, PropertyName)
3223{
3224 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeIndexedDBGetter>(*state, thisValue, "indexedDB");
3225}
3226
3227#endif
3228
3229static inline JSValue jsWorkerGlobalScopeCryptoGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
3230{
3231 UNUSED_PARAM(throwScope);
3232 UNUSED_PARAM(state);
3233 auto& impl = thisObject.wrapped();
3234 JSValue result = toJS<IDLInterface<Crypto>>(state, *thisObject.globalObject(), throwScope, impl.crypto());
3235 return result;
3236}
3237
3238EncodedJSValue jsWorkerGlobalScopeCrypto(ExecState* state, EncodedJSValue thisValue, PropertyName)
3239{
3240 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeCryptoGetter>(*state, thisValue, "crypto");
3241}
3242
3243static inline JSValue jsWorkerGlobalScopePerformanceGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
3244{
3245 UNUSED_PARAM(throwScope);
3246 UNUSED_PARAM(state);
3247 auto& impl = thisObject.wrapped();
3248 JSValue result = toJS<IDLInterface<Performance>>(state, *thisObject.globalObject(), throwScope, impl.performance());
3249 return result;
3250}
3251
3252EncodedJSValue jsWorkerGlobalScopePerformance(ExecState* state, EncodedJSValue thisValue, PropertyName)
3253{
3254 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopePerformanceGetter>(*state, thisValue, "performance");
3255}
3256
3257static inline bool setJSWorkerGlobalScopePerformanceSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
3258{
3259 UNUSED_PARAM(throwScope);
3260 // Shadowing a built-in property.
3261 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("performance"), strlen("performance")), value);
3262}
3263
3264bool setJSWorkerGlobalScopePerformance(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3265{
3266 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopePerformanceSetter>(*state, thisValue, encodedValue, "performance");
3267}
3268
3269static inline JSValue jsWorkerGlobalScopeOriginGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
3270{
3271 UNUSED_PARAM(throwScope);
3272 UNUSED_PARAM(state);
3273 auto& impl = thisObject.wrapped();
3274 JSValue result = toJS<IDLUSVString>(state, throwScope, impl.origin());
3275 return result;
3276}
3277
3278EncodedJSValue jsWorkerGlobalScopeOrigin(ExecState* state, EncodedJSValue thisValue, PropertyName)
3279{
3280 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeOriginGetter>(*state, thisValue, "origin");
3281}
3282
3283static inline bool setJSWorkerGlobalScopeOriginSetter(ExecState& state, JSWorkerGlobalScope& thisObject, JSValue value, ThrowScope& throwScope)
3284{
3285 UNUSED_PARAM(throwScope);
3286 // Shadowing a built-in property.
3287 return thisObject.putDirect(state.vm(), Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("origin"), strlen("origin")), value);
3288}
3289
3290bool setJSWorkerGlobalScopeOrigin(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3291{
3292 return IDLAttribute<JSWorkerGlobalScope>::set<setJSWorkerGlobalScopeOriginSetter>(*state, thisValue, encodedValue, "origin");
3293}
3294
3295static inline JSValue jsWorkerGlobalScopeIsSecureContextGetter(ExecState& state, JSWorkerGlobalScope& thisObject, ThrowScope& throwScope)
3296{
3297 UNUSED_PARAM(throwScope);
3298 UNUSED_PARAM(state);
3299 auto& impl = thisObject.wrapped();
3300 JSValue result = toJS<IDLBoolean>(state, throwScope, impl.isSecureContext());
3301 return result;
3302}
3303
3304EncodedJSValue jsWorkerGlobalScopeIsSecureContext(ExecState* state, EncodedJSValue thisValue, PropertyName)
3305{
3306 return IDLAttribute<JSWorkerGlobalScope>::get<jsWorkerGlobalScopeIsSecureContextGetter>(*state, thisValue, "isSecureContext");
3307}
3308
3309static inline JSC::EncodedJSValue jsWorkerGlobalScopePrototypeFunctionImportScriptsBody(JSC::ExecState* state, typename IDLOperation<JSWorkerGlobalScope>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
3310{
3311 UNUSED_PARAM(state);
3312 UNUSED_PARAM(throwScope);
3313 auto& impl = castedThis->wrapped();
3314 auto urls = convertVariadicArguments<IDLUSVString>(*state, 0);
3315 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
3316 propagateException(*state, throwScope, impl.importScripts(WTFMove(urls)));
3317 return JSValue::encode(jsUndefined());
3318}
3319
3320EncodedJSValue JSC_HOST_CALL jsWorkerGlobalScopePrototypeFunctionImportScripts(ExecState* state)
3321{
3322 return IDLOperation<JSWorkerGlobalScope>::call<jsWorkerGlobalScopePrototypeFunctionImportScriptsBody>(*state, "importScripts");
3323}
3324
3325static inline JSC::EncodedJSValue jsWorkerGlobalScopePrototypeFunctionFetchBody(JSC::ExecState* state, typename IDLOperationReturningPromise<JSWorkerGlobalScope>::ClassParameter castedThis, Ref<DeferredPromise>&& promise, JSC::ThrowScope& throwScope)
3326{
3327 UNUSED_PARAM(state);
3328 UNUSED_PARAM(throwScope);
3329 auto& impl = castedThis->wrapped();
3330 if (UNLIKELY(state->argumentCount() < 1))
3331 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
3332 auto input = convert<IDLUnion<IDLInterface<FetchRequest>, IDLUSVString>>(*state, state->uncheckedArgument(0));
3333 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
3334 auto init = convert<IDLDictionary<FetchRequestInit>>(*state, state->argument(1));
3335 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
3336 WebCore::WorkerGlobalScopeFetch::fetch(impl, WTFMove(input), WTFMove(init), WTFMove(promise));
3337 return JSValue::encode(jsUndefined());
3338}
3339
3340EncodedJSValue JSC_HOST_CALL jsWorkerGlobalScopePrototypeFunctionFetch(ExecState* state)
3341{
3342 return IDLOperationReturningPromise<JSWorkerGlobalScope>::call<jsWorkerGlobalScopePrototypeFunctionFetchBody, PromiseExecutionScope::WindowOrWorker>(*state, "fetch");
3343}
3344
3345static inline JSC::EncodedJSValue jsWorkerGlobalScopePrototypeFunctionSetTimeoutBody(JSC::ExecState* state, typename IDLOperation<JSWorkerGlobalScope>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
3346{
3347 UNUSED_PARAM(state);
3348 UNUSED_PARAM(throwScope);
3349 auto& impl = castedThis->wrapped();
3350 if (UNLIKELY(state->argumentCount() < 1))
3351 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
3352 auto handler = convert<IDLScheduledAction>(*state, state->uncheckedArgument(0), *castedThis->globalObject());
3353 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
3354 auto timeout = convert<IDLLong>(*state, state->argument(1));
3355 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
3356 auto arguments = convertVariadicArguments<IDLAny>(*state, 2);
3357 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
3358 return JSValue::encode(toJS<IDLLong>(*state, throwScope, impl.setTimeout(*state, WTFMove(handler), WTFMove(timeout), WTFMove(arguments))));
3359}
3360
3361EncodedJSValue JSC_HOST_CALL jsWorkerGlobalScopePrototypeFunctionSetTimeout(ExecState* state)
3362{
3363 return IDLOperation<JSWorkerGlobalScope>::call<jsWorkerGlobalScopePrototypeFunctionSetTimeoutBody>(*state, "setTimeout");
3364}
3365
3366static inline JSC::EncodedJSValue jsWorkerGlobalScopePrototypeFunctionClearTimeoutBody(JSC::ExecState* state, typename IDLOperation<JSWorkerGlobalScope>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
3367{
3368 UNUSED_PARAM(state);
3369 UNUSED_PARAM(throwScope);
3370 auto& impl = castedThis->wrapped();
3371 auto handle = convert<IDLLong>(*state, state->argument(0));
3372 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
3373 impl.clearTimeout(WTFMove(handle));
3374 return JSValue::encode(jsUndefined());
3375}
3376
3377EncodedJSValue JSC_HOST_CALL jsWorkerGlobalScopePrototypeFunctionClearTimeout(ExecState* state)
3378{
3379 return IDLOperation<JSWorkerGlobalScope>::call<jsWorkerGlobalScopePrototypeFunctionClearTimeoutBody>(*state, "clearTimeout");
3380}
3381
3382static inline JSC::EncodedJSValue jsWorkerGlobalScopePrototypeFunctionSetIntervalBody(JSC::ExecState* state, typename IDLOperation<JSWorkerGlobalScope>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
3383{
3384 UNUSED_PARAM(state);
3385 UNUSED_PARAM(throwScope);
3386 auto& impl = castedThis->wrapped();
3387 if (UNLIKELY(state->argumentCount() < 1))
3388 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
3389 auto handler = convert<IDLScheduledAction>(*state, state->uncheckedArgument(0), *castedThis->globalObject());
3390 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
3391 auto timeout = convert<IDLLong>(*state, state->argument(1));
3392 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
3393 auto arguments = convertVariadicArguments<IDLAny>(*state, 2);
3394 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
3395 return JSValue::encode(toJS<IDLLong>(*state, throwScope, impl.setInterval(*state, WTFMove(handler), WTFMove(timeout), WTFMove(arguments))));
3396}
3397
3398EncodedJSValue JSC_HOST_CALL jsWorkerGlobalScopePrototypeFunctionSetInterval(ExecState* state)
3399{
3400 return IDLOperation<JSWorkerGlobalScope>::call<jsWorkerGlobalScopePrototypeFunctionSetIntervalBody>(*state, "setInterval");
3401}
3402
3403static inline JSC::EncodedJSValue jsWorkerGlobalScopePrototypeFunctionClearIntervalBody(JSC::ExecState* state, typename IDLOperation<JSWorkerGlobalScope>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
3404{
3405 UNUSED_PARAM(state);
3406 UNUSED_PARAM(throwScope);
3407 auto& impl = castedThis->wrapped();
3408 auto handle = convert<IDLLong>(*state, state->argument(0));
3409 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
3410 impl.clearInterval(WTFMove(handle));
3411 return JSValue::encode(jsUndefined());
3412}
3413
3414EncodedJSValue JSC_HOST_CALL jsWorkerGlobalScopePrototypeFunctionClearInterval(ExecState* state)
3415{
3416 return IDLOperation<JSWorkerGlobalScope>::call<jsWorkerGlobalScopePrototypeFunctionClearIntervalBody>(*state, "clearInterval");
3417}
3418
3419static inline JSC::EncodedJSValue jsWorkerGlobalScopePrototypeFunctionQueueMicrotaskBody(JSC::ExecState* state, typename IDLOperation<JSWorkerGlobalScope>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
3420{
3421 UNUSED_PARAM(state);
3422 UNUSED_PARAM(throwScope);
3423 return JSValue::encode(castedThis->queueMicrotask(*state));
3424}
3425
3426EncodedJSValue JSC_HOST_CALL jsWorkerGlobalScopePrototypeFunctionQueueMicrotask(ExecState* state)
3427{
3428 return IDLOperation<JSWorkerGlobalScope>::call<jsWorkerGlobalScopePrototypeFunctionQueueMicrotaskBody>(*state, "queueMicrotask");
3429}
3430
3431static inline JSC::EncodedJSValue jsWorkerGlobalScopePrototypeFunctionAtobBody(JSC::ExecState* state, typename IDLOperation<JSWorkerGlobalScope>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
3432{
3433 UNUSED_PARAM(state);
3434 UNUSED_PARAM(throwScope);
3435 auto& impl = castedThis->wrapped();
3436 if (UNLIKELY(state->argumentCount() < 1))
3437 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
3438 auto string = convert<IDLDOMString>(*state, state->uncheckedArgument(0));
3439 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
3440 return JSValue::encode(toJS<IDLDOMString>(*state, throwScope, impl.atob(WTFMove(string))));
3441}
3442
3443EncodedJSValue JSC_HOST_CALL jsWorkerGlobalScopePrototypeFunctionAtob(ExecState* state)
3444{
3445 return IDLOperation<JSWorkerGlobalScope>::call<jsWorkerGlobalScopePrototypeFunctionAtobBody>(*state, "atob");
3446}
3447
3448static inline JSC::EncodedJSValue jsWorkerGlobalScopePrototypeFunctionBtoaBody(JSC::ExecState* state, typename IDLOperation<JSWorkerGlobalScope>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
3449{
3450 UNUSED_PARAM(state);
3451 UNUSED_PARAM(throwScope);
3452 auto& impl = castedThis->wrapped();
3453 if (UNLIKELY(state->argumentCount() < 1))
3454 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
3455 auto string = convert<IDLDOMString>(*state, state->uncheckedArgument(0));
3456 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
3457 return JSValue::encode(toJS<IDLDOMString>(*state, throwScope, impl.btoa(WTFMove(string))));
3458}
3459
3460EncodedJSValue JSC_HOST_CALL jsWorkerGlobalScopePrototypeFunctionBtoa(ExecState* state)
3461{
3462 return IDLOperation<JSWorkerGlobalScope>::call<jsWorkerGlobalScopePrototypeFunctionBtoaBody>(*state, "btoa");
3463}
3464
3465static inline JSC::EncodedJSValue jsWorkerGlobalScopePrototypeFunctionCreateImageBitmap1Body(JSC::ExecState* state, typename IDLOperationReturningPromise<JSWorkerGlobalScope>::ClassParameter castedThis, Ref<DeferredPromise>&& promise, JSC::ThrowScope& throwScope)
3466{
3467 UNUSED_PARAM(state);
3468 UNUSED_PARAM(throwScope);
3469 auto& impl = castedThis->wrapped();
3470 auto image = convert<IDLUnion<IDLInterface<HTMLImageElement>, IDLInterface<HTMLVideoElement>, IDLInterface<HTMLCanvasElement>, IDLInterface<ImageBitmap>, IDLInterface<Blob>, IDLInterface<ImageData>>>(*state, state->uncheckedArgument(0));
3471 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
3472 auto options = convert<IDLDictionary<ImageBitmapOptions>>(*state, state->argument(1));
3473 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
3474 impl.createImageBitmap(WTFMove(image), WTFMove(options), WTFMove(promise));
3475 return JSValue::encode(jsUndefined());
3476}
3477
3478static inline JSC::EncodedJSValue jsWorkerGlobalScopePrototypeFunctionCreateImageBitmap2Body(JSC::ExecState* state, typename IDLOperationReturningPromise<JSWorkerGlobalScope>::ClassParameter castedThis, Ref<DeferredPromise>&& promise, JSC::ThrowScope& throwScope)
3479{
3480 UNUSED_PARAM(state);
3481 UNUSED_PARAM(throwScope);
3482 auto& impl = castedThis->wrapped();
3483 auto image = convert<IDLUnion<IDLInterface<HTMLImageElement>, IDLInterface<HTMLVideoElement>, IDLInterface<HTMLCanvasElement>, IDLInterface<ImageBitmap>, IDLInterface<Blob>, IDLInterface<ImageData>>>(*state, state->uncheckedArgument(0));
3484 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
3485 auto sx = convert<IDLLong>(*state, state->uncheckedArgument(1));
3486 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
3487 auto sy = convert<IDLLong>(*state, state->uncheckedArgument(2));
3488 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
3489 auto sw = convert<IDLLong>(*state, state->uncheckedArgument(3));
3490 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
3491 auto sh = convert<IDLLong>(*state, state->uncheckedArgument(4));
3492 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
3493 auto options = convert<IDLDictionary<ImageBitmapOptions>>(*state, state->argument(5));
3494 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
3495 impl.createImageBitmap(WTFMove(image), WTFMove(sx), WTFMove(sy), WTFMove(sw), WTFMove(sh), WTFMove(options), WTFMove(promise));
3496 return JSValue::encode(jsUndefined());
3497}
3498
3499static inline JSC::EncodedJSValue jsWorkerGlobalScopePrototypeFunctionCreateImageBitmapOverloadDispatcher(JSC::ExecState* state, typename IDLOperationReturningPromise<JSWorkerGlobalScope>::ClassParameter castedThis, Ref<DeferredPromise>&& promise, JSC::ThrowScope& throwScope)
3500{
3501 UNUSED_PARAM(state);
3502 UNUSED_PARAM(throwScope);
3503 VM& vm = state->vm();
3504 UNUSED_PARAM(vm);
3505 size_t argsCount = std::min<size_t>(6, state->argumentCount());
3506 if (argsCount == 1) {
3507 return jsWorkerGlobalScopePrototypeFunctionCreateImageBitmap1Body(state, castedThis, WTFMove(promise), throwScope);
3508 }
3509 if (argsCount == 2) {
3510 return jsWorkerGlobalScopePrototypeFunctionCreateImageBitmap1Body(state, castedThis, WTFMove(promise), throwScope);
3511 }
3512 if (argsCount == 5) {
3513 return jsWorkerGlobalScopePrototypeFunctionCreateImageBitmap2Body(state, castedThis, WTFMove(promise), throwScope);
3514 }
3515 if (argsCount == 6) {
3516 return jsWorkerGlobalScopePrototypeFunctionCreateImageBitmap2Body(state, castedThis, WTFMove(promise), throwScope);
3517 }
3518 return argsCount < 1 ? throwVMError(state, throwScope, createNotEnoughArgumentsError(state)) : throwVMTypeError(state, throwScope);
3519}
3520
3521EncodedJSValue JSC_HOST_CALL jsWorkerGlobalScopePrototypeFunctionCreateImageBitmap(ExecState* state)
3522{
3523 return IDLOperationReturningPromise<JSWorkerGlobalScope>::call<jsWorkerGlobalScopePrototypeFunctionCreateImageBitmapOverloadDispatcher, PromiseExecutionScope::WindowOrWorker>(*state, "createImageBitmap");
3524}
3525
3526void JSWorkerGlobalScope::visitChildren(JSCell* cell, SlotVisitor& visitor)
3527{
3528 auto* thisObject = jsCast<JSWorkerGlobalScope*>(cell);
3529 ASSERT_GC_OBJECT_INHERITS(thisObject, info());
3530 Base::visitChildren(thisObject, visitor);
3531 thisObject->visitAdditionalChildren(visitor);
3532}
3533
3534void JSWorkerGlobalScope::visitOutputConstraints(JSCell* cell, SlotVisitor& visitor)
3535{
3536 auto* thisObject = jsCast<JSWorkerGlobalScope*>(cell);
3537 ASSERT_GC_OBJECT_INHERITS(thisObject, info());
3538 Base::visitOutputConstraints(thisObject, visitor);
3539 thisObject->visitAdditionalChildren(visitor);
3540}
3541
3542void JSWorkerGlobalScope::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder)
3543{
3544 auto* thisObject = jsCast<JSWorkerGlobalScope*>(cell);
3545 builder.setWrappedObjectForCell(cell, &thisObject->wrapped());
3546 if (thisObject->scriptExecutionContext())
3547 builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string());
3548 Base::heapSnapshot(cell, builder);
3549}
3550
3551WorkerGlobalScope* JSWorkerGlobalScope::toWrapped(JSC::VM& vm, JSC::JSValue value)
3552{
3553 if (auto* wrapper = jsDynamicCast<JSWorkerGlobalScope*>(vm, value))
3554 return &wrapper->wrapped();
3555 return nullptr;
3556}
3557
3558}
3559