Line data Source code
1 : #include "AddonManagerBinding.h"
2 : #include "ChromeUtilsBinding.h"
3 : #include "DOMErrorBinding.h"
4 : #include "DOMRequestBinding.h"
5 : #include "DOMStringListBinding.h"
6 : #include "DominatorTreeBinding.h"
7 : #include "ErrorEventBinding.h"
8 : #include "EventBinding.h"
9 : #include "EventTargetBinding.h"
10 : #include "FileReaderBinding.h"
11 : #include "FlyWebDiscoveryManagerBinding.h"
12 : #include "HeapSnapshotBinding.h"
13 : #include "IDBCursorBinding.h"
14 : #include "IDBDatabaseBinding.h"
15 : #include "IDBFactoryBinding.h"
16 : #include "IDBFileHandleBinding.h"
17 : #include "IDBFileRequestBinding.h"
18 : #include "IDBIndexBinding.h"
19 : #include "IDBKeyRangeBinding.h"
20 : #include "IDBMutableFileBinding.h"
21 : #include "IDBObjectStoreBinding.h"
22 : #include "IDBOpenDBRequestBinding.h"
23 : #include "IDBRequestBinding.h"
24 : #include "IDBTransactionBinding.h"
25 : #include "IDBVersionChangeEventBinding.h"
26 : #include "MatchGlobBinding.h"
27 : #include "MatchPatternBinding.h"
28 : #include "MessageEventBinding.h"
29 : #include "MessagePortBinding.h"
30 : #include "PrecompiledScriptBinding.h"
31 : #include "PromiseDebuggingBinding.h"
32 : #include "StructuredCloneHolderBinding.h"
33 : #include "TCPServerSocketBinding.h"
34 : #include "TCPServerSocketEventBinding.h"
35 : #include "TCPSocketBinding.h"
36 : #include "TCPSocketErrorEventBinding.h"
37 : #include "TCPSocketEventBinding.h"
38 : #include "TextDecoderBinding.h"
39 : #include "TextEncoderBinding.h"
40 : #include "ThreadSafeChromeUtilsBinding.h"
41 : #include "URLSearchParamsBinding.h"
42 : #include "WebExtensionContentScriptBinding.h"
43 : #include "WebExtensionPolicyBinding.h"
44 : #include "WorkerBinding.h"
45 : #include "js/Id.h"
46 : #include "mozilla/dom/BindingUtils.h"
47 : #include "nsThreadUtils.h"
48 :
49 : namespace mozilla {
50 : namespace dom {
51 : bool
52 13948 : ResolveSystemBinding(JSContext* aCx, JS::Handle<JSObject*> aObj, JS::Handle<jsid> aId, bool* aResolvedp)
53 : {
54 13948 : MOZ_ASSERT(NS_IsMainThread());
55 :
56 : static jsid sAddonManagerPermissions_id;
57 : static jsid sChromeUtils_id;
58 : static jsid sChromeWorker_id;
59 : static jsid sDOMError_id;
60 : static jsid sDOMRequest_id;
61 : static jsid sDOMStringList_id;
62 : static jsid sDominatorTree_id;
63 : static jsid sErrorEvent_id;
64 : static jsid sEvent_id;
65 : static jsid sEventTarget_id;
66 : static jsid sFileReader_id;
67 : static jsid sFlyWebDiscoveryManager_id;
68 : static jsid sHeapSnapshot_id;
69 : static jsid sIDBCursor_id;
70 : static jsid sIDBCursorWithValue_id;
71 : static jsid sIDBDatabase_id;
72 : static jsid sIDBFactory_id;
73 : static jsid sIDBFileHandle_id;
74 : static jsid sIDBFileRequest_id;
75 : static jsid sIDBIndex_id;
76 : static jsid sIDBKeyRange_id;
77 : static jsid sIDBLocaleAwareKeyRange_id;
78 : static jsid sIDBMutableFile_id;
79 : static jsid sIDBObjectStore_id;
80 : static jsid sIDBOpenDBRequest_id;
81 : static jsid sIDBRequest_id;
82 : static jsid sIDBTransaction_id;
83 : static jsid sIDBVersionChangeEvent_id;
84 : static jsid sMatchGlob_id;
85 : static jsid sMatchPattern_id;
86 : static jsid sMatchPatternSet_id;
87 : static jsid sMessageEvent_id;
88 : static jsid sMessagePort_id;
89 : static jsid sPrecompiledScript_id;
90 : static jsid sPromiseDebugging_id;
91 : static jsid sStructuredCloneHolder_id;
92 : static jsid sTCPServerSocket_id;
93 : static jsid sTCPServerSocketEvent_id;
94 : static jsid sTCPSocket_id;
95 : static jsid sTCPSocketErrorEvent_id;
96 : static jsid sTCPSocketEvent_id;
97 : static jsid sTextDecoder_id;
98 : static jsid sTextEncoder_id;
99 : static jsid sThreadSafeChromeUtils_id;
100 : static jsid sURLSearchParams_id;
101 : static jsid sWebExtensionContentScript_id;
102 : static jsid sWebExtensionPolicy_id;
103 : static jsid sWorker_id;
104 :
105 : static bool idsInited = false;
106 13948 : if (!idsInited) {
107 3 : if (!AtomizeAndPinJSString(aCx, sAddonManagerPermissions_id, "AddonManagerPermissions")) {
108 0 : return false;
109 : }
110 :
111 3 : if (!AtomizeAndPinJSString(aCx, sChromeUtils_id, "ChromeUtils")) {
112 0 : return false;
113 : }
114 :
115 3 : if (!AtomizeAndPinJSString(aCx, sChromeWorker_id, "ChromeWorker")) {
116 0 : return false;
117 : }
118 :
119 3 : if (!AtomizeAndPinJSString(aCx, sDOMError_id, "DOMError")) {
120 0 : return false;
121 : }
122 :
123 3 : if (!AtomizeAndPinJSString(aCx, sDOMRequest_id, "DOMRequest")) {
124 0 : return false;
125 : }
126 :
127 3 : if (!AtomizeAndPinJSString(aCx, sDOMStringList_id, "DOMStringList")) {
128 0 : return false;
129 : }
130 :
131 3 : if (!AtomizeAndPinJSString(aCx, sDominatorTree_id, "DominatorTree")) {
132 0 : return false;
133 : }
134 :
135 3 : if (!AtomizeAndPinJSString(aCx, sErrorEvent_id, "ErrorEvent")) {
136 0 : return false;
137 : }
138 :
139 3 : if (!AtomizeAndPinJSString(aCx, sEvent_id, "Event")) {
140 0 : return false;
141 : }
142 :
143 3 : if (!AtomizeAndPinJSString(aCx, sEventTarget_id, "EventTarget")) {
144 0 : return false;
145 : }
146 :
147 3 : if (!AtomizeAndPinJSString(aCx, sFileReader_id, "FileReader")) {
148 0 : return false;
149 : }
150 :
151 3 : if (!AtomizeAndPinJSString(aCx, sFlyWebDiscoveryManager_id, "FlyWebDiscoveryManager")) {
152 0 : return false;
153 : }
154 :
155 3 : if (!AtomizeAndPinJSString(aCx, sHeapSnapshot_id, "HeapSnapshot")) {
156 0 : return false;
157 : }
158 :
159 3 : if (!AtomizeAndPinJSString(aCx, sIDBCursor_id, "IDBCursor")) {
160 0 : return false;
161 : }
162 :
163 3 : if (!AtomizeAndPinJSString(aCx, sIDBCursorWithValue_id, "IDBCursorWithValue")) {
164 0 : return false;
165 : }
166 :
167 3 : if (!AtomizeAndPinJSString(aCx, sIDBDatabase_id, "IDBDatabase")) {
168 0 : return false;
169 : }
170 :
171 3 : if (!AtomizeAndPinJSString(aCx, sIDBFactory_id, "IDBFactory")) {
172 0 : return false;
173 : }
174 :
175 3 : if (!AtomizeAndPinJSString(aCx, sIDBFileHandle_id, "IDBFileHandle")) {
176 0 : return false;
177 : }
178 :
179 3 : if (!AtomizeAndPinJSString(aCx, sIDBFileRequest_id, "IDBFileRequest")) {
180 0 : return false;
181 : }
182 :
183 3 : if (!AtomizeAndPinJSString(aCx, sIDBIndex_id, "IDBIndex")) {
184 0 : return false;
185 : }
186 :
187 3 : if (!AtomizeAndPinJSString(aCx, sIDBKeyRange_id, "IDBKeyRange")) {
188 0 : return false;
189 : }
190 :
191 3 : if (!AtomizeAndPinJSString(aCx, sIDBLocaleAwareKeyRange_id, "IDBLocaleAwareKeyRange")) {
192 0 : return false;
193 : }
194 :
195 3 : if (!AtomizeAndPinJSString(aCx, sIDBMutableFile_id, "IDBMutableFile")) {
196 0 : return false;
197 : }
198 :
199 3 : if (!AtomizeAndPinJSString(aCx, sIDBObjectStore_id, "IDBObjectStore")) {
200 0 : return false;
201 : }
202 :
203 3 : if (!AtomizeAndPinJSString(aCx, sIDBOpenDBRequest_id, "IDBOpenDBRequest")) {
204 0 : return false;
205 : }
206 :
207 3 : if (!AtomizeAndPinJSString(aCx, sIDBRequest_id, "IDBRequest")) {
208 0 : return false;
209 : }
210 :
211 3 : if (!AtomizeAndPinJSString(aCx, sIDBTransaction_id, "IDBTransaction")) {
212 0 : return false;
213 : }
214 :
215 3 : if (!AtomizeAndPinJSString(aCx, sIDBVersionChangeEvent_id, "IDBVersionChangeEvent")) {
216 0 : return false;
217 : }
218 :
219 3 : if (!AtomizeAndPinJSString(aCx, sMatchGlob_id, "MatchGlob")) {
220 0 : return false;
221 : }
222 :
223 3 : if (!AtomizeAndPinJSString(aCx, sMatchPattern_id, "MatchPattern")) {
224 0 : return false;
225 : }
226 :
227 3 : if (!AtomizeAndPinJSString(aCx, sMatchPatternSet_id, "MatchPatternSet")) {
228 0 : return false;
229 : }
230 :
231 3 : if (!AtomizeAndPinJSString(aCx, sMessageEvent_id, "MessageEvent")) {
232 0 : return false;
233 : }
234 :
235 3 : if (!AtomizeAndPinJSString(aCx, sMessagePort_id, "MessagePort")) {
236 0 : return false;
237 : }
238 :
239 3 : if (!AtomizeAndPinJSString(aCx, sPrecompiledScript_id, "PrecompiledScript")) {
240 0 : return false;
241 : }
242 :
243 3 : if (!AtomizeAndPinJSString(aCx, sPromiseDebugging_id, "PromiseDebugging")) {
244 0 : return false;
245 : }
246 :
247 3 : if (!AtomizeAndPinJSString(aCx, sStructuredCloneHolder_id, "StructuredCloneHolder")) {
248 0 : return false;
249 : }
250 :
251 3 : if (!AtomizeAndPinJSString(aCx, sTCPServerSocket_id, "TCPServerSocket")) {
252 0 : return false;
253 : }
254 :
255 3 : if (!AtomizeAndPinJSString(aCx, sTCPServerSocketEvent_id, "TCPServerSocketEvent")) {
256 0 : return false;
257 : }
258 :
259 3 : if (!AtomizeAndPinJSString(aCx, sTCPSocket_id, "TCPSocket")) {
260 0 : return false;
261 : }
262 :
263 3 : if (!AtomizeAndPinJSString(aCx, sTCPSocketErrorEvent_id, "TCPSocketErrorEvent")) {
264 0 : return false;
265 : }
266 :
267 3 : if (!AtomizeAndPinJSString(aCx, sTCPSocketEvent_id, "TCPSocketEvent")) {
268 0 : return false;
269 : }
270 :
271 3 : if (!AtomizeAndPinJSString(aCx, sTextDecoder_id, "TextDecoder")) {
272 0 : return false;
273 : }
274 :
275 3 : if (!AtomizeAndPinJSString(aCx, sTextEncoder_id, "TextEncoder")) {
276 0 : return false;
277 : }
278 :
279 3 : if (!AtomizeAndPinJSString(aCx, sThreadSafeChromeUtils_id, "ThreadSafeChromeUtils")) {
280 0 : return false;
281 : }
282 :
283 3 : if (!AtomizeAndPinJSString(aCx, sURLSearchParams_id, "URLSearchParams")) {
284 0 : return false;
285 : }
286 :
287 3 : if (!AtomizeAndPinJSString(aCx, sWebExtensionContentScript_id, "WebExtensionContentScript")) {
288 0 : return false;
289 : }
290 :
291 3 : if (!AtomizeAndPinJSString(aCx, sWebExtensionPolicy_id, "WebExtensionPolicy")) {
292 0 : return false;
293 : }
294 :
295 3 : if (!AtomizeAndPinJSString(aCx, sWorker_id, "Worker")) {
296 0 : return false;
297 : }
298 :
299 3 : idsInited = true;
300 : }
301 :
302 13948 : if ((JSID_IS_VOID(aId) || aId == sAddonManagerPermissions_id) && AddonManagerPermissionsBinding::ConstructorEnabled(aCx, aObj)) {
303 0 : if (!AddonManagerPermissionsBinding::GetConstructorObject(aCx)) {
304 0 : return false;
305 : }
306 0 : *aResolvedp = true;
307 : }
308 :
309 13948 : if ((JSID_IS_VOID(aId) || aId == sChromeUtils_id) && ChromeUtilsBinding::ConstructorEnabled(aCx, aObj)) {
310 1 : if (!ChromeUtilsBinding::GetConstructorObject(aCx)) {
311 0 : return false;
312 : }
313 1 : *aResolvedp = true;
314 : }
315 :
316 13948 : if ((JSID_IS_VOID(aId) || aId == sChromeWorker_id) && ChromeWorkerBinding::ConstructorEnabled(aCx, aObj)) {
317 3 : if (!ChromeWorkerBinding::GetConstructorObject(aCx)) {
318 0 : return false;
319 : }
320 3 : *aResolvedp = true;
321 : }
322 :
323 13948 : if (JSID_IS_VOID(aId) || aId == sDOMError_id) {
324 0 : if (!DOMErrorBinding::GetConstructorObject(aCx)) {
325 0 : return false;
326 : }
327 0 : *aResolvedp = true;
328 : }
329 :
330 13948 : if (JSID_IS_VOID(aId) || aId == sDOMRequest_id) {
331 0 : if (!DOMRequestBinding::GetConstructorObject(aCx)) {
332 0 : return false;
333 : }
334 0 : *aResolvedp = true;
335 : }
336 :
337 13948 : if (JSID_IS_VOID(aId) || aId == sDOMStringList_id) {
338 0 : if (!DOMStringListBinding::GetConstructorObject(aCx)) {
339 0 : return false;
340 : }
341 0 : *aResolvedp = true;
342 : }
343 :
344 13948 : if ((JSID_IS_VOID(aId) || aId == sDominatorTree_id) && DominatorTreeBinding::ConstructorEnabled(aCx, aObj)) {
345 0 : if (!DominatorTreeBinding::GetConstructorObject(aCx)) {
346 0 : return false;
347 : }
348 0 : *aResolvedp = true;
349 : }
350 :
351 13948 : if (JSID_IS_VOID(aId) || aId == sErrorEvent_id) {
352 0 : if (!ErrorEventBinding::GetConstructorObject(aCx)) {
353 0 : return false;
354 : }
355 0 : *aResolvedp = true;
356 : }
357 :
358 13948 : if (JSID_IS_VOID(aId) || aId == sEvent_id) {
359 0 : if (!EventBinding::GetConstructorObject(aCx)) {
360 0 : return false;
361 : }
362 0 : *aResolvedp = true;
363 : }
364 :
365 13948 : if (JSID_IS_VOID(aId) || aId == sEventTarget_id) {
366 0 : if (!EventTargetBinding::GetConstructorObject(aCx)) {
367 0 : return false;
368 : }
369 0 : *aResolvedp = true;
370 : }
371 :
372 13948 : if (JSID_IS_VOID(aId) || aId == sFileReader_id) {
373 0 : if (!FileReaderBinding::GetConstructorObject(aCx)) {
374 0 : return false;
375 : }
376 0 : *aResolvedp = true;
377 : }
378 :
379 13948 : if ((JSID_IS_VOID(aId) || aId == sFlyWebDiscoveryManager_id) && FlyWebDiscoveryManagerBinding::ConstructorEnabled(aCx, aObj)) {
380 0 : if (!FlyWebDiscoveryManagerBinding::GetConstructorObject(aCx)) {
381 0 : return false;
382 : }
383 0 : *aResolvedp = true;
384 : }
385 :
386 13948 : if ((JSID_IS_VOID(aId) || aId == sHeapSnapshot_id) && HeapSnapshotBinding::ConstructorEnabled(aCx, aObj)) {
387 1 : if (!HeapSnapshotBinding::GetConstructorObject(aCx)) {
388 0 : return false;
389 : }
390 1 : *aResolvedp = true;
391 : }
392 :
393 13948 : if (JSID_IS_VOID(aId) || aId == sIDBCursor_id) {
394 0 : if (!IDBCursorBinding::GetConstructorObject(aCx)) {
395 0 : return false;
396 : }
397 0 : *aResolvedp = true;
398 : }
399 :
400 13948 : if (JSID_IS_VOID(aId) || aId == sIDBCursorWithValue_id) {
401 0 : if (!IDBCursorWithValueBinding::GetConstructorObject(aCx)) {
402 0 : return false;
403 : }
404 0 : *aResolvedp = true;
405 : }
406 :
407 13948 : if (JSID_IS_VOID(aId) || aId == sIDBDatabase_id) {
408 0 : if (!IDBDatabaseBinding::GetConstructorObject(aCx)) {
409 0 : return false;
410 : }
411 0 : *aResolvedp = true;
412 : }
413 :
414 13948 : if (JSID_IS_VOID(aId) || aId == sIDBFactory_id) {
415 0 : if (!IDBFactoryBinding::GetConstructorObject(aCx)) {
416 0 : return false;
417 : }
418 0 : *aResolvedp = true;
419 : }
420 :
421 13948 : if (JSID_IS_VOID(aId) || aId == sIDBFileHandle_id) {
422 0 : if (!IDBFileHandleBinding::GetConstructorObject(aCx)) {
423 0 : return false;
424 : }
425 0 : *aResolvedp = true;
426 : }
427 :
428 13948 : if (JSID_IS_VOID(aId) || aId == sIDBFileRequest_id) {
429 0 : if (!IDBFileRequestBinding::GetConstructorObject(aCx)) {
430 0 : return false;
431 : }
432 0 : *aResolvedp = true;
433 : }
434 :
435 13948 : if (JSID_IS_VOID(aId) || aId == sIDBIndex_id) {
436 0 : if (!IDBIndexBinding::GetConstructorObject(aCx)) {
437 0 : return false;
438 : }
439 0 : *aResolvedp = true;
440 : }
441 :
442 13948 : if (JSID_IS_VOID(aId) || aId == sIDBKeyRange_id) {
443 0 : if (!IDBKeyRangeBinding::GetConstructorObject(aCx)) {
444 0 : return false;
445 : }
446 0 : *aResolvedp = true;
447 : }
448 :
449 13948 : if ((JSID_IS_VOID(aId) || aId == sIDBLocaleAwareKeyRange_id) && IDBLocaleAwareKeyRangeBinding::ConstructorEnabled(aCx, aObj)) {
450 0 : if (!IDBLocaleAwareKeyRangeBinding::GetConstructorObject(aCx)) {
451 0 : return false;
452 : }
453 0 : *aResolvedp = true;
454 : }
455 :
456 13948 : if (JSID_IS_VOID(aId) || aId == sIDBMutableFile_id) {
457 0 : if (!IDBMutableFileBinding::GetConstructorObject(aCx)) {
458 0 : return false;
459 : }
460 0 : *aResolvedp = true;
461 : }
462 :
463 13948 : if (JSID_IS_VOID(aId) || aId == sIDBObjectStore_id) {
464 0 : if (!IDBObjectStoreBinding::GetConstructorObject(aCx)) {
465 0 : return false;
466 : }
467 0 : *aResolvedp = true;
468 : }
469 :
470 13948 : if (JSID_IS_VOID(aId) || aId == sIDBOpenDBRequest_id) {
471 0 : if (!IDBOpenDBRequestBinding::GetConstructorObject(aCx)) {
472 0 : return false;
473 : }
474 0 : *aResolvedp = true;
475 : }
476 :
477 13948 : if (JSID_IS_VOID(aId) || aId == sIDBRequest_id) {
478 0 : if (!IDBRequestBinding::GetConstructorObject(aCx)) {
479 0 : return false;
480 : }
481 0 : *aResolvedp = true;
482 : }
483 :
484 13948 : if (JSID_IS_VOID(aId) || aId == sIDBTransaction_id) {
485 0 : if (!IDBTransactionBinding::GetConstructorObject(aCx)) {
486 0 : return false;
487 : }
488 0 : *aResolvedp = true;
489 : }
490 :
491 13948 : if (JSID_IS_VOID(aId) || aId == sIDBVersionChangeEvent_id) {
492 0 : if (!IDBVersionChangeEventBinding::GetConstructorObject(aCx)) {
493 0 : return false;
494 : }
495 0 : *aResolvedp = true;
496 : }
497 :
498 13948 : if ((JSID_IS_VOID(aId) || aId == sMatchGlob_id) && MatchGlobBinding::ConstructorEnabled(aCx, aObj)) {
499 0 : if (!MatchGlobBinding::GetConstructorObject(aCx)) {
500 0 : return false;
501 : }
502 0 : *aResolvedp = true;
503 : }
504 :
505 13948 : if ((JSID_IS_VOID(aId) || aId == sMatchPattern_id) && MatchPatternBinding::ConstructorEnabled(aCx, aObj)) {
506 0 : if (!MatchPatternBinding::GetConstructorObject(aCx)) {
507 0 : return false;
508 : }
509 0 : *aResolvedp = true;
510 : }
511 :
512 13948 : if ((JSID_IS_VOID(aId) || aId == sMatchPatternSet_id) && MatchPatternSetBinding::ConstructorEnabled(aCx, aObj)) {
513 0 : if (!MatchPatternSetBinding::GetConstructorObject(aCx)) {
514 0 : return false;
515 : }
516 0 : *aResolvedp = true;
517 : }
518 :
519 13948 : if (JSID_IS_VOID(aId) || aId == sMessageEvent_id) {
520 0 : if (!MessageEventBinding::GetConstructorObject(aCx)) {
521 0 : return false;
522 : }
523 0 : *aResolvedp = true;
524 : }
525 :
526 13948 : if (JSID_IS_VOID(aId) || aId == sMessagePort_id) {
527 3 : if (!MessagePortBinding::GetConstructorObject(aCx)) {
528 0 : return false;
529 : }
530 3 : *aResolvedp = true;
531 : }
532 :
533 13948 : if ((JSID_IS_VOID(aId) || aId == sPrecompiledScript_id) && PrecompiledScriptBinding::ConstructorEnabled(aCx, aObj)) {
534 0 : if (!PrecompiledScriptBinding::GetConstructorObject(aCx)) {
535 0 : return false;
536 : }
537 0 : *aResolvedp = true;
538 : }
539 :
540 13948 : if ((JSID_IS_VOID(aId) || aId == sPromiseDebugging_id) && PromiseDebuggingBinding::ConstructorEnabled(aCx, aObj)) {
541 1 : if (!PromiseDebuggingBinding::GetConstructorObject(aCx)) {
542 0 : return false;
543 : }
544 1 : *aResolvedp = true;
545 : }
546 :
547 13948 : if ((JSID_IS_VOID(aId) || aId == sStructuredCloneHolder_id) && StructuredCloneHolderBinding::ConstructorEnabled(aCx, aObj)) {
548 0 : if (!StructuredCloneHolderBinding::GetConstructorObject(aCx)) {
549 0 : return false;
550 : }
551 0 : *aResolvedp = true;
552 : }
553 :
554 13948 : if ((JSID_IS_VOID(aId) || aId == sTCPServerSocket_id) && TCPServerSocketBinding::ConstructorEnabled(aCx, aObj)) {
555 0 : if (!TCPServerSocketBinding::GetConstructorObject(aCx)) {
556 0 : return false;
557 : }
558 0 : *aResolvedp = true;
559 : }
560 :
561 13948 : if ((JSID_IS_VOID(aId) || aId == sTCPServerSocketEvent_id) && TCPServerSocketEventBinding::ConstructorEnabled(aCx, aObj)) {
562 0 : if (!TCPServerSocketEventBinding::GetConstructorObject(aCx)) {
563 0 : return false;
564 : }
565 0 : *aResolvedp = true;
566 : }
567 :
568 13948 : if ((JSID_IS_VOID(aId) || aId == sTCPSocket_id) && TCPSocketBinding::ConstructorEnabled(aCx, aObj)) {
569 0 : if (!TCPSocketBinding::GetConstructorObject(aCx)) {
570 0 : return false;
571 : }
572 0 : *aResolvedp = true;
573 : }
574 :
575 13948 : if ((JSID_IS_VOID(aId) || aId == sTCPSocketErrorEvent_id) && TCPSocketErrorEventBinding::ConstructorEnabled(aCx, aObj)) {
576 0 : if (!TCPSocketErrorEventBinding::GetConstructorObject(aCx)) {
577 0 : return false;
578 : }
579 0 : *aResolvedp = true;
580 : }
581 :
582 13948 : if ((JSID_IS_VOID(aId) || aId == sTCPSocketEvent_id) && TCPSocketEventBinding::ConstructorEnabled(aCx, aObj)) {
583 0 : if (!TCPSocketEventBinding::GetConstructorObject(aCx)) {
584 0 : return false;
585 : }
586 0 : *aResolvedp = true;
587 : }
588 :
589 13948 : if (JSID_IS_VOID(aId) || aId == sTextDecoder_id) {
590 1 : if (!TextDecoderBinding::GetConstructorObject(aCx)) {
591 0 : return false;
592 : }
593 1 : *aResolvedp = true;
594 : }
595 :
596 13948 : if (JSID_IS_VOID(aId) || aId == sTextEncoder_id) {
597 1 : if (!TextEncoderBinding::GetConstructorObject(aCx)) {
598 0 : return false;
599 : }
600 1 : *aResolvedp = true;
601 : }
602 :
603 13948 : if ((JSID_IS_VOID(aId) || aId == sThreadSafeChromeUtils_id) && ThreadSafeChromeUtilsBinding::ConstructorEnabled(aCx, aObj)) {
604 0 : if (!ThreadSafeChromeUtilsBinding::GetConstructorObject(aCx)) {
605 0 : return false;
606 : }
607 0 : *aResolvedp = true;
608 : }
609 :
610 13948 : if (JSID_IS_VOID(aId) || aId == sURLSearchParams_id) {
611 0 : if (!URLSearchParamsBinding::GetConstructorObject(aCx)) {
612 0 : return false;
613 : }
614 0 : *aResolvedp = true;
615 : }
616 :
617 13948 : if ((JSID_IS_VOID(aId) || aId == sWebExtensionContentScript_id) && WebExtensionContentScriptBinding::ConstructorEnabled(aCx, aObj)) {
618 0 : if (!WebExtensionContentScriptBinding::GetConstructorObject(aCx)) {
619 0 : return false;
620 : }
621 0 : *aResolvedp = true;
622 : }
623 :
624 13948 : if ((JSID_IS_VOID(aId) || aId == sWebExtensionPolicy_id) && WebExtensionPolicyBinding::ConstructorEnabled(aCx, aObj)) {
625 0 : if (!WebExtensionPolicyBinding::GetConstructorObject(aCx)) {
626 0 : return false;
627 : }
628 0 : *aResolvedp = true;
629 : }
630 :
631 13948 : if ((JSID_IS_VOID(aId) || aId == sWorker_id) && WorkerBinding::ConstructorEnabled(aCx, aObj)) {
632 1 : if (!WorkerBinding::GetConstructorObject(aCx)) {
633 0 : return false;
634 : }
635 1 : *aResolvedp = true;
636 : }
637 :
638 13948 : return true;
639 : }
640 :
641 : } // namespace dom
642 : } // namespace mozilla
643 :
|