Other Tools

1
#include "AbortControllerBinding.h"
2
#include "AbortSignalBinding.h"
3
#include "BlobBinding.h"
4
#include "BroadcastChannelBinding.h"
5
#include "CacheBinding.h"
6
#include "CacheStorageBinding.h"
7
#include "ChromeUtilsBinding.h"
8
#include "ClientBinding.h"
9
#include "ClientsBinding.h"
10
#include "CloseEventBinding.h"
11
#include "ConsoleBinding.h"
12
#include "CryptoBinding.h"
13
#include "CustomEventBinding.h"
14
#include "DOMExceptionBinding.h"
15
#include "DOMMatrixBinding.h"
16
#include "DOMPointBinding.h"
17
#include "DOMQuadBinding.h"
18
#include "DOMRectBinding.h"
19
#include "DOMRequestBinding.h"
20
#include "DOMStringListBinding.h"
21
#include "DebuggerNotificationObserverBinding.h"
22
#include "DedicatedWorkerGlobalScopeBinding.h"
23
#include "DirectoryBinding.h"
24
#include "DominatorTreeBinding.h"
25
#include "ErrorEventBinding.h"
26
#include "EventBinding.h"
27
#include "EventSourceBinding.h"
28
#include "EventTargetBinding.h"
29
#include "ExtendableEventBinding.h"
30
#include "ExtendableMessageEventBinding.h"
31
#include "FetchEventBinding.h"
32
#include "FetchObserverBinding.h"
33
#include "FileBinding.h"
34
#include "FileListBinding.h"
35
#include "FileReaderBinding.h"
36
#include "FileReaderSyncBinding.h"
37
#include "FormDataBinding.h"
38
#include "HeadersBinding.h"
39
#include "HeapSnapshotBinding.h"
40
#include "IDBCursorBinding.h"
41
#include "IDBDatabaseBinding.h"
42
#include "IDBFactoryBinding.h"
43
#include "IDBIndexBinding.h"
44
#include "IDBKeyRangeBinding.h"
45
#include "IDBObjectStoreBinding.h"
46
#include "IDBOpenDBRequestBinding.h"
47
#include "IDBRequestBinding.h"
48
#include "IDBTransactionBinding.h"
49
#include "IDBVersionChangeEventBinding.h"
50
#include "ImageBitmapBinding.h"
51
#include "ImageBitmapRenderingContextBinding.h"
52
#include "ImageDataBinding.h"
53
#include "MediaCapabilitiesBinding.h"
54
#include "MessageChannelBinding.h"
55
#include "MessageEventBinding.h"
56
#include "MessagePortBinding.h"
57
#include "NetworkInformationBinding.h"
58
#include "NotificationBinding.h"
59
#include "NotificationEventBinding.h"
60
#include "OffscreenCanvasBinding.h"
61
#include "PerformanceBinding.h"
62
#include "PerformanceEntryBinding.h"
63
#include "PerformanceMarkBinding.h"
64
#include "PerformanceMeasureBinding.h"
65
#include "PerformanceObserverBinding.h"
66
#include "PerformanceObserverEntryListBinding.h"
67
#include "PerformanceResourceTimingBinding.h"
68
#include "PerformanceServerTimingBinding.h"
69
#include "ProgressEventBinding.h"
70
#include "PromiseRejectionEventBinding.h"
71
#include "PushEventBinding.h"
72
#include "PushManagerBinding.h"
73
#include "PushMessageDataBinding.h"
74
#include "PushSubscriptionBinding.h"
75
#include "PushSubscriptionOptionsBinding.h"
76
#include "ReportingBinding.h"
77
#include "RequestBinding.h"
78
#include "ResponseBinding.h"
79
#include "ServiceWorkerBinding.h"
80
#include "ServiceWorkerGlobalScopeBinding.h"
81
#include "ServiceWorkerRegistrationBinding.h"
82
#include "SharedWorkerGlobalScopeBinding.h"
83
#include "StorageManagerBinding.h"
84
#include "StructuredCloneHolderBinding.h"
85
#include "StructuredCloneTesterBinding.h"
86
#include "SubtleCryptoBinding.h"
87
#include "TextDecoderBinding.h"
88
#include "TextEncoderBinding.h"
89
#include "URLBinding.h"
90
#include "URLSearchParamsBinding.h"
91
#include "WebGLContextEventBinding.h"
92
#include "WebGLRenderingContextBinding.h"
93
#include "WebSocketBinding.h"
94
#include "WorkerBinding.h"
95
#include "WorkerGlobalScopeBinding.h"
96
#include "WorkerLocationBinding.h"
97
#include "WorkerNavigatorBinding.h"
98
#include "XMLHttpRequestBinding.h"
99
#include "XMLHttpRequestEventTargetBinding.h"
100
#include "XMLHttpRequestUploadBinding.h"
101
102
namespace mozilla {
103
namespace dom {
104
bool
105
RegisterWorkerBindings(JSContext* aCx, JS::Handle<JSObject*> aObj)
106
{
107
if (!AbortController_Binding::GetConstructorObject(aCx)) {
108
return false;
109
}
110
111
if (!AbortSignal_Binding::GetConstructorObject(aCx)) {
112
return false;
113
}
114
115
if (!Blob_Binding::GetConstructorObject(aCx)) {
116
return false;
117
}
118
119
if (!BroadcastChannel_Binding::GetConstructorObject(aCx)) {
120
return false;
121
}
122
123
if (Cache_Binding::ConstructorEnabled(aCx, aObj) && !Cache_Binding::GetConstructorObject(aCx)) {
124
return false;
125
}
126
127
if (CacheStorage_Binding::ConstructorEnabled(aCx, aObj) && !CacheStorage_Binding::GetConstructorObject(aCx)) {
128
return false;
129
}
130
131
if (ChromeUtils_Binding::ConstructorEnabled(aCx, aObj) && !ChromeUtils_Binding::GetConstructorObject(aCx)) {
132
return false;
133
}
134
135
if (ChromeWorker_Binding::ConstructorEnabled(aCx, aObj) && !ChromeWorker_Binding::GetConstructorObject(aCx)) {
136
return false;
137
}
138
139
if (Client_Binding::ConstructorEnabled(aCx, aObj) && !Client_Binding::GetConstructorObject(aCx)) {
140
return false;
141
}
142
143
if (Clients_Binding::ConstructorEnabled(aCx, aObj) && !Clients_Binding::GetConstructorObject(aCx)) {
144
return false;
145
}
146
147
if (!CloseEvent_Binding::GetConstructorObject(aCx)) {
148
return false;
149
}
150
151
if (ConsoleInstance_Binding::ConstructorEnabled(aCx, aObj) && !ConsoleInstance_Binding::GetConstructorObject(aCx)) {
152
return false;
153
}
154
155
if (!Crypto_Binding::GetConstructorObject(aCx)) {
156
return false;
157
}
158
159
if (!CustomEvent_Binding::GetConstructorObject(aCx)) {
160
return false;
161
}
162
163
if (!DOMException_Binding::GetConstructorObject(aCx)) {
164
return false;
165
}
166
167
if (DOMMatrix_Binding::ConstructorEnabled(aCx, aObj) && !DOMMatrix_Binding::GetConstructorObject(aCx)) {
168
return false;
169
}
170
171
if (DOMMatrixReadOnly_Binding::ConstructorEnabled(aCx, aObj) && !DOMMatrixReadOnly_Binding::GetConstructorObject(aCx)) {
172
return false;
173
}
174
175
if (DOMPoint_Binding::ConstructorEnabled(aCx, aObj) && !DOMPoint_Binding::GetConstructorObject(aCx)) {
176
return false;
177
}
178
179
if (DOMPointReadOnly_Binding::ConstructorEnabled(aCx, aObj) && !DOMPointReadOnly_Binding::GetConstructorObject(aCx)) {
180
return false;
181
}
182
183
if (DOMQuad_Binding::ConstructorEnabled(aCx, aObj) && !DOMQuad_Binding::GetConstructorObject(aCx)) {
184
return false;
185
}
186
187
if (!DOMRect_Binding::GetConstructorObject(aCx)) {
188
return false;
189
}
190
191
if (!DOMRectReadOnly_Binding::GetConstructorObject(aCx)) {
192
return false;
193
}
194
195
if (!DOMRequest_Binding::GetConstructorObject(aCx)) {
196
return false;
197
}
198
199
if (!DOMStringList_Binding::GetConstructorObject(aCx)) {
200
return false;
201
}
202
203
if (DebuggerNotificationObserver_Binding::ConstructorEnabled(aCx, aObj) && !DebuggerNotificationObserver_Binding::GetConstructorObject(aCx)) {
204
return false;
205
}
206
207
if (DedicatedWorkerGlobalScope_Binding::ConstructorEnabled(aCx, aObj) && !DedicatedWorkerGlobalScope_Binding::GetConstructorObject(aCx)) {
208
return false;
209
}
210
211
if (!Directory_Binding::GetConstructorObject(aCx)) {
212
return false;
213
}
214
215
if (DominatorTree_Binding::ConstructorEnabled(aCx, aObj) && !DominatorTree_Binding::GetConstructorObject(aCx)) {
216
return false;
217
}
218
219
if (!ErrorEvent_Binding::GetConstructorObject(aCx)) {
220
return false;
221
}
222
223
if (!Event_Binding::GetConstructorObject(aCx)) {
224
return false;
225
}
226
227
if (EventSource_Binding::ConstructorEnabled(aCx, aObj) && !EventSource_Binding::GetConstructorObject(aCx)) {
228
return false;
229
}
230
231
if (!EventTarget_Binding::GetConstructorObject(aCx)) {
232
return false;
233
}
234
235
if (ExtendableEvent_Binding::ConstructorEnabled(aCx, aObj) && !ExtendableEvent_Binding::GetConstructorObject(aCx)) {
236
return false;
237
}
238
239
if (ExtendableMessageEvent_Binding::ConstructorEnabled(aCx, aObj) && !ExtendableMessageEvent_Binding::GetConstructorObject(aCx)) {
240
return false;
241
}
242
243
if (FetchEvent_Binding::ConstructorEnabled(aCx, aObj) && !FetchEvent_Binding::GetConstructorObject(aCx)) {
244
return false;
245
}
246
247
if (FetchObserver_Binding::ConstructorEnabled(aCx, aObj) && !FetchObserver_Binding::GetConstructorObject(aCx)) {
248
return false;
249
}
250
251
if (!File_Binding::GetConstructorObject(aCx)) {
252
return false;
253
}
254
255
if (!FileList_Binding::GetConstructorObject(aCx)) {
256
return false;
257
}
258
259
if (!FileReader_Binding::GetConstructorObject(aCx)) {
260
return false;
261
}
262
263
if (FileReaderSync_Binding::ConstructorEnabled(aCx, aObj) && !FileReaderSync_Binding::GetConstructorObject(aCx)) {
264
return false;
265
}
266
267
if (!FormData_Binding::GetConstructorObject(aCx)) {
268
return false;
269
}
270
271
if (!Headers_Binding::GetConstructorObject(aCx)) {
272
return false;
273
}
274
275
if (HeapSnapshot_Binding::ConstructorEnabled(aCx, aObj) && !HeapSnapshot_Binding::GetConstructorObject(aCx)) {
276
return false;
277
}
278
279
if (!IDBCursor_Binding::GetConstructorObject(aCx)) {
280
return false;
281
}
282
283
if (!IDBCursorWithValue_Binding::GetConstructorObject(aCx)) {
284
return false;
285
}
286
287
if (!IDBDatabase_Binding::GetConstructorObject(aCx)) {
288
return false;
289
}
290
291
if (!IDBFactory_Binding::GetConstructorObject(aCx)) {
292
return false;
293
}
294
295
if (!IDBIndex_Binding::GetConstructorObject(aCx)) {
296
return false;
297
}
298
299
if (!IDBKeyRange_Binding::GetConstructorObject(aCx)) {
300
return false;
301
}
302
303
if (IDBLocaleAwareKeyRange_Binding::ConstructorEnabled(aCx, aObj) && !IDBLocaleAwareKeyRange_Binding::GetConstructorObject(aCx)) {
304
return false;
305
}
306
307
if (!IDBObjectStore_Binding::GetConstructorObject(aCx)) {
308
return false;
309
}
310
311
if (!IDBOpenDBRequest_Binding::GetConstructorObject(aCx)) {
312
return false;
313
}
314
315
if (!IDBRequest_Binding::GetConstructorObject(aCx)) {
316
return false;
317
}
318
319
if (!IDBTransaction_Binding::GetConstructorObject(aCx)) {
320
return false;
321
}
322
323
if (!IDBVersionChangeEvent_Binding::GetConstructorObject(aCx)) {
324
return false;
325
}
326
327
if (!ImageBitmap_Binding::GetConstructorObject(aCx)) {
328
return false;
329
}
330
331
if (!ImageBitmapRenderingContext_Binding::GetConstructorObject(aCx)) {
332
return false;
333
}
334
335
if (!ImageData_Binding::GetConstructorObject(aCx)) {
336
return false;
337
}
338
339
if (MediaCapabilities_Binding::ConstructorEnabled(aCx, aObj) && !MediaCapabilities_Binding::GetConstructorObject(aCx)) {
340
return false;
341
}
342
343
if (MediaCapabilitiesInfo_Binding::ConstructorEnabled(aCx, aObj) && !MediaCapabilitiesInfo_Binding::GetConstructorObject(aCx)) {
344
return false;
345
}
346
347
if (!MessageChannel_Binding::GetConstructorObject(aCx)) {
348
return false;
349
}
350
351
if (!MessageEvent_Binding::GetConstructorObject(aCx)) {
352
return false;
353
}
354
355
if (!MessagePort_Binding::GetConstructorObject(aCx)) {
356
return false;
357
}
358
359
if (NetworkInformation_Binding::ConstructorEnabled(aCx, aObj) && !NetworkInformation_Binding::GetConstructorObject(aCx)) {
360
return false;
361
}
362
363
if (Notification_Binding::ConstructorEnabled(aCx, aObj) && !Notification_Binding::GetConstructorObject(aCx)) {
364
return false;
365
}
366
367
if (NotificationEvent_Binding::ConstructorEnabled(aCx, aObj) && !NotificationEvent_Binding::GetConstructorObject(aCx)) {
368
return false;
369
}
370
371
if (OffscreenCanvas_Binding::ConstructorEnabled(aCx, aObj) && !OffscreenCanvas_Binding::GetConstructorObject(aCx)) {
372
return false;
373
}
374
375
if (!Performance_Binding::GetConstructorObject(aCx)) {
376
return false;
377
}
378
379
if (!PerformanceEntry_Binding::GetConstructorObject(aCx)) {
380
return false;
381
}
382
383
if (!PerformanceMark_Binding::GetConstructorObject(aCx)) {
384
return false;
385
}
386
387
if (!PerformanceMeasure_Binding::GetConstructorObject(aCx)) {
388
return false;
389
}
390
391
if (PerformanceObserver_Binding::ConstructorEnabled(aCx, aObj) && !PerformanceObserver_Binding::GetConstructorObject(aCx)) {
392
return false;
393
}
394
395
if (PerformanceObserverEntryList_Binding::ConstructorEnabled(aCx, aObj) && !PerformanceObserverEntryList_Binding::GetConstructorObject(aCx)) {
396
return false;
397
}
398
399
if (!PerformanceResourceTiming_Binding::GetConstructorObject(aCx)) {
400
return false;
401
}
402
403
if (PerformanceServerTiming_Binding::ConstructorEnabled(aCx, aObj) && !PerformanceServerTiming_Binding::GetConstructorObject(aCx)) {
404
return false;
405
}
406
407
if (!ProgressEvent_Binding::GetConstructorObject(aCx)) {
408
return false;
409
}
410
411
if (!PromiseRejectionEvent_Binding::GetConstructorObject(aCx)) {
412
return false;
413
}
414
415
if (PushEvent_Binding::ConstructorEnabled(aCx, aObj) && !PushEvent_Binding::GetConstructorObject(aCx)) {
416
return false;
417
}
418
419
if (PushManager_Binding::ConstructorEnabled(aCx, aObj) && !PushManager_Binding::GetConstructorObject(aCx)) {
420
return false;
421
}
422
423
if (PushMessageData_Binding::ConstructorEnabled(aCx, aObj) && !PushMessageData_Binding::GetConstructorObject(aCx)) {
424
return false;
425
}
426
427
if (PushSubscription_Binding::ConstructorEnabled(aCx, aObj) && !PushSubscription_Binding::GetConstructorObject(aCx)) {
428
return false;
429
}
430
431
if (PushSubscriptionOptions_Binding::ConstructorEnabled(aCx, aObj) && !PushSubscriptionOptions_Binding::GetConstructorObject(aCx)) {
432
return false;
433
}
434
435
if (!Request_Binding::GetConstructorObject(aCx)) {
436
return false;
437
}
438
439
if (!Response_Binding::GetConstructorObject(aCx)) {
440
return false;
441
}
442
443
if (ServiceWorker_Binding::ConstructorEnabled(aCx, aObj) && !ServiceWorker_Binding::GetConstructorObject(aCx)) {
444
return false;
445
}
446
447
if (ServiceWorkerGlobalScope_Binding::ConstructorEnabled(aCx, aObj) && !ServiceWorkerGlobalScope_Binding::GetConstructorObject(aCx)) {
448
return false;
449
}
450
451
if (ServiceWorkerRegistration_Binding::ConstructorEnabled(aCx, aObj) && !ServiceWorkerRegistration_Binding::GetConstructorObject(aCx)) {
452
return false;
453
}
454
455
if (SharedWorkerGlobalScope_Binding::ConstructorEnabled(aCx, aObj) && !SharedWorkerGlobalScope_Binding::GetConstructorObject(aCx)) {
456
return false;
457
}
458
459
if (StorageManager_Binding::ConstructorEnabled(aCx, aObj) && !StorageManager_Binding::GetConstructorObject(aCx)) {
460
return false;
461
}
462
463
if (StructuredCloneHolder_Binding::ConstructorEnabled(aCx, aObj) && !StructuredCloneHolder_Binding::GetConstructorObject(aCx)) {
464
return false;
465
}
466
467
if (StructuredCloneTester_Binding::ConstructorEnabled(aCx, aObj) && !StructuredCloneTester_Binding::GetConstructorObject(aCx)) {
468
return false;
469
}
470
471
if (!SubtleCrypto_Binding::GetConstructorObject(aCx)) {
472
return false;
473
}
474
475
if (TestingDeprecatedInterface_Binding::ConstructorEnabled(aCx, aObj) && !TestingDeprecatedInterface_Binding::GetConstructorObject(aCx)) {
476
return false;
477
}
478
479
if (!TextDecoder_Binding::GetConstructorObject(aCx)) {
480
return false;
481
}
482
483
if (!TextEncoder_Binding::GetConstructorObject(aCx)) {
484
return false;
485
}
486
487
if (!URL_Binding::GetConstructorObject(aCx)) {
488
return false;
489
}
490
491
if (!URLSearchParams_Binding::GetConstructorObject(aCx)) {
492
return false;
493
}
494
495
if (WebGLActiveInfo_Binding::ConstructorEnabled(aCx, aObj) && !WebGLActiveInfo_Binding::GetConstructorObject(aCx)) {
496
return false;
497
}
498
499
if (WebGLBuffer_Binding::ConstructorEnabled(aCx, aObj) && !WebGLBuffer_Binding::GetConstructorObject(aCx)) {
500
return false;
501
}
502
503
if (WebGLContextEvent_Binding::ConstructorEnabled(aCx, aObj) && !WebGLContextEvent_Binding::GetConstructorObject(aCx)) {
504
return false;
505
}
506
507
if (WebGLFramebuffer_Binding::ConstructorEnabled(aCx, aObj) && !WebGLFramebuffer_Binding::GetConstructorObject(aCx)) {
508
return false;
509
}
510
511
if (WebGLProgram_Binding::ConstructorEnabled(aCx, aObj) && !WebGLProgram_Binding::GetConstructorObject(aCx)) {
512
return false;
513
}
514
515
if (WebGLRenderbuffer_Binding::ConstructorEnabled(aCx, aObj) && !WebGLRenderbuffer_Binding::GetConstructorObject(aCx)) {
516
return false;
517
}
518
519
if (WebGLRenderingContext_Binding::ConstructorEnabled(aCx, aObj) && !WebGLRenderingContext_Binding::GetConstructorObject(aCx)) {
520
return false;
521
}
522
523
if (WebGLShader_Binding::ConstructorEnabled(aCx, aObj) && !WebGLShader_Binding::GetConstructorObject(aCx)) {
524
return false;
525
}
526
527
if (WebGLShaderPrecisionFormat_Binding::ConstructorEnabled(aCx, aObj) && !WebGLShaderPrecisionFormat_Binding::GetConstructorObject(aCx)) {
528
return false;
529
}
530
531
if (WebGLTexture_Binding::ConstructorEnabled(aCx, aObj) && !WebGLTexture_Binding::GetConstructorObject(aCx)) {
532
return false;
533
}
534
535
if (WebGLUniformLocation_Binding::ConstructorEnabled(aCx, aObj) && !WebGLUniformLocation_Binding::GetConstructorObject(aCx)) {
536
return false;
537
}
538
539
if (!WebSocket_Binding::GetConstructorObject(aCx)) {
540
return false;
541
}
542
543
if (WindowClient_Binding::ConstructorEnabled(aCx, aObj) && !WindowClient_Binding::GetConstructorObject(aCx)) {
544
return false;
545
}
546
547
if (Worker_Binding::ConstructorEnabled(aCx, aObj) && !Worker_Binding::GetConstructorObject(aCx)) {
548
return false;
549
}
550
551
if (!WorkerGlobalScope_Binding::GetConstructorObject(aCx)) {
552
return false;
553
}
554
555
if (!WorkerLocation_Binding::GetConstructorObject(aCx)) {
556
return false;
557
}
558
559
if (!WorkerNavigator_Binding::GetConstructorObject(aCx)) {
560
return false;
561
}
562
563
if (XMLHttpRequest_Binding::ConstructorEnabled(aCx, aObj) && !XMLHttpRequest_Binding::GetConstructorObject(aCx)) {
564
return false;
565
}
566
567
if (XMLHttpRequestEventTarget_Binding::ConstructorEnabled(aCx, aObj) && !XMLHttpRequestEventTarget_Binding::GetConstructorObject(aCx)) {
568
return false;
569
}
570
571
if (XMLHttpRequestUpload_Binding::ConstructorEnabled(aCx, aObj) && !XMLHttpRequestUpload_Binding::GetConstructorObject(aCx)) {
572
return false;
573
}
574
575
if (!console_Binding::GetConstructorObject(aCx)) {
576
return false;
577
}
578
579
return true;
580
}
581
582
} // namespace dom
583
} // namespace mozilla
584