Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM SubtleCrypto.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_SubtleCryptoBinding_h
4 : #define mozilla_dom_SubtleCryptoBinding_h
5 :
6 : #include "SubtleCryptoBinding.h"
7 : #include "js/RootingAPI.h"
8 : #include "jspubtd.h"
9 : #include "mozilla/ErrorResult.h"
10 : #include "mozilla/dom/BindingDeclarations.h"
11 : #include "mozilla/dom/CryptoKey.h"
12 : #include "mozilla/dom/Nullable.h"
13 : #include "mozilla/dom/TypedArray.h"
14 : #include "mozilla/dom/UnionTypes.h"
15 :
16 : namespace mozilla {
17 : namespace dom {
18 :
19 : struct AesCbcParamsAtoms;
20 : struct AesCtrParamsAtoms;
21 : struct AesDerivedKeyParamsAtoms;
22 : struct AesGcmParamsAtoms;
23 : struct AesKeyGenParamsAtoms;
24 : struct AlgorithmAtoms;
25 : class ArrayBufferViewOrArrayBuffer;
26 : class CryptoKey;
27 : struct CryptoKeyAtoms;
28 : struct CryptoKeyPairAtoms;
29 : struct DhImportKeyParamsAtoms;
30 : struct DhKeyDeriveParamsAtoms;
31 : struct DhKeyGenParamsAtoms;
32 : struct EcKeyGenParamsAtoms;
33 : struct EcKeyImportParamsAtoms;
34 : struct EcdhKeyDeriveParamsAtoms;
35 : struct EcdsaParamsAtoms;
36 : struct HkdfParamsAtoms;
37 : struct HmacDerivedKeyParamsAtoms;
38 : struct HmacImportParamsAtoms;
39 : struct HmacKeyGenParamsAtoms;
40 : struct JsonWebKeyAtoms;
41 : struct NativePropertyHooks;
42 : class ObjectOrString;
43 : class OwningArrayBufferViewOrArrayBuffer;
44 : class OwningObjectOrString;
45 : struct Pbkdf2ParamsAtoms;
46 : class ProtoAndIfaceCache;
47 : struct RsaHashedImportParamsAtoms;
48 : struct RsaHashedKeyGenParamsAtoms;
49 : struct RsaOaepParamsAtoms;
50 : struct RsaOtherPrimesInfo;
51 : struct RsaOtherPrimesInfoAtoms;
52 : struct RsaPssParamsAtoms;
53 : class SubtleCrypto;
54 : struct SubtleCryptoAtoms;
55 :
56 : } // namespace dom
57 : } // namespace mozilla
58 :
59 : namespace mozilla {
60 : namespace dom {
61 :
62 0 : struct Algorithm : public DictionaryBase
63 : {
64 : MOZ_INIT_OUTSIDE_CTOR nsString mName;
65 :
66 : Algorithm();
67 :
68 0 : explicit inline Algorithm(const FastDictionaryInitializer& )
69 0 : {
70 : // Do nothing here; this is used by our "Fast" subclass
71 0 : }
72 :
73 : explicit inline Algorithm(const Algorithm& aOther)
74 : {
75 : *this = aOther;
76 : }
77 :
78 : bool
79 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
80 :
81 : bool
82 : Init(const nsAString& aJSON);
83 :
84 : bool
85 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
86 :
87 : bool
88 : ToJSON(nsAString& aJSON) const;
89 :
90 : void
91 : TraceDictionary(JSTracer* trc);
92 :
93 : Algorithm&
94 : operator=(const Algorithm& aOther);
95 :
96 : private:
97 : static bool
98 : InitIds(JSContext* cx, AlgorithmAtoms* atomsCache);
99 : };
100 :
101 : namespace binding_detail {
102 : struct FastAlgorithm : public Algorithm
103 : {
104 : inline FastAlgorithm()
105 : : Algorithm(FastDictionaryInitializer())
106 : {
107 : // Doesn't matter what int we pass to the parent constructor
108 : }
109 : };
110 : } // namespace binding_detail
111 :
112 :
113 0 : struct CryptoKeyPair : public DictionaryBase
114 : {
115 : MOZ_INIT_OUTSIDE_CTOR OwningNonNull<mozilla::dom::CryptoKey> mPrivateKey;
116 : MOZ_INIT_OUTSIDE_CTOR OwningNonNull<mozilla::dom::CryptoKey> mPublicKey;
117 :
118 : CryptoKeyPair();
119 :
120 : explicit inline CryptoKeyPair(const FastDictionaryInitializer& )
121 : {
122 : // Do nothing here; this is used by our "Fast" subclass
123 : }
124 :
125 : explicit inline CryptoKeyPair(const CryptoKeyPair& aOther)
126 : {
127 : *this = aOther;
128 : }
129 :
130 : bool
131 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
132 :
133 : bool
134 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
135 :
136 : void
137 : TraceDictionary(JSTracer* trc);
138 :
139 : CryptoKeyPair&
140 : operator=(const CryptoKeyPair& aOther);
141 :
142 : private:
143 : static bool
144 : InitIds(JSContext* cx, CryptoKeyPairAtoms* atomsCache);
145 : };
146 :
147 : namespace binding_detail {
148 : struct FastCryptoKeyPair : public CryptoKeyPair
149 : {
150 : inline FastCryptoKeyPair()
151 : : CryptoKeyPair(FastDictionaryInitializer())
152 : {
153 : // Doesn't matter what int we pass to the parent constructor
154 : }
155 : };
156 : } // namespace binding_detail
157 :
158 :
159 0 : struct RsaHashedImportParams : public DictionaryBase
160 : {
161 : MOZ_INIT_OUTSIDE_CTOR OwningObjectOrString mHash;
162 :
163 : RsaHashedImportParams();
164 :
165 : explicit inline RsaHashedImportParams(const FastDictionaryInitializer& )
166 : {
167 : // Do nothing here; this is used by our "Fast" subclass
168 : }
169 :
170 : private:
171 : RsaHashedImportParams(const RsaHashedImportParams&) = delete;
172 : RsaHashedImportParams& operator=(const RsaHashedImportParams&) = delete;
173 :
174 : static bool
175 : InitIds(JSContext* cx, RsaHashedImportParamsAtoms* atomsCache);
176 :
177 : public:
178 : bool
179 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
180 :
181 : bool
182 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
183 :
184 : void
185 : TraceDictionary(JSTracer* trc);
186 : };
187 :
188 : namespace binding_detail {
189 : struct FastRsaHashedImportParams : public RsaHashedImportParams
190 : {
191 : inline FastRsaHashedImportParams()
192 : : RsaHashedImportParams(FastDictionaryInitializer())
193 : {
194 : // Doesn't matter what int we pass to the parent constructor
195 : }
196 : };
197 : } // namespace binding_detail
198 :
199 :
200 0 : struct RsaOtherPrimesInfo : public DictionaryBase
201 : {
202 : MOZ_INIT_OUTSIDE_CTOR nsString mD;
203 : MOZ_INIT_OUTSIDE_CTOR nsString mR;
204 : MOZ_INIT_OUTSIDE_CTOR nsString mT;
205 :
206 : RsaOtherPrimesInfo();
207 :
208 : explicit inline RsaOtherPrimesInfo(const FastDictionaryInitializer& )
209 : {
210 : // Do nothing here; this is used by our "Fast" subclass
211 : }
212 :
213 0 : explicit inline RsaOtherPrimesInfo(const RsaOtherPrimesInfo& aOther)
214 0 : {
215 0 : *this = aOther;
216 0 : }
217 :
218 : bool
219 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
220 :
221 : bool
222 : Init(const nsAString& aJSON);
223 :
224 : bool
225 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
226 :
227 : bool
228 : ToJSON(nsAString& aJSON) const;
229 :
230 : void
231 : TraceDictionary(JSTracer* trc);
232 :
233 : RsaOtherPrimesInfo&
234 : operator=(const RsaOtherPrimesInfo& aOther);
235 :
236 : private:
237 : static bool
238 : InitIds(JSContext* cx, RsaOtherPrimesInfoAtoms* atomsCache);
239 : };
240 :
241 : namespace binding_detail {
242 : struct FastRsaOtherPrimesInfo : public RsaOtherPrimesInfo
243 : {
244 : inline FastRsaOtherPrimesInfo()
245 : : RsaOtherPrimesInfo(FastDictionaryInitializer())
246 : {
247 : // Doesn't matter what int we pass to the parent constructor
248 : }
249 : };
250 : } // namespace binding_detail
251 :
252 :
253 0 : struct AesCbcParams : public Algorithm
254 : {
255 : MOZ_INIT_OUTSIDE_CTOR OwningArrayBufferViewOrArrayBuffer mIv;
256 :
257 : AesCbcParams();
258 :
259 : explicit inline AesCbcParams(const FastDictionaryInitializer& )
260 : : Algorithm(FastDictionaryInitializer())
261 : {
262 : // Do nothing here; this is used by our "Fast" subclass
263 : }
264 :
265 : private:
266 : AesCbcParams(const AesCbcParams&) = delete;
267 : AesCbcParams& operator=(const AesCbcParams&) = delete;
268 :
269 : static bool
270 : InitIds(JSContext* cx, AesCbcParamsAtoms* atomsCache);
271 :
272 : public:
273 : bool
274 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
275 :
276 : bool
277 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
278 :
279 : void
280 : TraceDictionary(JSTracer* trc);
281 : };
282 :
283 : namespace binding_detail {
284 : struct FastAesCbcParams : public AesCbcParams
285 : {
286 : inline FastAesCbcParams()
287 : : AesCbcParams(FastDictionaryInitializer())
288 : {
289 : // Doesn't matter what int we pass to the parent constructor
290 : }
291 : };
292 : } // namespace binding_detail
293 :
294 :
295 0 : struct AesCtrParams : public Algorithm
296 : {
297 : MOZ_INIT_OUTSIDE_CTOR OwningArrayBufferViewOrArrayBuffer mCounter;
298 : MOZ_INIT_OUTSIDE_CTOR uint8_t mLength;
299 :
300 : AesCtrParams();
301 :
302 : explicit inline AesCtrParams(const FastDictionaryInitializer& )
303 : : Algorithm(FastDictionaryInitializer())
304 : {
305 : // Do nothing here; this is used by our "Fast" subclass
306 : }
307 :
308 : private:
309 : AesCtrParams(const AesCtrParams&) = delete;
310 : AesCtrParams& operator=(const AesCtrParams&) = delete;
311 :
312 : static bool
313 : InitIds(JSContext* cx, AesCtrParamsAtoms* atomsCache);
314 :
315 : public:
316 : bool
317 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
318 :
319 : bool
320 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
321 :
322 : void
323 : TraceDictionary(JSTracer* trc);
324 : };
325 :
326 : namespace binding_detail {
327 : struct FastAesCtrParams : public AesCtrParams
328 : {
329 : inline FastAesCtrParams()
330 : : AesCtrParams(FastDictionaryInitializer())
331 : {
332 : // Doesn't matter what int we pass to the parent constructor
333 : }
334 : };
335 : } // namespace binding_detail
336 :
337 :
338 0 : struct AesDerivedKeyParams : public Algorithm
339 : {
340 : MOZ_INIT_OUTSIDE_CTOR uint32_t mLength;
341 :
342 : AesDerivedKeyParams();
343 :
344 : explicit inline AesDerivedKeyParams(const FastDictionaryInitializer& )
345 : : Algorithm(FastDictionaryInitializer())
346 : {
347 : // Do nothing here; this is used by our "Fast" subclass
348 : }
349 :
350 : explicit inline AesDerivedKeyParams(const AesDerivedKeyParams& aOther)
351 : {
352 : *this = aOther;
353 : }
354 :
355 : bool
356 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
357 :
358 : bool
359 : Init(const nsAString& aJSON);
360 :
361 : bool
362 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
363 :
364 : bool
365 : ToJSON(nsAString& aJSON) const;
366 :
367 : void
368 : TraceDictionary(JSTracer* trc);
369 :
370 : AesDerivedKeyParams&
371 : operator=(const AesDerivedKeyParams& aOther);
372 :
373 : private:
374 : static bool
375 : InitIds(JSContext* cx, AesDerivedKeyParamsAtoms* atomsCache);
376 : };
377 :
378 : namespace binding_detail {
379 : struct FastAesDerivedKeyParams : public AesDerivedKeyParams
380 : {
381 : inline FastAesDerivedKeyParams()
382 : : AesDerivedKeyParams(FastDictionaryInitializer())
383 : {
384 : // Doesn't matter what int we pass to the parent constructor
385 : }
386 : };
387 : } // namespace binding_detail
388 :
389 :
390 0 : struct AesGcmParams : public Algorithm
391 : {
392 : MOZ_INIT_OUTSIDE_CTOR Optional<OwningArrayBufferViewOrArrayBuffer> mAdditionalData;
393 : MOZ_INIT_OUTSIDE_CTOR OwningArrayBufferViewOrArrayBuffer mIv;
394 : MOZ_INIT_OUTSIDE_CTOR Optional<uint8_t> mTagLength;
395 :
396 : AesGcmParams();
397 :
398 : explicit inline AesGcmParams(const FastDictionaryInitializer& )
399 : : Algorithm(FastDictionaryInitializer())
400 : {
401 : // Do nothing here; this is used by our "Fast" subclass
402 : }
403 :
404 : private:
405 : AesGcmParams(const AesGcmParams&) = delete;
406 : AesGcmParams& operator=(const AesGcmParams&) = delete;
407 :
408 : static bool
409 : InitIds(JSContext* cx, AesGcmParamsAtoms* atomsCache);
410 :
411 : public:
412 : bool
413 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
414 :
415 : bool
416 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
417 :
418 : void
419 : TraceDictionary(JSTracer* trc);
420 : };
421 :
422 : namespace binding_detail {
423 : struct FastAesGcmParams : public AesGcmParams
424 : {
425 : inline FastAesGcmParams()
426 : : AesGcmParams(FastDictionaryInitializer())
427 : {
428 : // Doesn't matter what int we pass to the parent constructor
429 : }
430 : };
431 : } // namespace binding_detail
432 :
433 :
434 : struct AesKeyGenParams : public Algorithm
435 : {
436 : MOZ_INIT_OUTSIDE_CTOR uint16_t mLength;
437 :
438 : AesKeyGenParams();
439 :
440 : explicit inline AesKeyGenParams(const FastDictionaryInitializer& )
441 : : Algorithm(FastDictionaryInitializer())
442 : {
443 : // Do nothing here; this is used by our "Fast" subclass
444 : }
445 :
446 : explicit inline AesKeyGenParams(const AesKeyGenParams& aOther)
447 : {
448 : *this = aOther;
449 : }
450 :
451 : bool
452 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
453 :
454 : bool
455 : Init(const nsAString& aJSON);
456 :
457 : bool
458 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
459 :
460 : bool
461 : ToJSON(nsAString& aJSON) const;
462 :
463 : void
464 : TraceDictionary(JSTracer* trc);
465 :
466 : AesKeyGenParams&
467 : operator=(const AesKeyGenParams& aOther);
468 :
469 : private:
470 : static bool
471 : InitIds(JSContext* cx, AesKeyGenParamsAtoms* atomsCache);
472 : };
473 :
474 : namespace binding_detail {
475 : struct FastAesKeyGenParams : public AesKeyGenParams
476 : {
477 : inline FastAesKeyGenParams()
478 : : AesKeyGenParams(FastDictionaryInitializer())
479 : {
480 : // Doesn't matter what int we pass to the parent constructor
481 : }
482 : };
483 : } // namespace binding_detail
484 :
485 :
486 0 : struct DhImportKeyParams : public Algorithm
487 : {
488 : MOZ_INIT_OUTSIDE_CTOR Uint8Array mGenerator;
489 : MOZ_INIT_OUTSIDE_CTOR Uint8Array mPrime;
490 :
491 : DhImportKeyParams();
492 :
493 : explicit inline DhImportKeyParams(const FastDictionaryInitializer& )
494 : : Algorithm(FastDictionaryInitializer())
495 : {
496 : // Do nothing here; this is used by our "Fast" subclass
497 : }
498 :
499 : private:
500 : DhImportKeyParams(const DhImportKeyParams&) = delete;
501 : DhImportKeyParams& operator=(const DhImportKeyParams&) = delete;
502 :
503 : static bool
504 : InitIds(JSContext* cx, DhImportKeyParamsAtoms* atomsCache);
505 :
506 : public:
507 : bool
508 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
509 :
510 : bool
511 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
512 :
513 : void
514 : TraceDictionary(JSTracer* trc);
515 : };
516 :
517 : namespace binding_detail {
518 : struct FastDhImportKeyParams : public DhImportKeyParams
519 : {
520 : inline FastDhImportKeyParams()
521 : : DhImportKeyParams(FastDictionaryInitializer())
522 : {
523 : // Doesn't matter what int we pass to the parent constructor
524 : }
525 : };
526 : } // namespace binding_detail
527 :
528 :
529 0 : struct DhKeyDeriveParams : public Algorithm
530 : {
531 : MOZ_INIT_OUTSIDE_CTOR OwningNonNull<mozilla::dom::CryptoKey> mPublic;
532 :
533 : DhKeyDeriveParams();
534 :
535 : explicit inline DhKeyDeriveParams(const FastDictionaryInitializer& )
536 : : Algorithm(FastDictionaryInitializer())
537 : {
538 : // Do nothing here; this is used by our "Fast" subclass
539 : }
540 :
541 : explicit inline DhKeyDeriveParams(const DhKeyDeriveParams& aOther)
542 : {
543 : *this = aOther;
544 : }
545 :
546 : bool
547 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
548 :
549 : bool
550 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
551 :
552 : void
553 : TraceDictionary(JSTracer* trc);
554 :
555 : DhKeyDeriveParams&
556 : operator=(const DhKeyDeriveParams& aOther);
557 :
558 : private:
559 : static bool
560 : InitIds(JSContext* cx, DhKeyDeriveParamsAtoms* atomsCache);
561 : };
562 :
563 : namespace binding_detail {
564 : struct FastDhKeyDeriveParams : public DhKeyDeriveParams
565 : {
566 : inline FastDhKeyDeriveParams()
567 : : DhKeyDeriveParams(FastDictionaryInitializer())
568 : {
569 : // Doesn't matter what int we pass to the parent constructor
570 : }
571 : };
572 : } // namespace binding_detail
573 :
574 :
575 0 : struct DhKeyGenParams : public Algorithm
576 : {
577 : MOZ_INIT_OUTSIDE_CTOR Uint8Array mGenerator;
578 : MOZ_INIT_OUTSIDE_CTOR Uint8Array mPrime;
579 :
580 : DhKeyGenParams();
581 :
582 : explicit inline DhKeyGenParams(const FastDictionaryInitializer& )
583 : : Algorithm(FastDictionaryInitializer())
584 : {
585 : // Do nothing here; this is used by our "Fast" subclass
586 : }
587 :
588 : private:
589 : DhKeyGenParams(const DhKeyGenParams&) = delete;
590 : DhKeyGenParams& operator=(const DhKeyGenParams&) = delete;
591 :
592 : static bool
593 : InitIds(JSContext* cx, DhKeyGenParamsAtoms* atomsCache);
594 :
595 : public:
596 : bool
597 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
598 :
599 : bool
600 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
601 :
602 : void
603 : TraceDictionary(JSTracer* trc);
604 : };
605 :
606 : namespace binding_detail {
607 : struct FastDhKeyGenParams : public DhKeyGenParams
608 : {
609 : inline FastDhKeyGenParams()
610 : : DhKeyGenParams(FastDictionaryInitializer())
611 : {
612 : // Doesn't matter what int we pass to the parent constructor
613 : }
614 : };
615 : } // namespace binding_detail
616 :
617 :
618 0 : struct EcKeyGenParams : public Algorithm
619 : {
620 : MOZ_INIT_OUTSIDE_CTOR nsString mNamedCurve;
621 :
622 : EcKeyGenParams();
623 :
624 : explicit inline EcKeyGenParams(const FastDictionaryInitializer& )
625 : : Algorithm(FastDictionaryInitializer())
626 : {
627 : // Do nothing here; this is used by our "Fast" subclass
628 : }
629 :
630 : explicit inline EcKeyGenParams(const EcKeyGenParams& aOther)
631 : {
632 : *this = aOther;
633 : }
634 :
635 : bool
636 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
637 :
638 : bool
639 : Init(const nsAString& aJSON);
640 :
641 : bool
642 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
643 :
644 : bool
645 : ToJSON(nsAString& aJSON) const;
646 :
647 : void
648 : TraceDictionary(JSTracer* trc);
649 :
650 : EcKeyGenParams&
651 : operator=(const EcKeyGenParams& aOther);
652 :
653 : private:
654 : static bool
655 : InitIds(JSContext* cx, EcKeyGenParamsAtoms* atomsCache);
656 : };
657 :
658 : namespace binding_detail {
659 : struct FastEcKeyGenParams : public EcKeyGenParams
660 : {
661 : inline FastEcKeyGenParams()
662 : : EcKeyGenParams(FastDictionaryInitializer())
663 : {
664 : // Doesn't matter what int we pass to the parent constructor
665 : }
666 : };
667 : } // namespace binding_detail
668 :
669 :
670 0 : struct EcKeyImportParams : public Algorithm
671 : {
672 : MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mNamedCurve;
673 :
674 : EcKeyImportParams();
675 :
676 : explicit inline EcKeyImportParams(const FastDictionaryInitializer& )
677 : : Algorithm(FastDictionaryInitializer())
678 : {
679 : // Do nothing here; this is used by our "Fast" subclass
680 : }
681 :
682 : explicit inline EcKeyImportParams(const EcKeyImportParams& aOther)
683 : {
684 : *this = aOther;
685 : }
686 :
687 : bool
688 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
689 :
690 : bool
691 : Init(const nsAString& aJSON);
692 :
693 : bool
694 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
695 :
696 : bool
697 : ToJSON(nsAString& aJSON) const;
698 :
699 : void
700 : TraceDictionary(JSTracer* trc);
701 :
702 : EcKeyImportParams&
703 : operator=(const EcKeyImportParams& aOther);
704 :
705 : private:
706 : static bool
707 : InitIds(JSContext* cx, EcKeyImportParamsAtoms* atomsCache);
708 : };
709 :
710 : namespace binding_detail {
711 : struct FastEcKeyImportParams : public EcKeyImportParams
712 : {
713 : inline FastEcKeyImportParams()
714 : : EcKeyImportParams(FastDictionaryInitializer())
715 : {
716 : // Doesn't matter what int we pass to the parent constructor
717 : }
718 : };
719 : } // namespace binding_detail
720 :
721 :
722 0 : struct EcdhKeyDeriveParams : public Algorithm
723 : {
724 : MOZ_INIT_OUTSIDE_CTOR OwningNonNull<mozilla::dom::CryptoKey> mPublic;
725 :
726 : EcdhKeyDeriveParams();
727 :
728 : explicit inline EcdhKeyDeriveParams(const FastDictionaryInitializer& )
729 : : Algorithm(FastDictionaryInitializer())
730 : {
731 : // Do nothing here; this is used by our "Fast" subclass
732 : }
733 :
734 : explicit inline EcdhKeyDeriveParams(const EcdhKeyDeriveParams& aOther)
735 : {
736 : *this = aOther;
737 : }
738 :
739 : bool
740 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
741 :
742 : bool
743 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
744 :
745 : void
746 : TraceDictionary(JSTracer* trc);
747 :
748 : EcdhKeyDeriveParams&
749 : operator=(const EcdhKeyDeriveParams& aOther);
750 :
751 : private:
752 : static bool
753 : InitIds(JSContext* cx, EcdhKeyDeriveParamsAtoms* atomsCache);
754 : };
755 :
756 : namespace binding_detail {
757 : struct FastEcdhKeyDeriveParams : public EcdhKeyDeriveParams
758 : {
759 : inline FastEcdhKeyDeriveParams()
760 : : EcdhKeyDeriveParams(FastDictionaryInitializer())
761 : {
762 : // Doesn't matter what int we pass to the parent constructor
763 : }
764 : };
765 : } // namespace binding_detail
766 :
767 :
768 0 : struct EcdsaParams : public Algorithm
769 : {
770 : MOZ_INIT_OUTSIDE_CTOR OwningObjectOrString mHash;
771 :
772 : EcdsaParams();
773 :
774 : explicit inline EcdsaParams(const FastDictionaryInitializer& )
775 : : Algorithm(FastDictionaryInitializer())
776 : {
777 : // Do nothing here; this is used by our "Fast" subclass
778 : }
779 :
780 : private:
781 : EcdsaParams(const EcdsaParams&) = delete;
782 : EcdsaParams& operator=(const EcdsaParams&) = delete;
783 :
784 : static bool
785 : InitIds(JSContext* cx, EcdsaParamsAtoms* atomsCache);
786 :
787 : public:
788 : bool
789 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
790 :
791 : bool
792 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
793 :
794 : void
795 : TraceDictionary(JSTracer* trc);
796 : };
797 :
798 : namespace binding_detail {
799 : struct FastEcdsaParams : public EcdsaParams
800 : {
801 : inline FastEcdsaParams()
802 : : EcdsaParams(FastDictionaryInitializer())
803 : {
804 : // Doesn't matter what int we pass to the parent constructor
805 : }
806 : };
807 : } // namespace binding_detail
808 :
809 :
810 0 : struct HkdfParams : public Algorithm
811 : {
812 : MOZ_INIT_OUTSIDE_CTOR OwningObjectOrString mHash;
813 : MOZ_INIT_OUTSIDE_CTOR OwningArrayBufferViewOrArrayBuffer mInfo;
814 : MOZ_INIT_OUTSIDE_CTOR OwningArrayBufferViewOrArrayBuffer mSalt;
815 :
816 : HkdfParams();
817 :
818 : explicit inline HkdfParams(const FastDictionaryInitializer& )
819 : : Algorithm(FastDictionaryInitializer())
820 : {
821 : // Do nothing here; this is used by our "Fast" subclass
822 : }
823 :
824 : private:
825 : HkdfParams(const HkdfParams&) = delete;
826 : HkdfParams& operator=(const HkdfParams&) = delete;
827 :
828 : static bool
829 : InitIds(JSContext* cx, HkdfParamsAtoms* atomsCache);
830 :
831 : public:
832 : bool
833 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
834 :
835 : bool
836 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
837 :
838 : void
839 : TraceDictionary(JSTracer* trc);
840 : };
841 :
842 : namespace binding_detail {
843 : struct FastHkdfParams : public HkdfParams
844 : {
845 : inline FastHkdfParams()
846 : : HkdfParams(FastDictionaryInitializer())
847 : {
848 : // Doesn't matter what int we pass to the parent constructor
849 : }
850 : };
851 : } // namespace binding_detail
852 :
853 :
854 0 : struct HmacImportParams : public Algorithm
855 : {
856 : MOZ_INIT_OUTSIDE_CTOR OwningObjectOrString mHash;
857 :
858 : HmacImportParams();
859 :
860 0 : explicit inline HmacImportParams(const FastDictionaryInitializer& )
861 0 : : Algorithm(FastDictionaryInitializer())
862 : {
863 : // Do nothing here; this is used by our "Fast" subclass
864 0 : }
865 :
866 : private:
867 : HmacImportParams(const HmacImportParams&) = delete;
868 : HmacImportParams& operator=(const HmacImportParams&) = delete;
869 :
870 : static bool
871 : InitIds(JSContext* cx, HmacImportParamsAtoms* atomsCache);
872 :
873 : public:
874 : bool
875 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
876 :
877 : bool
878 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
879 :
880 : void
881 : TraceDictionary(JSTracer* trc);
882 : };
883 :
884 : namespace binding_detail {
885 : struct FastHmacImportParams : public HmacImportParams
886 : {
887 : inline FastHmacImportParams()
888 : : HmacImportParams(FastDictionaryInitializer())
889 : {
890 : // Doesn't matter what int we pass to the parent constructor
891 : }
892 : };
893 : } // namespace binding_detail
894 :
895 :
896 0 : struct HmacKeyGenParams : public Algorithm
897 : {
898 : MOZ_INIT_OUTSIDE_CTOR OwningObjectOrString mHash;
899 : MOZ_INIT_OUTSIDE_CTOR Optional<uint32_t> mLength;
900 :
901 : HmacKeyGenParams();
902 :
903 : explicit inline HmacKeyGenParams(const FastDictionaryInitializer& )
904 : : Algorithm(FastDictionaryInitializer())
905 : {
906 : // Do nothing here; this is used by our "Fast" subclass
907 : }
908 :
909 : private:
910 : HmacKeyGenParams(const HmacKeyGenParams&) = delete;
911 : HmacKeyGenParams& operator=(const HmacKeyGenParams&) = delete;
912 :
913 : static bool
914 : InitIds(JSContext* cx, HmacKeyGenParamsAtoms* atomsCache);
915 :
916 : public:
917 : bool
918 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
919 :
920 : bool
921 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
922 :
923 : void
924 : TraceDictionary(JSTracer* trc);
925 : };
926 :
927 : namespace binding_detail {
928 : struct FastHmacKeyGenParams : public HmacKeyGenParams
929 : {
930 : inline FastHmacKeyGenParams()
931 : : HmacKeyGenParams(FastDictionaryInitializer())
932 : {
933 : // Doesn't matter what int we pass to the parent constructor
934 : }
935 : };
936 : } // namespace binding_detail
937 :
938 :
939 0 : struct JsonWebKey : public DictionaryBase
940 : {
941 : MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mAlg;
942 : MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mCrv;
943 : MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mD;
944 : MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mDp;
945 : MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mDq;
946 : MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mE;
947 : MOZ_INIT_OUTSIDE_CTOR Optional<bool> mExt;
948 : MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mK;
949 : MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mKey_ops;
950 : MOZ_INIT_OUTSIDE_CTOR nsString mKty;
951 : MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mN;
952 : MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<RsaOtherPrimesInfo>> mOth;
953 : MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mP;
954 : MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mQ;
955 : MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mQi;
956 : MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mUse;
957 : MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mX;
958 : MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mY;
959 :
960 : JsonWebKey();
961 :
962 : explicit inline JsonWebKey(const FastDictionaryInitializer& )
963 : {
964 : // Do nothing here; this is used by our "Fast" subclass
965 : }
966 :
967 : explicit inline JsonWebKey(const JsonWebKey& aOther)
968 : {
969 : *this = aOther;
970 : }
971 :
972 : bool
973 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
974 :
975 : bool
976 : Init(const nsAString& aJSON);
977 :
978 : bool
979 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
980 :
981 : bool
982 : ToJSON(nsAString& aJSON) const;
983 :
984 : void
985 : TraceDictionary(JSTracer* trc);
986 :
987 : JsonWebKey&
988 : operator=(const JsonWebKey& aOther);
989 :
990 : private:
991 : static bool
992 : InitIds(JSContext* cx, JsonWebKeyAtoms* atomsCache);
993 : };
994 :
995 : namespace binding_detail {
996 : struct FastJsonWebKey : public JsonWebKey
997 : {
998 : inline FastJsonWebKey()
999 : : JsonWebKey(FastDictionaryInitializer())
1000 : {
1001 : // Doesn't matter what int we pass to the parent constructor
1002 : }
1003 : };
1004 : } // namespace binding_detail
1005 :
1006 :
1007 0 : struct Pbkdf2Params : public Algorithm
1008 : {
1009 : MOZ_INIT_OUTSIDE_CTOR OwningObjectOrString mHash;
1010 : MOZ_INIT_OUTSIDE_CTOR uint32_t mIterations;
1011 : MOZ_INIT_OUTSIDE_CTOR OwningArrayBufferViewOrArrayBuffer mSalt;
1012 :
1013 : Pbkdf2Params();
1014 :
1015 : explicit inline Pbkdf2Params(const FastDictionaryInitializer& )
1016 : : Algorithm(FastDictionaryInitializer())
1017 : {
1018 : // Do nothing here; this is used by our "Fast" subclass
1019 : }
1020 :
1021 : private:
1022 : Pbkdf2Params(const Pbkdf2Params&) = delete;
1023 : Pbkdf2Params& operator=(const Pbkdf2Params&) = delete;
1024 :
1025 : static bool
1026 : InitIds(JSContext* cx, Pbkdf2ParamsAtoms* atomsCache);
1027 :
1028 : public:
1029 : bool
1030 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
1031 :
1032 : bool
1033 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
1034 :
1035 : void
1036 : TraceDictionary(JSTracer* trc);
1037 : };
1038 :
1039 : namespace binding_detail {
1040 : struct FastPbkdf2Params : public Pbkdf2Params
1041 : {
1042 : inline FastPbkdf2Params()
1043 : : Pbkdf2Params(FastDictionaryInitializer())
1044 : {
1045 : // Doesn't matter what int we pass to the parent constructor
1046 : }
1047 : };
1048 : } // namespace binding_detail
1049 :
1050 :
1051 0 : struct RsaHashedKeyGenParams : public Algorithm
1052 : {
1053 : MOZ_INIT_OUTSIDE_CTOR OwningObjectOrString mHash;
1054 : MOZ_INIT_OUTSIDE_CTOR uint32_t mModulusLength;
1055 : MOZ_INIT_OUTSIDE_CTOR Uint8Array mPublicExponent;
1056 :
1057 : RsaHashedKeyGenParams();
1058 :
1059 : explicit inline RsaHashedKeyGenParams(const FastDictionaryInitializer& )
1060 : : Algorithm(FastDictionaryInitializer())
1061 : {
1062 : // Do nothing here; this is used by our "Fast" subclass
1063 : }
1064 :
1065 : private:
1066 : RsaHashedKeyGenParams(const RsaHashedKeyGenParams&) = delete;
1067 : RsaHashedKeyGenParams& operator=(const RsaHashedKeyGenParams&) = delete;
1068 :
1069 : static bool
1070 : InitIds(JSContext* cx, RsaHashedKeyGenParamsAtoms* atomsCache);
1071 :
1072 : public:
1073 : bool
1074 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
1075 :
1076 : bool
1077 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
1078 :
1079 : void
1080 : TraceDictionary(JSTracer* trc);
1081 : };
1082 :
1083 : namespace binding_detail {
1084 : struct FastRsaHashedKeyGenParams : public RsaHashedKeyGenParams
1085 : {
1086 : inline FastRsaHashedKeyGenParams()
1087 : : RsaHashedKeyGenParams(FastDictionaryInitializer())
1088 : {
1089 : // Doesn't matter what int we pass to the parent constructor
1090 : }
1091 : };
1092 : } // namespace binding_detail
1093 :
1094 :
1095 0 : struct RsaOaepParams : public Algorithm
1096 : {
1097 : MOZ_INIT_OUTSIDE_CTOR Optional<OwningArrayBufferViewOrArrayBuffer> mLabel;
1098 :
1099 : RsaOaepParams();
1100 :
1101 : explicit inline RsaOaepParams(const FastDictionaryInitializer& )
1102 : : Algorithm(FastDictionaryInitializer())
1103 : {
1104 : // Do nothing here; this is used by our "Fast" subclass
1105 : }
1106 :
1107 : private:
1108 : RsaOaepParams(const RsaOaepParams&) = delete;
1109 : RsaOaepParams& operator=(const RsaOaepParams&) = delete;
1110 :
1111 : static bool
1112 : InitIds(JSContext* cx, RsaOaepParamsAtoms* atomsCache);
1113 :
1114 : public:
1115 : bool
1116 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
1117 :
1118 : bool
1119 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
1120 :
1121 : void
1122 : TraceDictionary(JSTracer* trc);
1123 : };
1124 :
1125 : namespace binding_detail {
1126 : struct FastRsaOaepParams : public RsaOaepParams
1127 : {
1128 : inline FastRsaOaepParams()
1129 : : RsaOaepParams(FastDictionaryInitializer())
1130 : {
1131 : // Doesn't matter what int we pass to the parent constructor
1132 : }
1133 : };
1134 : } // namespace binding_detail
1135 :
1136 :
1137 0 : struct RsaPssParams : public Algorithm
1138 : {
1139 : MOZ_INIT_OUTSIDE_CTOR uint32_t mSaltLength;
1140 :
1141 : RsaPssParams();
1142 :
1143 : explicit inline RsaPssParams(const FastDictionaryInitializer& )
1144 : : Algorithm(FastDictionaryInitializer())
1145 : {
1146 : // Do nothing here; this is used by our "Fast" subclass
1147 : }
1148 :
1149 : explicit inline RsaPssParams(const RsaPssParams& aOther)
1150 : {
1151 : *this = aOther;
1152 : }
1153 :
1154 : bool
1155 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
1156 :
1157 : bool
1158 : Init(const nsAString& aJSON);
1159 :
1160 : bool
1161 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
1162 :
1163 : bool
1164 : ToJSON(nsAString& aJSON) const;
1165 :
1166 : void
1167 : TraceDictionary(JSTracer* trc);
1168 :
1169 : RsaPssParams&
1170 : operator=(const RsaPssParams& aOther);
1171 :
1172 : private:
1173 : static bool
1174 : InitIds(JSContext* cx, RsaPssParamsAtoms* atomsCache);
1175 : };
1176 :
1177 : namespace binding_detail {
1178 : struct FastRsaPssParams : public RsaPssParams
1179 : {
1180 : inline FastRsaPssParams()
1181 : : RsaPssParams(FastDictionaryInitializer())
1182 : {
1183 : // Doesn't matter what int we pass to the parent constructor
1184 : }
1185 : };
1186 : } // namespace binding_detail
1187 :
1188 :
1189 0 : struct HmacDerivedKeyParams : public HmacImportParams
1190 : {
1191 : MOZ_INIT_OUTSIDE_CTOR Optional<uint32_t> mLength;
1192 :
1193 : HmacDerivedKeyParams();
1194 :
1195 : explicit inline HmacDerivedKeyParams(const FastDictionaryInitializer& )
1196 : : HmacImportParams(FastDictionaryInitializer())
1197 : {
1198 : // Do nothing here; this is used by our "Fast" subclass
1199 : }
1200 :
1201 : private:
1202 : HmacDerivedKeyParams(const HmacDerivedKeyParams&) = delete;
1203 : HmacDerivedKeyParams& operator=(const HmacDerivedKeyParams&) = delete;
1204 :
1205 : static bool
1206 : InitIds(JSContext* cx, HmacDerivedKeyParamsAtoms* atomsCache);
1207 :
1208 : public:
1209 : bool
1210 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
1211 :
1212 : bool
1213 : Init(const nsAString& aJSON);
1214 :
1215 : bool
1216 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
1217 :
1218 : bool
1219 : ToJSON(nsAString& aJSON) const;
1220 :
1221 : void
1222 : TraceDictionary(JSTracer* trc);
1223 : };
1224 :
1225 : namespace binding_detail {
1226 : struct FastHmacDerivedKeyParams : public HmacDerivedKeyParams
1227 : {
1228 : inline FastHmacDerivedKeyParams()
1229 : : HmacDerivedKeyParams(FastDictionaryInitializer())
1230 : {
1231 : // Doesn't matter what int we pass to the parent constructor
1232 : }
1233 : };
1234 : } // namespace binding_detail
1235 :
1236 :
1237 : namespace CryptoKeyBinding {
1238 :
1239 : typedef mozilla::dom::CryptoKey NativeType;
1240 :
1241 : JSObject*
1242 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
1243 :
1244 : const JSClass*
1245 : GetJSClass();
1246 :
1247 : bool
1248 : Wrap(JSContext* aCx, mozilla::dom::CryptoKey* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1249 :
1250 : template <class T>
1251 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1252 : {
1253 0 : JS::Rooted<JSObject*> reflector(aCx);
1254 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1255 : }
1256 :
1257 : // We declare this as an array so that retrieving a pointer to this
1258 : // binding's property hooks only requires compile/link-time resolvable
1259 : // address arithmetic. Declaring it as a pointer instead would require
1260 : // doing a run-time load to fetch a pointer to this binding's property
1261 : // hooks. And then structures which embedded a pointer to this structure
1262 : // would require a run-time load for proper initialization, which would
1263 : // then induce static constructors. Lots of static constructors.
1264 : extern const NativePropertyHooks sNativePropertyHooks[];
1265 :
1266 : void
1267 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1268 :
1269 : JS::Handle<JSObject*>
1270 : GetProtoObjectHandle(JSContext* aCx);
1271 :
1272 : JS::Handle<JSObject*>
1273 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
1274 :
1275 : JSObject*
1276 : GetConstructorObject(JSContext* aCx);
1277 :
1278 : } // namespace CryptoKeyBinding
1279 :
1280 :
1281 :
1282 : namespace SubtleCryptoBinding {
1283 :
1284 : typedef mozilla::dom::SubtleCrypto NativeType;
1285 :
1286 : JSObject*
1287 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
1288 :
1289 : const JSClass*
1290 : GetJSClass();
1291 :
1292 : bool
1293 : Wrap(JSContext* aCx, mozilla::dom::SubtleCrypto* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1294 :
1295 : template <class T>
1296 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1297 : {
1298 0 : JS::Rooted<JSObject*> reflector(aCx);
1299 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1300 : }
1301 :
1302 : // We declare this as an array so that retrieving a pointer to this
1303 : // binding's property hooks only requires compile/link-time resolvable
1304 : // address arithmetic. Declaring it as a pointer instead would require
1305 : // doing a run-time load to fetch a pointer to this binding's property
1306 : // hooks. And then structures which embedded a pointer to this structure
1307 : // would require a run-time load for proper initialization, which would
1308 : // then induce static constructors. Lots of static constructors.
1309 : extern const NativePropertyHooks sNativePropertyHooks[];
1310 :
1311 : void
1312 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1313 :
1314 : JS::Handle<JSObject*>
1315 : GetProtoObjectHandle(JSContext* aCx);
1316 :
1317 : JS::Handle<JSObject*>
1318 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
1319 :
1320 : JSObject*
1321 : GetConstructorObject(JSContext* aCx);
1322 :
1323 : } // namespace SubtleCryptoBinding
1324 :
1325 :
1326 :
1327 : } // namespace dom
1328 : } // namespace mozilla
1329 :
1330 : #endif // mozilla_dom_SubtleCryptoBinding_h
|