Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM WebGLRenderingContext.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_WebGLRenderingContextBinding_h
4 : #define mozilla_dom_WebGLRenderingContextBinding_h
5 :
6 : #include "js/RootingAPI.h"
7 : #include "jsfriendapi.h"
8 : #include "jspubtd.h"
9 : #include "mozilla/ErrorResult.h"
10 : #include "mozilla/dom/BindingDeclarations.h"
11 : #include "mozilla/dom/FakeString.h"
12 : #include "mozilla/dom/Nullable.h"
13 : #include "mozilla/dom/TypedArray.h"
14 : #include "mozilla/dom/UnionMember.h"
15 :
16 : namespace mozilla {
17 :
18 : class WebGLActiveInfo;
19 : struct WebGLActiveInfoAtoms;
20 : class WebGLBuffer;
21 : struct WebGLBufferAtoms;
22 : class WebGLContext;
23 : struct WebGLContextAtoms;
24 : class WebGLExtensionBlendMinMax;
25 : struct WebGLExtensionBlendMinMaxAtoms;
26 : class WebGLExtensionColorBufferFloat;
27 : struct WebGLExtensionColorBufferFloatAtoms;
28 : class WebGLExtensionColorBufferHalfFloat;
29 : struct WebGLExtensionColorBufferHalfFloatAtoms;
30 : class WebGLExtensionCompressedTextureASTC;
31 : struct WebGLExtensionCompressedTextureASTCAtoms;
32 : class WebGLExtensionCompressedTextureATC;
33 : struct WebGLExtensionCompressedTextureATCAtoms;
34 : class WebGLExtensionCompressedTextureES3;
35 : struct WebGLExtensionCompressedTextureES3Atoms;
36 : class WebGLExtensionCompressedTextureETC1;
37 : struct WebGLExtensionCompressedTextureETC1Atoms;
38 : class WebGLExtensionCompressedTexturePVRTC;
39 : struct WebGLExtensionCompressedTexturePVRTCAtoms;
40 : class WebGLExtensionCompressedTextureS3TC;
41 : struct WebGLExtensionCompressedTextureS3TCAtoms;
42 : class WebGLExtensionCompressedTextureS3TC_SRGB;
43 : struct WebGLExtensionCompressedTextureS3TC_SRGBAtoms;
44 : class WebGLExtensionDebugRendererInfo;
45 : struct WebGLExtensionDebugRendererInfoAtoms;
46 : class WebGLExtensionDebugShaders;
47 : struct WebGLExtensionDebugShadersAtoms;
48 : class WebGLExtensionDepthTexture;
49 : struct WebGLExtensionDepthTextureAtoms;
50 : class WebGLExtensionDisjointTimerQuery;
51 : struct WebGLExtensionDisjointTimerQueryAtoms;
52 : class WebGLExtensionDrawBuffers;
53 : struct WebGLExtensionDrawBuffersAtoms;
54 : class WebGLExtensionElementIndexUint;
55 : struct WebGLExtensionElementIndexUintAtoms;
56 : class WebGLExtensionFragDepth;
57 : struct WebGLExtensionFragDepthAtoms;
58 : class WebGLExtensionInstancedArrays;
59 : struct WebGLExtensionInstancedArraysAtoms;
60 : class WebGLExtensionLoseContext;
61 : struct WebGLExtensionLoseContextAtoms;
62 : class WebGLExtensionMOZDebug;
63 : struct WebGLExtensionMOZDebugAtoms;
64 : class WebGLExtensionSRGB;
65 : struct WebGLExtensionSRGBAtoms;
66 : class WebGLExtensionShaderTextureLod;
67 : struct WebGLExtensionShaderTextureLodAtoms;
68 : class WebGLExtensionStandardDerivatives;
69 : struct WebGLExtensionStandardDerivativesAtoms;
70 : class WebGLExtensionTextureFilterAnisotropic;
71 : struct WebGLExtensionTextureFilterAnisotropicAtoms;
72 : class WebGLExtensionTextureFloat;
73 : struct WebGLExtensionTextureFloatAtoms;
74 : class WebGLExtensionTextureFloatLinear;
75 : struct WebGLExtensionTextureFloatLinearAtoms;
76 : class WebGLExtensionTextureHalfFloat;
77 : struct WebGLExtensionTextureHalfFloatAtoms;
78 : class WebGLExtensionTextureHalfFloatLinear;
79 : struct WebGLExtensionTextureHalfFloatLinearAtoms;
80 : class WebGLExtensionVertexArray;
81 : struct WebGLExtensionVertexArrayAtoms;
82 : class WebGLFramebuffer;
83 : struct WebGLFramebufferAtoms;
84 : class WebGLProgram;
85 : struct WebGLProgramAtoms;
86 : class WebGLQuery;
87 : struct WebGLQueryAtoms;
88 : class WebGLRenderbuffer;
89 : struct WebGLRenderbufferAtoms;
90 : class WebGLShader;
91 : struct WebGLShaderAtoms;
92 : class WebGLShaderPrecisionFormat;
93 : struct WebGLShaderPrecisionFormatAtoms;
94 : class WebGLTexture;
95 : struct WebGLTextureAtoms;
96 : class WebGLUniformLocation;
97 : struct WebGLUniformLocationAtoms;
98 : class WebGLVertexArray;
99 : struct WebGLVertexArrayAtoms;
100 :
101 : namespace dom {
102 :
103 : class HTMLCanvasElement;
104 : struct NativePropertyHooks;
105 : class OffscreenCanvas;
106 : class OwningHTMLCanvasElementOrOffscreenCanvas;
107 : class ProtoAndIfaceCache;
108 : struct WebGLContextAttributesAtoms;
109 :
110 : } // namespace dom
111 :
112 : } // namespace mozilla
113 :
114 : namespace mozilla {
115 : namespace dom {
116 :
117 : void
118 : ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& aCallback, OwningHTMLCanvasElementOrOffscreenCanvas& aUnion, const char* aName, uint32_t aFlags = 0);
119 :
120 :
121 : void
122 : ImplCycleCollectionUnlink(OwningHTMLCanvasElementOrOffscreenCanvas& aUnion);
123 :
124 :
125 : class Float32ArrayOrUnrestrictedFloatSequence
126 : {
127 : friend class Float32ArrayOrUnrestrictedFloatSequenceArgument;
128 : enum Type
129 : {
130 : eUninitialized,
131 : eFloat32Array,
132 : eUnrestrictedFloatSequence
133 : };
134 :
135 0 : union Value
136 : {
137 : UnionMember<RootedTypedArray<Float32Array> > mFloat32Array;
138 : UnionMember<binding_detail::AutoSequence<float> > mUnrestrictedFloatSequence;
139 :
140 : };
141 :
142 : Type mType;
143 : Value mValue;
144 :
145 : Float32ArrayOrUnrestrictedFloatSequence(const Float32ArrayOrUnrestrictedFloatSequence&) = delete;
146 : Float32ArrayOrUnrestrictedFloatSequence& operator=(const Float32ArrayOrUnrestrictedFloatSequence&) = delete;
147 : public:
148 0 : explicit inline Float32ArrayOrUnrestrictedFloatSequence()
149 0 : : mType(eUninitialized)
150 : {
151 0 : }
152 :
153 0 : inline ~Float32ArrayOrUnrestrictedFloatSequence()
154 0 : {
155 0 : Uninit();
156 0 : }
157 :
158 : inline RootedTypedArray<Float32Array>&
159 : RawSetAsFloat32Array(JSContext* cx)
160 : {
161 : if (mType == eFloat32Array) {
162 : return mValue.mFloat32Array.Value();
163 : }
164 : MOZ_ASSERT(mType == eUninitialized);
165 : mType = eFloat32Array;
166 : return mValue.mFloat32Array.SetValue(cx);
167 : }
168 :
169 : inline RootedTypedArray<Float32Array>&
170 : SetAsFloat32Array(JSContext* cx)
171 : {
172 : if (mType == eFloat32Array) {
173 : return mValue.mFloat32Array.Value();
174 : }
175 : Uninit();
176 : mType = eFloat32Array;
177 : return mValue.mFloat32Array.SetValue(cx);
178 : }
179 :
180 : inline bool
181 0 : IsFloat32Array() const
182 : {
183 0 : return mType == eFloat32Array;
184 : }
185 :
186 : inline RootedTypedArray<Float32Array>&
187 : GetAsFloat32Array()
188 : {
189 : MOZ_ASSERT(IsFloat32Array(), "Wrong type!");
190 : return mValue.mFloat32Array.Value();
191 : }
192 :
193 : inline Float32Array const &
194 0 : GetAsFloat32Array() const
195 : {
196 0 : MOZ_ASSERT(IsFloat32Array(), "Wrong type!");
197 0 : return mValue.mFloat32Array.Value();
198 : }
199 :
200 : inline binding_detail::AutoSequence<float>&
201 : RawSetAsUnrestrictedFloatSequence()
202 : {
203 : if (mType == eUnrestrictedFloatSequence) {
204 : return mValue.mUnrestrictedFloatSequence.Value();
205 : }
206 : MOZ_ASSERT(mType == eUninitialized);
207 : mType = eUnrestrictedFloatSequence;
208 : return mValue.mUnrestrictedFloatSequence.SetValue();
209 : }
210 :
211 : inline binding_detail::AutoSequence<float>&
212 : SetAsUnrestrictedFloatSequence()
213 : {
214 : if (mType == eUnrestrictedFloatSequence) {
215 : return mValue.mUnrestrictedFloatSequence.Value();
216 : }
217 : Uninit();
218 : mType = eUnrestrictedFloatSequence;
219 : return mValue.mUnrestrictedFloatSequence.SetValue();
220 : }
221 :
222 : inline bool
223 0 : IsUnrestrictedFloatSequence() const
224 : {
225 0 : return mType == eUnrestrictedFloatSequence;
226 : }
227 :
228 : inline binding_detail::AutoSequence<float>&
229 : GetAsUnrestrictedFloatSequence()
230 : {
231 : MOZ_ASSERT(IsUnrestrictedFloatSequence(), "Wrong type!");
232 : return mValue.mUnrestrictedFloatSequence.Value();
233 : }
234 :
235 : inline const Sequence<float>&
236 0 : GetAsUnrestrictedFloatSequence() const
237 : {
238 0 : MOZ_ASSERT(IsUnrestrictedFloatSequence(), "Wrong type!");
239 0 : return mValue.mUnrestrictedFloatSequence.Value();
240 : }
241 :
242 : inline void
243 0 : Uninit()
244 : {
245 0 : switch (mType) {
246 : case eUninitialized: {
247 0 : break;
248 : }
249 : case eFloat32Array: {
250 0 : DestroyFloat32Array();
251 0 : break;
252 : }
253 : case eUnrestrictedFloatSequence: {
254 0 : DestroyUnrestrictedFloatSequence();
255 0 : break;
256 : }
257 : }
258 0 : }
259 :
260 : bool
261 : ToJSVal(JSContext* cx, JS::Handle<JSObject*> scopeObj, JS::MutableHandle<JS::Value> rval) const;
262 :
263 : private:
264 : inline void
265 0 : DestroyFloat32Array()
266 : {
267 0 : MOZ_ASSERT(IsFloat32Array(), "Wrong type!");
268 0 : mValue.mFloat32Array.Destroy();
269 0 : mType = eUninitialized;
270 0 : }
271 :
272 : inline void
273 0 : DestroyUnrestrictedFloatSequence()
274 : {
275 0 : MOZ_ASSERT(IsUnrestrictedFloatSequence(), "Wrong type!");
276 0 : mValue.mUnrestrictedFloatSequence.Destroy();
277 0 : mType = eUninitialized;
278 0 : }
279 : };
280 :
281 :
282 : class OwningFloat32ArrayOrUnrestrictedFloatSequence : public AllOwningUnionBase
283 : {
284 : friend void ImplCycleCollectionUnlink(OwningFloat32ArrayOrUnrestrictedFloatSequence& aUnion);
285 : enum Type
286 : {
287 : eUninitialized,
288 : eFloat32Array,
289 : eUnrestrictedFloatSequence
290 : };
291 :
292 : union Value
293 : {
294 : UnionMember<Float32Array > mFloat32Array;
295 : UnionMember<Sequence<float> > mUnrestrictedFloatSequence;
296 :
297 : };
298 :
299 : Type mType;
300 : Value mValue;
301 :
302 : OwningFloat32ArrayOrUnrestrictedFloatSequence(const OwningFloat32ArrayOrUnrestrictedFloatSequence&) = delete;
303 : OwningFloat32ArrayOrUnrestrictedFloatSequence& operator=(const OwningFloat32ArrayOrUnrestrictedFloatSequence&) = delete;
304 : public:
305 : explicit inline OwningFloat32ArrayOrUnrestrictedFloatSequence()
306 : : mType(eUninitialized)
307 : {
308 : }
309 :
310 : inline ~OwningFloat32ArrayOrUnrestrictedFloatSequence()
311 : {
312 : Uninit();
313 : }
314 :
315 : Float32Array&
316 : RawSetAsFloat32Array();
317 :
318 : Float32Array&
319 : SetAsFloat32Array();
320 :
321 : bool
322 : TrySetToFloat32Array(JSContext* cx, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
323 :
324 : inline bool
325 0 : IsFloat32Array() const
326 : {
327 0 : return mType == eFloat32Array;
328 : }
329 :
330 : inline Float32Array&
331 : GetAsFloat32Array()
332 : {
333 : MOZ_ASSERT(IsFloat32Array(), "Wrong type!");
334 : return mValue.mFloat32Array.Value();
335 : }
336 :
337 : inline Float32Array const &
338 : GetAsFloat32Array() const
339 : {
340 : MOZ_ASSERT(IsFloat32Array(), "Wrong type!");
341 : return mValue.mFloat32Array.Value();
342 : }
343 :
344 : Sequence<float>&
345 : RawSetAsUnrestrictedFloatSequence();
346 :
347 : Sequence<float>&
348 : SetAsUnrestrictedFloatSequence();
349 :
350 : bool
351 : TrySetToUnrestrictedFloatSequence(JSContext* cx, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
352 :
353 : inline bool
354 0 : IsUnrestrictedFloatSequence() const
355 : {
356 0 : return mType == eUnrestrictedFloatSequence;
357 : }
358 :
359 : inline Sequence<float>&
360 : GetAsUnrestrictedFloatSequence()
361 : {
362 : MOZ_ASSERT(IsUnrestrictedFloatSequence(), "Wrong type!");
363 : return mValue.mUnrestrictedFloatSequence.Value();
364 : }
365 :
366 : inline Sequence<float> const &
367 : GetAsUnrestrictedFloatSequence() const
368 : {
369 : MOZ_ASSERT(IsUnrestrictedFloatSequence(), "Wrong type!");
370 : return mValue.mUnrestrictedFloatSequence.Value();
371 : }
372 :
373 : void
374 : Uninit();
375 :
376 : bool
377 : ToJSVal(JSContext* cx, JS::Handle<JSObject*> scopeObj, JS::MutableHandle<JS::Value> rval) const;
378 :
379 : void
380 : TraceUnion(JSTracer* trc);
381 :
382 : private:
383 : void
384 : DestroyFloat32Array();
385 :
386 : void
387 : DestroyUnrestrictedFloatSequence();
388 : };
389 :
390 :
391 : class HTMLCanvasElementOrOffscreenCanvas
392 : {
393 : friend class HTMLCanvasElementOrOffscreenCanvasArgument;
394 : enum Type
395 : {
396 : eUninitialized,
397 : eHTMLCanvasElement,
398 : eOffscreenCanvas
399 : };
400 :
401 : union Value
402 : {
403 : UnionMember<NonNull<mozilla::dom::HTMLCanvasElement> > mHTMLCanvasElement;
404 : UnionMember<NonNull<mozilla::dom::OffscreenCanvas> > mOffscreenCanvas;
405 :
406 : };
407 :
408 : Type mType;
409 : Value mValue;
410 :
411 : HTMLCanvasElementOrOffscreenCanvas(const HTMLCanvasElementOrOffscreenCanvas&) = delete;
412 : HTMLCanvasElementOrOffscreenCanvas& operator=(const HTMLCanvasElementOrOffscreenCanvas&) = delete;
413 : public:
414 : explicit inline HTMLCanvasElementOrOffscreenCanvas()
415 : : mType(eUninitialized)
416 : {
417 : }
418 :
419 : inline ~HTMLCanvasElementOrOffscreenCanvas()
420 : {
421 : Uninit();
422 : }
423 :
424 : inline NonNull<mozilla::dom::HTMLCanvasElement>&
425 : RawSetAsHTMLCanvasElement()
426 : {
427 : if (mType == eHTMLCanvasElement) {
428 : return mValue.mHTMLCanvasElement.Value();
429 : }
430 : MOZ_ASSERT(mType == eUninitialized);
431 : mType = eHTMLCanvasElement;
432 : return mValue.mHTMLCanvasElement.SetValue();
433 : }
434 :
435 : inline NonNull<mozilla::dom::HTMLCanvasElement>&
436 : SetAsHTMLCanvasElement()
437 : {
438 : if (mType == eHTMLCanvasElement) {
439 : return mValue.mHTMLCanvasElement.Value();
440 : }
441 : Uninit();
442 : mType = eHTMLCanvasElement;
443 : return mValue.mHTMLCanvasElement.SetValue();
444 : }
445 :
446 : inline bool
447 : IsHTMLCanvasElement() const
448 : {
449 : return mType == eHTMLCanvasElement;
450 : }
451 :
452 : inline NonNull<mozilla::dom::HTMLCanvasElement>&
453 : GetAsHTMLCanvasElement()
454 : {
455 : MOZ_ASSERT(IsHTMLCanvasElement(), "Wrong type!");
456 : return mValue.mHTMLCanvasElement.Value();
457 : }
458 :
459 : inline mozilla::dom::HTMLCanvasElement&
460 : GetAsHTMLCanvasElement() const
461 : {
462 : MOZ_ASSERT(IsHTMLCanvasElement(), "Wrong type!");
463 : return mValue.mHTMLCanvasElement.Value();
464 : }
465 :
466 : inline NonNull<mozilla::dom::OffscreenCanvas>&
467 : RawSetAsOffscreenCanvas()
468 : {
469 : if (mType == eOffscreenCanvas) {
470 : return mValue.mOffscreenCanvas.Value();
471 : }
472 : MOZ_ASSERT(mType == eUninitialized);
473 : mType = eOffscreenCanvas;
474 : return mValue.mOffscreenCanvas.SetValue();
475 : }
476 :
477 : inline NonNull<mozilla::dom::OffscreenCanvas>&
478 : SetAsOffscreenCanvas()
479 : {
480 : if (mType == eOffscreenCanvas) {
481 : return mValue.mOffscreenCanvas.Value();
482 : }
483 : Uninit();
484 : mType = eOffscreenCanvas;
485 : return mValue.mOffscreenCanvas.SetValue();
486 : }
487 :
488 : inline bool
489 : IsOffscreenCanvas() const
490 : {
491 : return mType == eOffscreenCanvas;
492 : }
493 :
494 : inline NonNull<mozilla::dom::OffscreenCanvas>&
495 : GetAsOffscreenCanvas()
496 : {
497 : MOZ_ASSERT(IsOffscreenCanvas(), "Wrong type!");
498 : return mValue.mOffscreenCanvas.Value();
499 : }
500 :
501 : inline mozilla::dom::OffscreenCanvas&
502 : GetAsOffscreenCanvas() const
503 : {
504 : MOZ_ASSERT(IsOffscreenCanvas(), "Wrong type!");
505 : return mValue.mOffscreenCanvas.Value();
506 : }
507 :
508 : inline void
509 : Uninit()
510 : {
511 : switch (mType) {
512 : case eUninitialized: {
513 : break;
514 : }
515 : case eHTMLCanvasElement: {
516 : DestroyHTMLCanvasElement();
517 : break;
518 : }
519 : case eOffscreenCanvas: {
520 : DestroyOffscreenCanvas();
521 : break;
522 : }
523 : }
524 : }
525 :
526 : bool
527 : ToJSVal(JSContext* cx, JS::Handle<JSObject*> scopeObj, JS::MutableHandle<JS::Value> rval) const;
528 :
529 : private:
530 : inline void
531 : DestroyHTMLCanvasElement()
532 : {
533 : MOZ_ASSERT(IsHTMLCanvasElement(), "Wrong type!");
534 : mValue.mHTMLCanvasElement.Destroy();
535 : mType = eUninitialized;
536 : }
537 :
538 : inline void
539 : DestroyOffscreenCanvas()
540 : {
541 : MOZ_ASSERT(IsOffscreenCanvas(), "Wrong type!");
542 : mValue.mOffscreenCanvas.Destroy();
543 : mType = eUninitialized;
544 : }
545 : };
546 :
547 :
548 : class OwningHTMLCanvasElementOrOffscreenCanvas : public AllOwningUnionBase
549 : {
550 : friend void ImplCycleCollectionUnlink(OwningHTMLCanvasElementOrOffscreenCanvas& aUnion);
551 : enum Type
552 : {
553 : eUninitialized,
554 : eHTMLCanvasElement,
555 : eOffscreenCanvas
556 : };
557 :
558 0 : union Value
559 : {
560 : UnionMember<OwningNonNull<mozilla::dom::HTMLCanvasElement> > mHTMLCanvasElement;
561 : UnionMember<OwningNonNull<mozilla::dom::OffscreenCanvas> > mOffscreenCanvas;
562 :
563 : };
564 :
565 : Type mType;
566 : Value mValue;
567 :
568 : public:
569 0 : explicit inline OwningHTMLCanvasElementOrOffscreenCanvas()
570 0 : : mType(eUninitialized)
571 : {
572 0 : }
573 :
574 : explicit inline OwningHTMLCanvasElementOrOffscreenCanvas(const OwningHTMLCanvasElementOrOffscreenCanvas& aOther)
575 : : mType(eUninitialized)
576 : {
577 : *this = aOther;
578 : }
579 :
580 0 : inline ~OwningHTMLCanvasElementOrOffscreenCanvas()
581 0 : {
582 0 : Uninit();
583 0 : }
584 :
585 : OwningNonNull<mozilla::dom::HTMLCanvasElement>&
586 : RawSetAsHTMLCanvasElement();
587 :
588 : OwningNonNull<mozilla::dom::HTMLCanvasElement>&
589 : SetAsHTMLCanvasElement();
590 :
591 : bool
592 : TrySetToHTMLCanvasElement(JSContext* cx, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
593 :
594 : inline bool
595 0 : IsHTMLCanvasElement() const
596 : {
597 0 : return mType == eHTMLCanvasElement;
598 : }
599 :
600 : inline OwningNonNull<mozilla::dom::HTMLCanvasElement>&
601 0 : GetAsHTMLCanvasElement()
602 : {
603 0 : MOZ_ASSERT(IsHTMLCanvasElement(), "Wrong type!");
604 0 : return mValue.mHTMLCanvasElement.Value();
605 : }
606 :
607 : inline OwningNonNull<mozilla::dom::HTMLCanvasElement> const &
608 0 : GetAsHTMLCanvasElement() const
609 : {
610 0 : MOZ_ASSERT(IsHTMLCanvasElement(), "Wrong type!");
611 0 : return mValue.mHTMLCanvasElement.Value();
612 : }
613 :
614 : OwningNonNull<mozilla::dom::OffscreenCanvas>&
615 : RawSetAsOffscreenCanvas();
616 :
617 : OwningNonNull<mozilla::dom::OffscreenCanvas>&
618 : SetAsOffscreenCanvas();
619 :
620 : bool
621 : TrySetToOffscreenCanvas(JSContext* cx, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
622 :
623 : inline bool
624 0 : IsOffscreenCanvas() const
625 : {
626 0 : return mType == eOffscreenCanvas;
627 : }
628 :
629 : inline OwningNonNull<mozilla::dom::OffscreenCanvas>&
630 0 : GetAsOffscreenCanvas()
631 : {
632 0 : MOZ_ASSERT(IsOffscreenCanvas(), "Wrong type!");
633 0 : return mValue.mOffscreenCanvas.Value();
634 : }
635 :
636 : inline OwningNonNull<mozilla::dom::OffscreenCanvas> const &
637 0 : GetAsOffscreenCanvas() const
638 : {
639 0 : MOZ_ASSERT(IsOffscreenCanvas(), "Wrong type!");
640 0 : return mValue.mOffscreenCanvas.Value();
641 : }
642 :
643 : void
644 : Uninit();
645 :
646 : bool
647 : ToJSVal(JSContext* cx, JS::Handle<JSObject*> scopeObj, JS::MutableHandle<JS::Value> rval) const;
648 :
649 : void
650 : TraceUnion(JSTracer* trc);
651 :
652 : OwningHTMLCanvasElementOrOffscreenCanvas&
653 : operator=(const OwningHTMLCanvasElementOrOffscreenCanvas& aOther);
654 :
655 : private:
656 : void
657 : DestroyHTMLCanvasElement();
658 :
659 : void
660 : DestroyOffscreenCanvas();
661 : };
662 :
663 :
664 : class Int32ArrayOrLongSequence
665 : {
666 : friend class Int32ArrayOrLongSequenceArgument;
667 : enum Type
668 : {
669 : eUninitialized,
670 : eInt32Array,
671 : eLongSequence
672 : };
673 :
674 0 : union Value
675 : {
676 : UnionMember<RootedTypedArray<Int32Array> > mInt32Array;
677 : UnionMember<binding_detail::AutoSequence<int32_t> > mLongSequence;
678 :
679 : };
680 :
681 : Type mType;
682 : Value mValue;
683 :
684 : Int32ArrayOrLongSequence(const Int32ArrayOrLongSequence&) = delete;
685 : Int32ArrayOrLongSequence& operator=(const Int32ArrayOrLongSequence&) = delete;
686 : public:
687 0 : explicit inline Int32ArrayOrLongSequence()
688 0 : : mType(eUninitialized)
689 : {
690 0 : }
691 :
692 0 : inline ~Int32ArrayOrLongSequence()
693 0 : {
694 0 : Uninit();
695 0 : }
696 :
697 : inline RootedTypedArray<Int32Array>&
698 : RawSetAsInt32Array(JSContext* cx)
699 : {
700 : if (mType == eInt32Array) {
701 : return mValue.mInt32Array.Value();
702 : }
703 : MOZ_ASSERT(mType == eUninitialized);
704 : mType = eInt32Array;
705 : return mValue.mInt32Array.SetValue(cx);
706 : }
707 :
708 : inline RootedTypedArray<Int32Array>&
709 : SetAsInt32Array(JSContext* cx)
710 : {
711 : if (mType == eInt32Array) {
712 : return mValue.mInt32Array.Value();
713 : }
714 : Uninit();
715 : mType = eInt32Array;
716 : return mValue.mInt32Array.SetValue(cx);
717 : }
718 :
719 : inline bool
720 0 : IsInt32Array() const
721 : {
722 0 : return mType == eInt32Array;
723 : }
724 :
725 : inline RootedTypedArray<Int32Array>&
726 : GetAsInt32Array()
727 : {
728 : MOZ_ASSERT(IsInt32Array(), "Wrong type!");
729 : return mValue.mInt32Array.Value();
730 : }
731 :
732 : inline Int32Array const &
733 0 : GetAsInt32Array() const
734 : {
735 0 : MOZ_ASSERT(IsInt32Array(), "Wrong type!");
736 0 : return mValue.mInt32Array.Value();
737 : }
738 :
739 : inline binding_detail::AutoSequence<int32_t>&
740 : RawSetAsLongSequence()
741 : {
742 : if (mType == eLongSequence) {
743 : return mValue.mLongSequence.Value();
744 : }
745 : MOZ_ASSERT(mType == eUninitialized);
746 : mType = eLongSequence;
747 : return mValue.mLongSequence.SetValue();
748 : }
749 :
750 : inline binding_detail::AutoSequence<int32_t>&
751 : SetAsLongSequence()
752 : {
753 : if (mType == eLongSequence) {
754 : return mValue.mLongSequence.Value();
755 : }
756 : Uninit();
757 : mType = eLongSequence;
758 : return mValue.mLongSequence.SetValue();
759 : }
760 :
761 : inline bool
762 0 : IsLongSequence() const
763 : {
764 0 : return mType == eLongSequence;
765 : }
766 :
767 : inline binding_detail::AutoSequence<int32_t>&
768 : GetAsLongSequence()
769 : {
770 : MOZ_ASSERT(IsLongSequence(), "Wrong type!");
771 : return mValue.mLongSequence.Value();
772 : }
773 :
774 : inline const Sequence<int32_t>&
775 0 : GetAsLongSequence() const
776 : {
777 0 : MOZ_ASSERT(IsLongSequence(), "Wrong type!");
778 0 : return mValue.mLongSequence.Value();
779 : }
780 :
781 : inline void
782 0 : Uninit()
783 : {
784 0 : switch (mType) {
785 : case eUninitialized: {
786 0 : break;
787 : }
788 : case eInt32Array: {
789 0 : DestroyInt32Array();
790 0 : break;
791 : }
792 : case eLongSequence: {
793 0 : DestroyLongSequence();
794 0 : break;
795 : }
796 : }
797 0 : }
798 :
799 : bool
800 : ToJSVal(JSContext* cx, JS::Handle<JSObject*> scopeObj, JS::MutableHandle<JS::Value> rval) const;
801 :
802 : private:
803 : inline void
804 0 : DestroyInt32Array()
805 : {
806 0 : MOZ_ASSERT(IsInt32Array(), "Wrong type!");
807 0 : mValue.mInt32Array.Destroy();
808 0 : mType = eUninitialized;
809 0 : }
810 :
811 : inline void
812 0 : DestroyLongSequence()
813 : {
814 0 : MOZ_ASSERT(IsLongSequence(), "Wrong type!");
815 0 : mValue.mLongSequence.Destroy();
816 0 : mType = eUninitialized;
817 0 : }
818 : };
819 :
820 :
821 : class OwningInt32ArrayOrLongSequence : public AllOwningUnionBase
822 : {
823 : friend void ImplCycleCollectionUnlink(OwningInt32ArrayOrLongSequence& aUnion);
824 : enum Type
825 : {
826 : eUninitialized,
827 : eInt32Array,
828 : eLongSequence
829 : };
830 :
831 : union Value
832 : {
833 : UnionMember<Int32Array > mInt32Array;
834 : UnionMember<Sequence<int32_t> > mLongSequence;
835 :
836 : };
837 :
838 : Type mType;
839 : Value mValue;
840 :
841 : OwningInt32ArrayOrLongSequence(const OwningInt32ArrayOrLongSequence&) = delete;
842 : OwningInt32ArrayOrLongSequence& operator=(const OwningInt32ArrayOrLongSequence&) = delete;
843 : public:
844 : explicit inline OwningInt32ArrayOrLongSequence()
845 : : mType(eUninitialized)
846 : {
847 : }
848 :
849 : inline ~OwningInt32ArrayOrLongSequence()
850 : {
851 : Uninit();
852 : }
853 :
854 : Int32Array&
855 : RawSetAsInt32Array();
856 :
857 : Int32Array&
858 : SetAsInt32Array();
859 :
860 : bool
861 : TrySetToInt32Array(JSContext* cx, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
862 :
863 : inline bool
864 0 : IsInt32Array() const
865 : {
866 0 : return mType == eInt32Array;
867 : }
868 :
869 : inline Int32Array&
870 : GetAsInt32Array()
871 : {
872 : MOZ_ASSERT(IsInt32Array(), "Wrong type!");
873 : return mValue.mInt32Array.Value();
874 : }
875 :
876 : inline Int32Array const &
877 : GetAsInt32Array() const
878 : {
879 : MOZ_ASSERT(IsInt32Array(), "Wrong type!");
880 : return mValue.mInt32Array.Value();
881 : }
882 :
883 : Sequence<int32_t>&
884 : RawSetAsLongSequence();
885 :
886 : Sequence<int32_t>&
887 : SetAsLongSequence();
888 :
889 : bool
890 : TrySetToLongSequence(JSContext* cx, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
891 :
892 : inline bool
893 0 : IsLongSequence() const
894 : {
895 0 : return mType == eLongSequence;
896 : }
897 :
898 : inline Sequence<int32_t>&
899 : GetAsLongSequence()
900 : {
901 : MOZ_ASSERT(IsLongSequence(), "Wrong type!");
902 : return mValue.mLongSequence.Value();
903 : }
904 :
905 : inline Sequence<int32_t> const &
906 : GetAsLongSequence() const
907 : {
908 : MOZ_ASSERT(IsLongSequence(), "Wrong type!");
909 : return mValue.mLongSequence.Value();
910 : }
911 :
912 : void
913 : Uninit();
914 :
915 : bool
916 : ToJSVal(JSContext* cx, JS::Handle<JSObject*> scopeObj, JS::MutableHandle<JS::Value> rval) const;
917 :
918 : void
919 : TraceUnion(JSTracer* trc);
920 :
921 : private:
922 : void
923 : DestroyInt32Array();
924 :
925 : void
926 : DestroyLongSequence();
927 : };
928 :
929 :
930 0 : struct WebGLContextAttributes : public DictionaryBase
931 : {
932 : MOZ_INIT_OUTSIDE_CTOR Optional<bool> mAlpha;
933 : MOZ_INIT_OUTSIDE_CTOR bool mAntialias;
934 : MOZ_INIT_OUTSIDE_CTOR bool mDepth;
935 : MOZ_INIT_OUTSIDE_CTOR bool mFailIfMajorPerformanceCaveat;
936 : MOZ_INIT_OUTSIDE_CTOR bool mPremultipliedAlpha;
937 : MOZ_INIT_OUTSIDE_CTOR bool mPreserveDrawingBuffer;
938 : MOZ_INIT_OUTSIDE_CTOR bool mStencil;
939 :
940 : WebGLContextAttributes();
941 :
942 : explicit inline WebGLContextAttributes(const FastDictionaryInitializer& )
943 : {
944 : // Do nothing here; this is used by our "Fast" subclass
945 : }
946 :
947 : explicit inline WebGLContextAttributes(const WebGLContextAttributes& aOther)
948 : {
949 : *this = aOther;
950 : }
951 :
952 : bool
953 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
954 :
955 : bool
956 : Init(const nsAString& aJSON);
957 :
958 : bool
959 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
960 :
961 : bool
962 : ToJSON(nsAString& aJSON) const;
963 :
964 : void
965 : TraceDictionary(JSTracer* trc);
966 :
967 : WebGLContextAttributes&
968 : operator=(const WebGLContextAttributes& aOther);
969 :
970 : private:
971 : static bool
972 : InitIds(JSContext* cx, WebGLContextAttributesAtoms* atomsCache);
973 : };
974 :
975 : namespace binding_detail {
976 : struct FastWebGLContextAttributes : public WebGLContextAttributes
977 : {
978 : inline FastWebGLContextAttributes()
979 : : WebGLContextAttributes(FastDictionaryInitializer())
980 : {
981 : // Doesn't matter what int we pass to the parent constructor
982 : }
983 : };
984 : } // namespace binding_detail
985 :
986 :
987 : namespace ANGLE_instanced_arraysBinding {
988 :
989 : typedef mozilla::WebGLExtensionInstancedArrays NativeType;
990 :
991 : const JSClass*
992 : GetJSClass();
993 :
994 : bool
995 : Wrap(JSContext* aCx, mozilla::WebGLExtensionInstancedArrays* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
996 :
997 : template <class T>
998 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
999 : {
1000 0 : JS::Rooted<JSObject*> reflector(aCx);
1001 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1002 : }
1003 :
1004 : // We declare this as an array so that retrieving a pointer to this
1005 : // binding's property hooks only requires compile/link-time resolvable
1006 : // address arithmetic. Declaring it as a pointer instead would require
1007 : // doing a run-time load to fetch a pointer to this binding's property
1008 : // hooks. And then structures which embedded a pointer to this structure
1009 : // would require a run-time load for proper initialization, which would
1010 : // then induce static constructors. Lots of static constructors.
1011 : extern const NativePropertyHooks sNativePropertyHooks[];
1012 :
1013 : void
1014 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1015 :
1016 : JS::Handle<JSObject*>
1017 : GetProtoObjectHandle(JSContext* aCx);
1018 :
1019 : } // namespace ANGLE_instanced_arraysBinding
1020 :
1021 :
1022 :
1023 : namespace EXT_blend_minmaxBinding {
1024 :
1025 : typedef mozilla::WebGLExtensionBlendMinMax NativeType;
1026 :
1027 : const JSClass*
1028 : GetJSClass();
1029 :
1030 : bool
1031 : Wrap(JSContext* aCx, mozilla::WebGLExtensionBlendMinMax* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1032 :
1033 : template <class T>
1034 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1035 : {
1036 0 : JS::Rooted<JSObject*> reflector(aCx);
1037 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1038 : }
1039 :
1040 : // We declare this as an array so that retrieving a pointer to this
1041 : // binding's property hooks only requires compile/link-time resolvable
1042 : // address arithmetic. Declaring it as a pointer instead would require
1043 : // doing a run-time load to fetch a pointer to this binding's property
1044 : // hooks. And then structures which embedded a pointer to this structure
1045 : // would require a run-time load for proper initialization, which would
1046 : // then induce static constructors. Lots of static constructors.
1047 : extern const NativePropertyHooks sNativePropertyHooks[];
1048 :
1049 : void
1050 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1051 :
1052 : JS::Handle<JSObject*>
1053 : GetProtoObjectHandle(JSContext* aCx);
1054 :
1055 : } // namespace EXT_blend_minmaxBinding
1056 :
1057 :
1058 :
1059 : namespace EXT_color_buffer_half_floatBinding {
1060 :
1061 : typedef mozilla::WebGLExtensionColorBufferHalfFloat NativeType;
1062 :
1063 : const JSClass*
1064 : GetJSClass();
1065 :
1066 : bool
1067 : Wrap(JSContext* aCx, mozilla::WebGLExtensionColorBufferHalfFloat* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1068 :
1069 : template <class T>
1070 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1071 : {
1072 0 : JS::Rooted<JSObject*> reflector(aCx);
1073 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1074 : }
1075 :
1076 : // We declare this as an array so that retrieving a pointer to this
1077 : // binding's property hooks only requires compile/link-time resolvable
1078 : // address arithmetic. Declaring it as a pointer instead would require
1079 : // doing a run-time load to fetch a pointer to this binding's property
1080 : // hooks. And then structures which embedded a pointer to this structure
1081 : // would require a run-time load for proper initialization, which would
1082 : // then induce static constructors. Lots of static constructors.
1083 : extern const NativePropertyHooks sNativePropertyHooks[];
1084 :
1085 : void
1086 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1087 :
1088 : JS::Handle<JSObject*>
1089 : GetProtoObjectHandle(JSContext* aCx);
1090 :
1091 : } // namespace EXT_color_buffer_half_floatBinding
1092 :
1093 :
1094 :
1095 : namespace EXT_disjoint_timer_queryBinding {
1096 :
1097 : typedef mozilla::WebGLExtensionDisjointTimerQuery NativeType;
1098 :
1099 : const JSClass*
1100 : GetJSClass();
1101 :
1102 : bool
1103 : Wrap(JSContext* aCx, mozilla::WebGLExtensionDisjointTimerQuery* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1104 :
1105 : template <class T>
1106 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1107 : {
1108 0 : JS::Rooted<JSObject*> reflector(aCx);
1109 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1110 : }
1111 :
1112 : // We declare this as an array so that retrieving a pointer to this
1113 : // binding's property hooks only requires compile/link-time resolvable
1114 : // address arithmetic. Declaring it as a pointer instead would require
1115 : // doing a run-time load to fetch a pointer to this binding's property
1116 : // hooks. And then structures which embedded a pointer to this structure
1117 : // would require a run-time load for proper initialization, which would
1118 : // then induce static constructors. Lots of static constructors.
1119 : extern const NativePropertyHooks sNativePropertyHooks[];
1120 :
1121 : void
1122 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1123 :
1124 : JS::Handle<JSObject*>
1125 : GetProtoObjectHandle(JSContext* aCx);
1126 :
1127 : } // namespace EXT_disjoint_timer_queryBinding
1128 :
1129 :
1130 :
1131 : namespace EXT_frag_depthBinding {
1132 :
1133 : typedef mozilla::WebGLExtensionFragDepth NativeType;
1134 :
1135 : const JSClass*
1136 : GetJSClass();
1137 :
1138 : bool
1139 : Wrap(JSContext* aCx, mozilla::WebGLExtensionFragDepth* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1140 :
1141 : template <class T>
1142 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1143 : {
1144 0 : JS::Rooted<JSObject*> reflector(aCx);
1145 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1146 : }
1147 :
1148 : // We declare this as an array so that retrieving a pointer to this
1149 : // binding's property hooks only requires compile/link-time resolvable
1150 : // address arithmetic. Declaring it as a pointer instead would require
1151 : // doing a run-time load to fetch a pointer to this binding's property
1152 : // hooks. And then structures which embedded a pointer to this structure
1153 : // would require a run-time load for proper initialization, which would
1154 : // then induce static constructors. Lots of static constructors.
1155 : extern const NativePropertyHooks sNativePropertyHooks[];
1156 :
1157 : void
1158 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1159 :
1160 : JS::Handle<JSObject*>
1161 : GetProtoObjectHandle(JSContext* aCx);
1162 :
1163 : } // namespace EXT_frag_depthBinding
1164 :
1165 :
1166 :
1167 : namespace EXT_sRGBBinding {
1168 :
1169 : typedef mozilla::WebGLExtensionSRGB NativeType;
1170 :
1171 : const JSClass*
1172 : GetJSClass();
1173 :
1174 : bool
1175 : Wrap(JSContext* aCx, mozilla::WebGLExtensionSRGB* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1176 :
1177 : template <class T>
1178 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1179 : {
1180 0 : JS::Rooted<JSObject*> reflector(aCx);
1181 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1182 : }
1183 :
1184 : // We declare this as an array so that retrieving a pointer to this
1185 : // binding's property hooks only requires compile/link-time resolvable
1186 : // address arithmetic. Declaring it as a pointer instead would require
1187 : // doing a run-time load to fetch a pointer to this binding's property
1188 : // hooks. And then structures which embedded a pointer to this structure
1189 : // would require a run-time load for proper initialization, which would
1190 : // then induce static constructors. Lots of static constructors.
1191 : extern const NativePropertyHooks sNativePropertyHooks[];
1192 :
1193 : void
1194 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1195 :
1196 : JS::Handle<JSObject*>
1197 : GetProtoObjectHandle(JSContext* aCx);
1198 :
1199 : } // namespace EXT_sRGBBinding
1200 :
1201 :
1202 :
1203 : namespace EXT_shader_texture_lodBinding {
1204 :
1205 : typedef mozilla::WebGLExtensionShaderTextureLod NativeType;
1206 :
1207 : const JSClass*
1208 : GetJSClass();
1209 :
1210 : bool
1211 : Wrap(JSContext* aCx, mozilla::WebGLExtensionShaderTextureLod* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1212 :
1213 : template <class T>
1214 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1215 : {
1216 0 : JS::Rooted<JSObject*> reflector(aCx);
1217 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1218 : }
1219 :
1220 : // We declare this as an array so that retrieving a pointer to this
1221 : // binding's property hooks only requires compile/link-time resolvable
1222 : // address arithmetic. Declaring it as a pointer instead would require
1223 : // doing a run-time load to fetch a pointer to this binding's property
1224 : // hooks. And then structures which embedded a pointer to this structure
1225 : // would require a run-time load for proper initialization, which would
1226 : // then induce static constructors. Lots of static constructors.
1227 : extern const NativePropertyHooks sNativePropertyHooks[];
1228 :
1229 : void
1230 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1231 :
1232 : JS::Handle<JSObject*>
1233 : GetProtoObjectHandle(JSContext* aCx);
1234 :
1235 : } // namespace EXT_shader_texture_lodBinding
1236 :
1237 :
1238 :
1239 : namespace EXT_texture_filter_anisotropicBinding {
1240 :
1241 : typedef mozilla::WebGLExtensionTextureFilterAnisotropic NativeType;
1242 :
1243 : const JSClass*
1244 : GetJSClass();
1245 :
1246 : bool
1247 : Wrap(JSContext* aCx, mozilla::WebGLExtensionTextureFilterAnisotropic* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1248 :
1249 : template <class T>
1250 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1251 : {
1252 0 : JS::Rooted<JSObject*> reflector(aCx);
1253 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1254 : }
1255 :
1256 : // We declare this as an array so that retrieving a pointer to this
1257 : // binding's property hooks only requires compile/link-time resolvable
1258 : // address arithmetic. Declaring it as a pointer instead would require
1259 : // doing a run-time load to fetch a pointer to this binding's property
1260 : // hooks. And then structures which embedded a pointer to this structure
1261 : // would require a run-time load for proper initialization, which would
1262 : // then induce static constructors. Lots of static constructors.
1263 : extern const NativePropertyHooks sNativePropertyHooks[];
1264 :
1265 : void
1266 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1267 :
1268 : JS::Handle<JSObject*>
1269 : GetProtoObjectHandle(JSContext* aCx);
1270 :
1271 : } // namespace EXT_texture_filter_anisotropicBinding
1272 :
1273 :
1274 :
1275 : namespace MOZ_debugBinding {
1276 :
1277 : typedef mozilla::WebGLExtensionMOZDebug NativeType;
1278 :
1279 : const JSClass*
1280 : GetJSClass();
1281 :
1282 : bool
1283 : Wrap(JSContext* aCx, mozilla::WebGLExtensionMOZDebug* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1284 :
1285 : template <class T>
1286 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1287 : {
1288 0 : JS::Rooted<JSObject*> reflector(aCx);
1289 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1290 : }
1291 :
1292 : // We declare this as an array so that retrieving a pointer to this
1293 : // binding's property hooks only requires compile/link-time resolvable
1294 : // address arithmetic. Declaring it as a pointer instead would require
1295 : // doing a run-time load to fetch a pointer to this binding's property
1296 : // hooks. And then structures which embedded a pointer to this structure
1297 : // would require a run-time load for proper initialization, which would
1298 : // then induce static constructors. Lots of static constructors.
1299 : extern const NativePropertyHooks sNativePropertyHooks[];
1300 :
1301 : void
1302 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1303 :
1304 : JS::Handle<JSObject*>
1305 : GetProtoObjectHandle(JSContext* aCx);
1306 :
1307 : } // namespace MOZ_debugBinding
1308 :
1309 :
1310 :
1311 : namespace OES_element_index_uintBinding {
1312 :
1313 : typedef mozilla::WebGLExtensionElementIndexUint NativeType;
1314 :
1315 : const JSClass*
1316 : GetJSClass();
1317 :
1318 : bool
1319 : Wrap(JSContext* aCx, mozilla::WebGLExtensionElementIndexUint* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1320 :
1321 : template <class T>
1322 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1323 : {
1324 0 : JS::Rooted<JSObject*> reflector(aCx);
1325 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1326 : }
1327 :
1328 : // We declare this as an array so that retrieving a pointer to this
1329 : // binding's property hooks only requires compile/link-time resolvable
1330 : // address arithmetic. Declaring it as a pointer instead would require
1331 : // doing a run-time load to fetch a pointer to this binding's property
1332 : // hooks. And then structures which embedded a pointer to this structure
1333 : // would require a run-time load for proper initialization, which would
1334 : // then induce static constructors. Lots of static constructors.
1335 : extern const NativePropertyHooks sNativePropertyHooks[];
1336 :
1337 : void
1338 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1339 :
1340 : JS::Handle<JSObject*>
1341 : GetProtoObjectHandle(JSContext* aCx);
1342 :
1343 : } // namespace OES_element_index_uintBinding
1344 :
1345 :
1346 :
1347 : namespace OES_standard_derivativesBinding {
1348 :
1349 : typedef mozilla::WebGLExtensionStandardDerivatives NativeType;
1350 :
1351 : const JSClass*
1352 : GetJSClass();
1353 :
1354 : bool
1355 : Wrap(JSContext* aCx, mozilla::WebGLExtensionStandardDerivatives* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1356 :
1357 : template <class T>
1358 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1359 : {
1360 0 : JS::Rooted<JSObject*> reflector(aCx);
1361 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1362 : }
1363 :
1364 : // We declare this as an array so that retrieving a pointer to this
1365 : // binding's property hooks only requires compile/link-time resolvable
1366 : // address arithmetic. Declaring it as a pointer instead would require
1367 : // doing a run-time load to fetch a pointer to this binding's property
1368 : // hooks. And then structures which embedded a pointer to this structure
1369 : // would require a run-time load for proper initialization, which would
1370 : // then induce static constructors. Lots of static constructors.
1371 : extern const NativePropertyHooks sNativePropertyHooks[];
1372 :
1373 : void
1374 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1375 :
1376 : JS::Handle<JSObject*>
1377 : GetProtoObjectHandle(JSContext* aCx);
1378 :
1379 : } // namespace OES_standard_derivativesBinding
1380 :
1381 :
1382 :
1383 : namespace OES_texture_floatBinding {
1384 :
1385 : typedef mozilla::WebGLExtensionTextureFloat NativeType;
1386 :
1387 : const JSClass*
1388 : GetJSClass();
1389 :
1390 : bool
1391 : Wrap(JSContext* aCx, mozilla::WebGLExtensionTextureFloat* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1392 :
1393 : template <class T>
1394 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1395 : {
1396 0 : JS::Rooted<JSObject*> reflector(aCx);
1397 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1398 : }
1399 :
1400 : // We declare this as an array so that retrieving a pointer to this
1401 : // binding's property hooks only requires compile/link-time resolvable
1402 : // address arithmetic. Declaring it as a pointer instead would require
1403 : // doing a run-time load to fetch a pointer to this binding's property
1404 : // hooks. And then structures which embedded a pointer to this structure
1405 : // would require a run-time load for proper initialization, which would
1406 : // then induce static constructors. Lots of static constructors.
1407 : extern const NativePropertyHooks sNativePropertyHooks[];
1408 :
1409 : void
1410 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1411 :
1412 : JS::Handle<JSObject*>
1413 : GetProtoObjectHandle(JSContext* aCx);
1414 :
1415 : } // namespace OES_texture_floatBinding
1416 :
1417 :
1418 :
1419 : namespace OES_texture_float_linearBinding {
1420 :
1421 : typedef mozilla::WebGLExtensionTextureFloatLinear NativeType;
1422 :
1423 : const JSClass*
1424 : GetJSClass();
1425 :
1426 : bool
1427 : Wrap(JSContext* aCx, mozilla::WebGLExtensionTextureFloatLinear* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1428 :
1429 : template <class T>
1430 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1431 : {
1432 0 : JS::Rooted<JSObject*> reflector(aCx);
1433 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1434 : }
1435 :
1436 : // We declare this as an array so that retrieving a pointer to this
1437 : // binding's property hooks only requires compile/link-time resolvable
1438 : // address arithmetic. Declaring it as a pointer instead would require
1439 : // doing a run-time load to fetch a pointer to this binding's property
1440 : // hooks. And then structures which embedded a pointer to this structure
1441 : // would require a run-time load for proper initialization, which would
1442 : // then induce static constructors. Lots of static constructors.
1443 : extern const NativePropertyHooks sNativePropertyHooks[];
1444 :
1445 : void
1446 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1447 :
1448 : JS::Handle<JSObject*>
1449 : GetProtoObjectHandle(JSContext* aCx);
1450 :
1451 : } // namespace OES_texture_float_linearBinding
1452 :
1453 :
1454 :
1455 : namespace OES_texture_half_floatBinding {
1456 :
1457 : typedef mozilla::WebGLExtensionTextureHalfFloat NativeType;
1458 :
1459 : const JSClass*
1460 : GetJSClass();
1461 :
1462 : bool
1463 : Wrap(JSContext* aCx, mozilla::WebGLExtensionTextureHalfFloat* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1464 :
1465 : template <class T>
1466 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1467 : {
1468 0 : JS::Rooted<JSObject*> reflector(aCx);
1469 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1470 : }
1471 :
1472 : // We declare this as an array so that retrieving a pointer to this
1473 : // binding's property hooks only requires compile/link-time resolvable
1474 : // address arithmetic. Declaring it as a pointer instead would require
1475 : // doing a run-time load to fetch a pointer to this binding's property
1476 : // hooks. And then structures which embedded a pointer to this structure
1477 : // would require a run-time load for proper initialization, which would
1478 : // then induce static constructors. Lots of static constructors.
1479 : extern const NativePropertyHooks sNativePropertyHooks[];
1480 :
1481 : void
1482 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1483 :
1484 : JS::Handle<JSObject*>
1485 : GetProtoObjectHandle(JSContext* aCx);
1486 :
1487 : } // namespace OES_texture_half_floatBinding
1488 :
1489 :
1490 :
1491 : namespace OES_texture_half_float_linearBinding {
1492 :
1493 : typedef mozilla::WebGLExtensionTextureHalfFloatLinear NativeType;
1494 :
1495 : const JSClass*
1496 : GetJSClass();
1497 :
1498 : bool
1499 : Wrap(JSContext* aCx, mozilla::WebGLExtensionTextureHalfFloatLinear* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1500 :
1501 : template <class T>
1502 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1503 : {
1504 0 : JS::Rooted<JSObject*> reflector(aCx);
1505 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1506 : }
1507 :
1508 : // We declare this as an array so that retrieving a pointer to this
1509 : // binding's property hooks only requires compile/link-time resolvable
1510 : // address arithmetic. Declaring it as a pointer instead would require
1511 : // doing a run-time load to fetch a pointer to this binding's property
1512 : // hooks. And then structures which embedded a pointer to this structure
1513 : // would require a run-time load for proper initialization, which would
1514 : // then induce static constructors. Lots of static constructors.
1515 : extern const NativePropertyHooks sNativePropertyHooks[];
1516 :
1517 : void
1518 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1519 :
1520 : JS::Handle<JSObject*>
1521 : GetProtoObjectHandle(JSContext* aCx);
1522 :
1523 : } // namespace OES_texture_half_float_linearBinding
1524 :
1525 :
1526 :
1527 : namespace OES_vertex_array_objectBinding {
1528 :
1529 : typedef mozilla::WebGLExtensionVertexArray NativeType;
1530 :
1531 : const JSClass*
1532 : GetJSClass();
1533 :
1534 : bool
1535 : Wrap(JSContext* aCx, mozilla::WebGLExtensionVertexArray* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1536 :
1537 : template <class T>
1538 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1539 : {
1540 0 : JS::Rooted<JSObject*> reflector(aCx);
1541 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1542 : }
1543 :
1544 : // We declare this as an array so that retrieving a pointer to this
1545 : // binding's property hooks only requires compile/link-time resolvable
1546 : // address arithmetic. Declaring it as a pointer instead would require
1547 : // doing a run-time load to fetch a pointer to this binding's property
1548 : // hooks. And then structures which embedded a pointer to this structure
1549 : // would require a run-time load for proper initialization, which would
1550 : // then induce static constructors. Lots of static constructors.
1551 : extern const NativePropertyHooks sNativePropertyHooks[];
1552 :
1553 : void
1554 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1555 :
1556 : JS::Handle<JSObject*>
1557 : GetProtoObjectHandle(JSContext* aCx);
1558 :
1559 : } // namespace OES_vertex_array_objectBinding
1560 :
1561 :
1562 :
1563 : namespace WEBGL_color_buffer_floatBinding {
1564 :
1565 : typedef mozilla::WebGLExtensionColorBufferFloat NativeType;
1566 :
1567 : const JSClass*
1568 : GetJSClass();
1569 :
1570 : bool
1571 : Wrap(JSContext* aCx, mozilla::WebGLExtensionColorBufferFloat* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1572 :
1573 : template <class T>
1574 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1575 : {
1576 0 : JS::Rooted<JSObject*> reflector(aCx);
1577 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1578 : }
1579 :
1580 : // We declare this as an array so that retrieving a pointer to this
1581 : // binding's property hooks only requires compile/link-time resolvable
1582 : // address arithmetic. Declaring it as a pointer instead would require
1583 : // doing a run-time load to fetch a pointer to this binding's property
1584 : // hooks. And then structures which embedded a pointer to this structure
1585 : // would require a run-time load for proper initialization, which would
1586 : // then induce static constructors. Lots of static constructors.
1587 : extern const NativePropertyHooks sNativePropertyHooks[];
1588 :
1589 : void
1590 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1591 :
1592 : JS::Handle<JSObject*>
1593 : GetProtoObjectHandle(JSContext* aCx);
1594 :
1595 : } // namespace WEBGL_color_buffer_floatBinding
1596 :
1597 :
1598 :
1599 : namespace WEBGL_compressed_texture_astcBinding {
1600 :
1601 : typedef mozilla::WebGLExtensionCompressedTextureASTC NativeType;
1602 :
1603 : const JSClass*
1604 : GetJSClass();
1605 :
1606 : bool
1607 : Wrap(JSContext* aCx, mozilla::WebGLExtensionCompressedTextureASTC* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1608 :
1609 : template <class T>
1610 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1611 : {
1612 0 : JS::Rooted<JSObject*> reflector(aCx);
1613 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1614 : }
1615 :
1616 : // We declare this as an array so that retrieving a pointer to this
1617 : // binding's property hooks only requires compile/link-time resolvable
1618 : // address arithmetic. Declaring it as a pointer instead would require
1619 : // doing a run-time load to fetch a pointer to this binding's property
1620 : // hooks. And then structures which embedded a pointer to this structure
1621 : // would require a run-time load for proper initialization, which would
1622 : // then induce static constructors. Lots of static constructors.
1623 : extern const NativePropertyHooks sNativePropertyHooks[];
1624 :
1625 : void
1626 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1627 :
1628 : JS::Handle<JSObject*>
1629 : GetProtoObjectHandle(JSContext* aCx);
1630 :
1631 : } // namespace WEBGL_compressed_texture_astcBinding
1632 :
1633 :
1634 :
1635 : namespace WEBGL_compressed_texture_atcBinding {
1636 :
1637 : typedef mozilla::WebGLExtensionCompressedTextureATC NativeType;
1638 :
1639 : const JSClass*
1640 : GetJSClass();
1641 :
1642 : bool
1643 : Wrap(JSContext* aCx, mozilla::WebGLExtensionCompressedTextureATC* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1644 :
1645 : template <class T>
1646 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1647 : {
1648 0 : JS::Rooted<JSObject*> reflector(aCx);
1649 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1650 : }
1651 :
1652 : // We declare this as an array so that retrieving a pointer to this
1653 : // binding's property hooks only requires compile/link-time resolvable
1654 : // address arithmetic. Declaring it as a pointer instead would require
1655 : // doing a run-time load to fetch a pointer to this binding's property
1656 : // hooks. And then structures which embedded a pointer to this structure
1657 : // would require a run-time load for proper initialization, which would
1658 : // then induce static constructors. Lots of static constructors.
1659 : extern const NativePropertyHooks sNativePropertyHooks[];
1660 :
1661 : void
1662 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1663 :
1664 : JS::Handle<JSObject*>
1665 : GetProtoObjectHandle(JSContext* aCx);
1666 :
1667 : } // namespace WEBGL_compressed_texture_atcBinding
1668 :
1669 :
1670 :
1671 : namespace WEBGL_compressed_texture_etcBinding {
1672 :
1673 : typedef mozilla::WebGLExtensionCompressedTextureES3 NativeType;
1674 :
1675 : const JSClass*
1676 : GetJSClass();
1677 :
1678 : bool
1679 : Wrap(JSContext* aCx, mozilla::WebGLExtensionCompressedTextureES3* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1680 :
1681 : template <class T>
1682 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1683 : {
1684 0 : JS::Rooted<JSObject*> reflector(aCx);
1685 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1686 : }
1687 :
1688 : // We declare this as an array so that retrieving a pointer to this
1689 : // binding's property hooks only requires compile/link-time resolvable
1690 : // address arithmetic. Declaring it as a pointer instead would require
1691 : // doing a run-time load to fetch a pointer to this binding's property
1692 : // hooks. And then structures which embedded a pointer to this structure
1693 : // would require a run-time load for proper initialization, which would
1694 : // then induce static constructors. Lots of static constructors.
1695 : extern const NativePropertyHooks sNativePropertyHooks[];
1696 :
1697 : void
1698 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1699 :
1700 : JS::Handle<JSObject*>
1701 : GetProtoObjectHandle(JSContext* aCx);
1702 :
1703 : } // namespace WEBGL_compressed_texture_etcBinding
1704 :
1705 :
1706 :
1707 : namespace WEBGL_compressed_texture_etc1Binding {
1708 :
1709 : typedef mozilla::WebGLExtensionCompressedTextureETC1 NativeType;
1710 :
1711 : const JSClass*
1712 : GetJSClass();
1713 :
1714 : bool
1715 : Wrap(JSContext* aCx, mozilla::WebGLExtensionCompressedTextureETC1* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1716 :
1717 : template <class T>
1718 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1719 : {
1720 0 : JS::Rooted<JSObject*> reflector(aCx);
1721 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1722 : }
1723 :
1724 : // We declare this as an array so that retrieving a pointer to this
1725 : // binding's property hooks only requires compile/link-time resolvable
1726 : // address arithmetic. Declaring it as a pointer instead would require
1727 : // doing a run-time load to fetch a pointer to this binding's property
1728 : // hooks. And then structures which embedded a pointer to this structure
1729 : // would require a run-time load for proper initialization, which would
1730 : // then induce static constructors. Lots of static constructors.
1731 : extern const NativePropertyHooks sNativePropertyHooks[];
1732 :
1733 : void
1734 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1735 :
1736 : JS::Handle<JSObject*>
1737 : GetProtoObjectHandle(JSContext* aCx);
1738 :
1739 : } // namespace WEBGL_compressed_texture_etc1Binding
1740 :
1741 :
1742 :
1743 : namespace WEBGL_compressed_texture_pvrtcBinding {
1744 :
1745 : typedef mozilla::WebGLExtensionCompressedTexturePVRTC NativeType;
1746 :
1747 : const JSClass*
1748 : GetJSClass();
1749 :
1750 : bool
1751 : Wrap(JSContext* aCx, mozilla::WebGLExtensionCompressedTexturePVRTC* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1752 :
1753 : template <class T>
1754 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1755 : {
1756 0 : JS::Rooted<JSObject*> reflector(aCx);
1757 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1758 : }
1759 :
1760 : // We declare this as an array so that retrieving a pointer to this
1761 : // binding's property hooks only requires compile/link-time resolvable
1762 : // address arithmetic. Declaring it as a pointer instead would require
1763 : // doing a run-time load to fetch a pointer to this binding's property
1764 : // hooks. And then structures which embedded a pointer to this structure
1765 : // would require a run-time load for proper initialization, which would
1766 : // then induce static constructors. Lots of static constructors.
1767 : extern const NativePropertyHooks sNativePropertyHooks[];
1768 :
1769 : void
1770 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1771 :
1772 : JS::Handle<JSObject*>
1773 : GetProtoObjectHandle(JSContext* aCx);
1774 :
1775 : } // namespace WEBGL_compressed_texture_pvrtcBinding
1776 :
1777 :
1778 :
1779 : namespace WEBGL_compressed_texture_s3tcBinding {
1780 :
1781 : typedef mozilla::WebGLExtensionCompressedTextureS3TC NativeType;
1782 :
1783 : const JSClass*
1784 : GetJSClass();
1785 :
1786 : bool
1787 : Wrap(JSContext* aCx, mozilla::WebGLExtensionCompressedTextureS3TC* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1788 :
1789 : template <class T>
1790 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1791 : {
1792 0 : JS::Rooted<JSObject*> reflector(aCx);
1793 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1794 : }
1795 :
1796 : // We declare this as an array so that retrieving a pointer to this
1797 : // binding's property hooks only requires compile/link-time resolvable
1798 : // address arithmetic. Declaring it as a pointer instead would require
1799 : // doing a run-time load to fetch a pointer to this binding's property
1800 : // hooks. And then structures which embedded a pointer to this structure
1801 : // would require a run-time load for proper initialization, which would
1802 : // then induce static constructors. Lots of static constructors.
1803 : extern const NativePropertyHooks sNativePropertyHooks[];
1804 :
1805 : void
1806 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1807 :
1808 : JS::Handle<JSObject*>
1809 : GetProtoObjectHandle(JSContext* aCx);
1810 :
1811 : } // namespace WEBGL_compressed_texture_s3tcBinding
1812 :
1813 :
1814 :
1815 : namespace WEBGL_compressed_texture_s3tc_srgbBinding {
1816 :
1817 : typedef mozilla::WebGLExtensionCompressedTextureS3TC_SRGB NativeType;
1818 :
1819 : const JSClass*
1820 : GetJSClass();
1821 :
1822 : bool
1823 : Wrap(JSContext* aCx, mozilla::WebGLExtensionCompressedTextureS3TC_SRGB* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1824 :
1825 : template <class T>
1826 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1827 : {
1828 0 : JS::Rooted<JSObject*> reflector(aCx);
1829 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1830 : }
1831 :
1832 : // We declare this as an array so that retrieving a pointer to this
1833 : // binding's property hooks only requires compile/link-time resolvable
1834 : // address arithmetic. Declaring it as a pointer instead would require
1835 : // doing a run-time load to fetch a pointer to this binding's property
1836 : // hooks. And then structures which embedded a pointer to this structure
1837 : // would require a run-time load for proper initialization, which would
1838 : // then induce static constructors. Lots of static constructors.
1839 : extern const NativePropertyHooks sNativePropertyHooks[];
1840 :
1841 : void
1842 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1843 :
1844 : JS::Handle<JSObject*>
1845 : GetProtoObjectHandle(JSContext* aCx);
1846 :
1847 : } // namespace WEBGL_compressed_texture_s3tc_srgbBinding
1848 :
1849 :
1850 :
1851 : namespace WEBGL_debug_renderer_infoBinding {
1852 :
1853 : typedef mozilla::WebGLExtensionDebugRendererInfo NativeType;
1854 :
1855 : const JSClass*
1856 : GetJSClass();
1857 :
1858 : bool
1859 : Wrap(JSContext* aCx, mozilla::WebGLExtensionDebugRendererInfo* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1860 :
1861 : template <class T>
1862 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1863 : {
1864 0 : JS::Rooted<JSObject*> reflector(aCx);
1865 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1866 : }
1867 :
1868 : // We declare this as an array so that retrieving a pointer to this
1869 : // binding's property hooks only requires compile/link-time resolvable
1870 : // address arithmetic. Declaring it as a pointer instead would require
1871 : // doing a run-time load to fetch a pointer to this binding's property
1872 : // hooks. And then structures which embedded a pointer to this structure
1873 : // would require a run-time load for proper initialization, which would
1874 : // then induce static constructors. Lots of static constructors.
1875 : extern const NativePropertyHooks sNativePropertyHooks[];
1876 :
1877 : void
1878 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1879 :
1880 : JS::Handle<JSObject*>
1881 : GetProtoObjectHandle(JSContext* aCx);
1882 :
1883 : } // namespace WEBGL_debug_renderer_infoBinding
1884 :
1885 :
1886 :
1887 : namespace WEBGL_debug_shadersBinding {
1888 :
1889 : typedef mozilla::WebGLExtensionDebugShaders NativeType;
1890 :
1891 : const JSClass*
1892 : GetJSClass();
1893 :
1894 : bool
1895 : Wrap(JSContext* aCx, mozilla::WebGLExtensionDebugShaders* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1896 :
1897 : template <class T>
1898 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1899 : {
1900 0 : JS::Rooted<JSObject*> reflector(aCx);
1901 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1902 : }
1903 :
1904 : // We declare this as an array so that retrieving a pointer to this
1905 : // binding's property hooks only requires compile/link-time resolvable
1906 : // address arithmetic. Declaring it as a pointer instead would require
1907 : // doing a run-time load to fetch a pointer to this binding's property
1908 : // hooks. And then structures which embedded a pointer to this structure
1909 : // would require a run-time load for proper initialization, which would
1910 : // then induce static constructors. Lots of static constructors.
1911 : extern const NativePropertyHooks sNativePropertyHooks[];
1912 :
1913 : void
1914 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1915 :
1916 : JS::Handle<JSObject*>
1917 : GetProtoObjectHandle(JSContext* aCx);
1918 :
1919 : } // namespace WEBGL_debug_shadersBinding
1920 :
1921 :
1922 :
1923 : namespace WEBGL_depth_textureBinding {
1924 :
1925 : typedef mozilla::WebGLExtensionDepthTexture NativeType;
1926 :
1927 : const JSClass*
1928 : GetJSClass();
1929 :
1930 : bool
1931 : Wrap(JSContext* aCx, mozilla::WebGLExtensionDepthTexture* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1932 :
1933 : template <class T>
1934 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1935 : {
1936 0 : JS::Rooted<JSObject*> reflector(aCx);
1937 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1938 : }
1939 :
1940 : // We declare this as an array so that retrieving a pointer to this
1941 : // binding's property hooks only requires compile/link-time resolvable
1942 : // address arithmetic. Declaring it as a pointer instead would require
1943 : // doing a run-time load to fetch a pointer to this binding's property
1944 : // hooks. And then structures which embedded a pointer to this structure
1945 : // would require a run-time load for proper initialization, which would
1946 : // then induce static constructors. Lots of static constructors.
1947 : extern const NativePropertyHooks sNativePropertyHooks[];
1948 :
1949 : void
1950 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1951 :
1952 : JS::Handle<JSObject*>
1953 : GetProtoObjectHandle(JSContext* aCx);
1954 :
1955 : } // namespace WEBGL_depth_textureBinding
1956 :
1957 :
1958 :
1959 : namespace WEBGL_draw_buffersBinding {
1960 :
1961 : typedef mozilla::WebGLExtensionDrawBuffers NativeType;
1962 :
1963 : const JSClass*
1964 : GetJSClass();
1965 :
1966 : bool
1967 : Wrap(JSContext* aCx, mozilla::WebGLExtensionDrawBuffers* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
1968 :
1969 : template <class T>
1970 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
1971 : {
1972 0 : JS::Rooted<JSObject*> reflector(aCx);
1973 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
1974 : }
1975 :
1976 : // We declare this as an array so that retrieving a pointer to this
1977 : // binding's property hooks only requires compile/link-time resolvable
1978 : // address arithmetic. Declaring it as a pointer instead would require
1979 : // doing a run-time load to fetch a pointer to this binding's property
1980 : // hooks. And then structures which embedded a pointer to this structure
1981 : // would require a run-time load for proper initialization, which would
1982 : // then induce static constructors. Lots of static constructors.
1983 : extern const NativePropertyHooks sNativePropertyHooks[];
1984 :
1985 : void
1986 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
1987 :
1988 : JS::Handle<JSObject*>
1989 : GetProtoObjectHandle(JSContext* aCx);
1990 :
1991 : } // namespace WEBGL_draw_buffersBinding
1992 :
1993 :
1994 :
1995 : namespace WEBGL_lose_contextBinding {
1996 :
1997 : typedef mozilla::WebGLExtensionLoseContext NativeType;
1998 :
1999 : const JSClass*
2000 : GetJSClass();
2001 :
2002 : bool
2003 : Wrap(JSContext* aCx, mozilla::WebGLExtensionLoseContext* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
2004 :
2005 : template <class T>
2006 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
2007 : {
2008 0 : JS::Rooted<JSObject*> reflector(aCx);
2009 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
2010 : }
2011 :
2012 : // We declare this as an array so that retrieving a pointer to this
2013 : // binding's property hooks only requires compile/link-time resolvable
2014 : // address arithmetic. Declaring it as a pointer instead would require
2015 : // doing a run-time load to fetch a pointer to this binding's property
2016 : // hooks. And then structures which embedded a pointer to this structure
2017 : // would require a run-time load for proper initialization, which would
2018 : // then induce static constructors. Lots of static constructors.
2019 : extern const NativePropertyHooks sNativePropertyHooks[];
2020 :
2021 : void
2022 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
2023 :
2024 : JS::Handle<JSObject*>
2025 : GetProtoObjectHandle(JSContext* aCx);
2026 :
2027 : } // namespace WEBGL_lose_contextBinding
2028 :
2029 :
2030 :
2031 : namespace WebGLActiveInfoBinding {
2032 :
2033 : typedef mozilla::WebGLActiveInfo NativeType;
2034 :
2035 : bool
2036 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
2037 :
2038 : JSObject*
2039 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
2040 :
2041 : const JSClass*
2042 : GetJSClass();
2043 :
2044 : bool
2045 : Wrap(JSContext* aCx, mozilla::WebGLActiveInfo* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
2046 :
2047 : template <class T>
2048 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
2049 : {
2050 0 : JS::Rooted<JSObject*> reflector(aCx);
2051 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
2052 : }
2053 :
2054 : // We declare this as an array so that retrieving a pointer to this
2055 : // binding's property hooks only requires compile/link-time resolvable
2056 : // address arithmetic. Declaring it as a pointer instead would require
2057 : // doing a run-time load to fetch a pointer to this binding's property
2058 : // hooks. And then structures which embedded a pointer to this structure
2059 : // would require a run-time load for proper initialization, which would
2060 : // then induce static constructors. Lots of static constructors.
2061 : extern const NativePropertyHooks sNativePropertyHooks[];
2062 :
2063 : void
2064 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
2065 :
2066 : JS::Handle<JSObject*>
2067 : GetProtoObjectHandle(JSContext* aCx);
2068 :
2069 : JS::Handle<JSObject*>
2070 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
2071 :
2072 : JSObject*
2073 : GetConstructorObject(JSContext* aCx);
2074 :
2075 : } // namespace WebGLActiveInfoBinding
2076 :
2077 :
2078 :
2079 : namespace WebGLBufferBinding {
2080 :
2081 : typedef mozilla::WebGLBuffer NativeType;
2082 :
2083 : bool
2084 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
2085 :
2086 : JSObject*
2087 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
2088 :
2089 : const JSClass*
2090 : GetJSClass();
2091 :
2092 : bool
2093 : Wrap(JSContext* aCx, mozilla::WebGLBuffer* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
2094 :
2095 : template <class T>
2096 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
2097 : {
2098 0 : JS::Rooted<JSObject*> reflector(aCx);
2099 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
2100 : }
2101 :
2102 : // We declare this as an array so that retrieving a pointer to this
2103 : // binding's property hooks only requires compile/link-time resolvable
2104 : // address arithmetic. Declaring it as a pointer instead would require
2105 : // doing a run-time load to fetch a pointer to this binding's property
2106 : // hooks. And then structures which embedded a pointer to this structure
2107 : // would require a run-time load for proper initialization, which would
2108 : // then induce static constructors. Lots of static constructors.
2109 : extern const NativePropertyHooks sNativePropertyHooks[];
2110 :
2111 : void
2112 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
2113 :
2114 : JS::Handle<JSObject*>
2115 : GetProtoObjectHandle(JSContext* aCx);
2116 :
2117 : JS::Handle<JSObject*>
2118 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
2119 :
2120 : JSObject*
2121 : GetConstructorObject(JSContext* aCx);
2122 :
2123 : } // namespace WebGLBufferBinding
2124 :
2125 :
2126 :
2127 : namespace WebGLFramebufferBinding {
2128 :
2129 : typedef mozilla::WebGLFramebuffer NativeType;
2130 :
2131 : bool
2132 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
2133 :
2134 : JSObject*
2135 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
2136 :
2137 : const JSClass*
2138 : GetJSClass();
2139 :
2140 : bool
2141 : Wrap(JSContext* aCx, mozilla::WebGLFramebuffer* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
2142 :
2143 : template <class T>
2144 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
2145 : {
2146 0 : JS::Rooted<JSObject*> reflector(aCx);
2147 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
2148 : }
2149 :
2150 : // We declare this as an array so that retrieving a pointer to this
2151 : // binding's property hooks only requires compile/link-time resolvable
2152 : // address arithmetic. Declaring it as a pointer instead would require
2153 : // doing a run-time load to fetch a pointer to this binding's property
2154 : // hooks. And then structures which embedded a pointer to this structure
2155 : // would require a run-time load for proper initialization, which would
2156 : // then induce static constructors. Lots of static constructors.
2157 : extern const NativePropertyHooks sNativePropertyHooks[];
2158 :
2159 : void
2160 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
2161 :
2162 : JS::Handle<JSObject*>
2163 : GetProtoObjectHandle(JSContext* aCx);
2164 :
2165 : JS::Handle<JSObject*>
2166 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
2167 :
2168 : JSObject*
2169 : GetConstructorObject(JSContext* aCx);
2170 :
2171 : } // namespace WebGLFramebufferBinding
2172 :
2173 :
2174 :
2175 : namespace WebGLProgramBinding {
2176 :
2177 : typedef mozilla::WebGLProgram NativeType;
2178 :
2179 : bool
2180 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
2181 :
2182 : JSObject*
2183 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
2184 :
2185 : const JSClass*
2186 : GetJSClass();
2187 :
2188 : bool
2189 : Wrap(JSContext* aCx, mozilla::WebGLProgram* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
2190 :
2191 : template <class T>
2192 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
2193 : {
2194 0 : JS::Rooted<JSObject*> reflector(aCx);
2195 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
2196 : }
2197 :
2198 : // We declare this as an array so that retrieving a pointer to this
2199 : // binding's property hooks only requires compile/link-time resolvable
2200 : // address arithmetic. Declaring it as a pointer instead would require
2201 : // doing a run-time load to fetch a pointer to this binding's property
2202 : // hooks. And then structures which embedded a pointer to this structure
2203 : // would require a run-time load for proper initialization, which would
2204 : // then induce static constructors. Lots of static constructors.
2205 : extern const NativePropertyHooks sNativePropertyHooks[];
2206 :
2207 : void
2208 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
2209 :
2210 : JS::Handle<JSObject*>
2211 : GetProtoObjectHandle(JSContext* aCx);
2212 :
2213 : JS::Handle<JSObject*>
2214 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
2215 :
2216 : JSObject*
2217 : GetConstructorObject(JSContext* aCx);
2218 :
2219 : } // namespace WebGLProgramBinding
2220 :
2221 :
2222 :
2223 : namespace WebGLQueryBinding {
2224 :
2225 : typedef mozilla::WebGLQuery NativeType;
2226 :
2227 : JSObject*
2228 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
2229 :
2230 : const JSClass*
2231 : GetJSClass();
2232 :
2233 : bool
2234 : Wrap(JSContext* aCx, mozilla::WebGLQuery* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
2235 :
2236 : template <class T>
2237 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
2238 : {
2239 0 : JS::Rooted<JSObject*> reflector(aCx);
2240 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
2241 : }
2242 :
2243 : // We declare this as an array so that retrieving a pointer to this
2244 : // binding's property hooks only requires compile/link-time resolvable
2245 : // address arithmetic. Declaring it as a pointer instead would require
2246 : // doing a run-time load to fetch a pointer to this binding's property
2247 : // hooks. And then structures which embedded a pointer to this structure
2248 : // would require a run-time load for proper initialization, which would
2249 : // then induce static constructors. Lots of static constructors.
2250 : extern const NativePropertyHooks sNativePropertyHooks[];
2251 :
2252 : void
2253 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
2254 :
2255 : JS::Handle<JSObject*>
2256 : GetProtoObjectHandle(JSContext* aCx);
2257 :
2258 : JS::Handle<JSObject*>
2259 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
2260 :
2261 : JSObject*
2262 : GetConstructorObject(JSContext* aCx);
2263 :
2264 : } // namespace WebGLQueryBinding
2265 :
2266 :
2267 :
2268 : namespace WebGLRenderbufferBinding {
2269 :
2270 : typedef mozilla::WebGLRenderbuffer NativeType;
2271 :
2272 : bool
2273 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
2274 :
2275 : JSObject*
2276 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
2277 :
2278 : const JSClass*
2279 : GetJSClass();
2280 :
2281 : bool
2282 : Wrap(JSContext* aCx, mozilla::WebGLRenderbuffer* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
2283 :
2284 : template <class T>
2285 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
2286 : {
2287 0 : JS::Rooted<JSObject*> reflector(aCx);
2288 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
2289 : }
2290 :
2291 : // We declare this as an array so that retrieving a pointer to this
2292 : // binding's property hooks only requires compile/link-time resolvable
2293 : // address arithmetic. Declaring it as a pointer instead would require
2294 : // doing a run-time load to fetch a pointer to this binding's property
2295 : // hooks. And then structures which embedded a pointer to this structure
2296 : // would require a run-time load for proper initialization, which would
2297 : // then induce static constructors. Lots of static constructors.
2298 : extern const NativePropertyHooks sNativePropertyHooks[];
2299 :
2300 : void
2301 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
2302 :
2303 : JS::Handle<JSObject*>
2304 : GetProtoObjectHandle(JSContext* aCx);
2305 :
2306 : JS::Handle<JSObject*>
2307 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
2308 :
2309 : JSObject*
2310 : GetConstructorObject(JSContext* aCx);
2311 :
2312 : } // namespace WebGLRenderbufferBinding
2313 :
2314 :
2315 :
2316 : namespace WebGLRenderingContextBinding {
2317 :
2318 : typedef mozilla::WebGLContext NativeType;
2319 :
2320 : bool
2321 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
2322 :
2323 : JSObject*
2324 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
2325 :
2326 : const JSClass*
2327 : GetJSClass();
2328 :
2329 : bool
2330 : Wrap(JSContext* aCx, mozilla::WebGLContext* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
2331 :
2332 : template <class T>
2333 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
2334 : {
2335 0 : JS::Rooted<JSObject*> reflector(aCx);
2336 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
2337 : }
2338 :
2339 : // We declare this as an array so that retrieving a pointer to this
2340 : // binding's property hooks only requires compile/link-time resolvable
2341 : // address arithmetic. Declaring it as a pointer instead would require
2342 : // doing a run-time load to fetch a pointer to this binding's property
2343 : // hooks. And then structures which embedded a pointer to this structure
2344 : // would require a run-time load for proper initialization, which would
2345 : // then induce static constructors. Lots of static constructors.
2346 : extern const NativePropertyHooks sNativePropertyHooks[];
2347 :
2348 : void
2349 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
2350 :
2351 : JS::Handle<JSObject*>
2352 : GetProtoObjectHandle(JSContext* aCx);
2353 :
2354 : JS::Handle<JSObject*>
2355 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
2356 :
2357 : JSObject*
2358 : GetConstructorObject(JSContext* aCx);
2359 :
2360 : } // namespace WebGLRenderingContextBinding
2361 :
2362 :
2363 :
2364 : namespace WebGLShaderBinding {
2365 :
2366 : typedef mozilla::WebGLShader NativeType;
2367 :
2368 : bool
2369 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
2370 :
2371 : JSObject*
2372 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
2373 :
2374 : const JSClass*
2375 : GetJSClass();
2376 :
2377 : bool
2378 : Wrap(JSContext* aCx, mozilla::WebGLShader* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
2379 :
2380 : template <class T>
2381 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
2382 : {
2383 0 : JS::Rooted<JSObject*> reflector(aCx);
2384 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
2385 : }
2386 :
2387 : // We declare this as an array so that retrieving a pointer to this
2388 : // binding's property hooks only requires compile/link-time resolvable
2389 : // address arithmetic. Declaring it as a pointer instead would require
2390 : // doing a run-time load to fetch a pointer to this binding's property
2391 : // hooks. And then structures which embedded a pointer to this structure
2392 : // would require a run-time load for proper initialization, which would
2393 : // then induce static constructors. Lots of static constructors.
2394 : extern const NativePropertyHooks sNativePropertyHooks[];
2395 :
2396 : void
2397 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
2398 :
2399 : JS::Handle<JSObject*>
2400 : GetProtoObjectHandle(JSContext* aCx);
2401 :
2402 : JS::Handle<JSObject*>
2403 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
2404 :
2405 : JSObject*
2406 : GetConstructorObject(JSContext* aCx);
2407 :
2408 : } // namespace WebGLShaderBinding
2409 :
2410 :
2411 :
2412 : namespace WebGLShaderPrecisionFormatBinding {
2413 :
2414 : typedef mozilla::WebGLShaderPrecisionFormat NativeType;
2415 :
2416 : bool
2417 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
2418 :
2419 : JSObject*
2420 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
2421 :
2422 : const JSClass*
2423 : GetJSClass();
2424 :
2425 : bool
2426 : Wrap(JSContext* aCx, mozilla::WebGLShaderPrecisionFormat* aObject, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
2427 :
2428 : // We declare this as an array so that retrieving a pointer to this
2429 : // binding's property hooks only requires compile/link-time resolvable
2430 : // address arithmetic. Declaring it as a pointer instead would require
2431 : // doing a run-time load to fetch a pointer to this binding's property
2432 : // hooks. And then structures which embedded a pointer to this structure
2433 : // would require a run-time load for proper initialization, which would
2434 : // then induce static constructors. Lots of static constructors.
2435 : extern const NativePropertyHooks sNativePropertyHooks[];
2436 :
2437 : void
2438 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
2439 :
2440 : JS::Handle<JSObject*>
2441 : GetProtoObjectHandle(JSContext* aCx);
2442 :
2443 : JS::Handle<JSObject*>
2444 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
2445 :
2446 : JSObject*
2447 : GetConstructorObject(JSContext* aCx);
2448 :
2449 : } // namespace WebGLShaderPrecisionFormatBinding
2450 :
2451 :
2452 :
2453 : namespace WebGLTextureBinding {
2454 :
2455 : typedef mozilla::WebGLTexture NativeType;
2456 :
2457 : bool
2458 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
2459 :
2460 : JSObject*
2461 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
2462 :
2463 : const JSClass*
2464 : GetJSClass();
2465 :
2466 : bool
2467 : Wrap(JSContext* aCx, mozilla::WebGLTexture* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
2468 :
2469 : template <class T>
2470 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
2471 : {
2472 0 : JS::Rooted<JSObject*> reflector(aCx);
2473 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
2474 : }
2475 :
2476 : // We declare this as an array so that retrieving a pointer to this
2477 : // binding's property hooks only requires compile/link-time resolvable
2478 : // address arithmetic. Declaring it as a pointer instead would require
2479 : // doing a run-time load to fetch a pointer to this binding's property
2480 : // hooks. And then structures which embedded a pointer to this structure
2481 : // would require a run-time load for proper initialization, which would
2482 : // then induce static constructors. Lots of static constructors.
2483 : extern const NativePropertyHooks sNativePropertyHooks[];
2484 :
2485 : void
2486 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
2487 :
2488 : JS::Handle<JSObject*>
2489 : GetProtoObjectHandle(JSContext* aCx);
2490 :
2491 : JS::Handle<JSObject*>
2492 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
2493 :
2494 : JSObject*
2495 : GetConstructorObject(JSContext* aCx);
2496 :
2497 : } // namespace WebGLTextureBinding
2498 :
2499 :
2500 :
2501 : namespace WebGLUniformLocationBinding {
2502 :
2503 : typedef mozilla::WebGLUniformLocation NativeType;
2504 :
2505 : bool
2506 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
2507 :
2508 : JSObject*
2509 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
2510 :
2511 : const JSClass*
2512 : GetJSClass();
2513 :
2514 : bool
2515 : Wrap(JSContext* aCx, mozilla::WebGLUniformLocation* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
2516 :
2517 : template <class T>
2518 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
2519 : {
2520 0 : JS::Rooted<JSObject*> reflector(aCx);
2521 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
2522 : }
2523 :
2524 : // We declare this as an array so that retrieving a pointer to this
2525 : // binding's property hooks only requires compile/link-time resolvable
2526 : // address arithmetic. Declaring it as a pointer instead would require
2527 : // doing a run-time load to fetch a pointer to this binding's property
2528 : // hooks. And then structures which embedded a pointer to this structure
2529 : // would require a run-time load for proper initialization, which would
2530 : // then induce static constructors. Lots of static constructors.
2531 : extern const NativePropertyHooks sNativePropertyHooks[];
2532 :
2533 : void
2534 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
2535 :
2536 : JS::Handle<JSObject*>
2537 : GetProtoObjectHandle(JSContext* aCx);
2538 :
2539 : JS::Handle<JSObject*>
2540 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
2541 :
2542 : JSObject*
2543 : GetConstructorObject(JSContext* aCx);
2544 :
2545 : } // namespace WebGLUniformLocationBinding
2546 :
2547 :
2548 :
2549 : namespace WebGLVertexArrayObjectBinding {
2550 :
2551 : typedef mozilla::WebGLVertexArray NativeType;
2552 :
2553 : JSObject*
2554 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
2555 :
2556 : const JSClass*
2557 : GetJSClass();
2558 :
2559 : bool
2560 : Wrap(JSContext* aCx, mozilla::WebGLVertexArray* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
2561 :
2562 : template <class T>
2563 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
2564 : {
2565 0 : JS::Rooted<JSObject*> reflector(aCx);
2566 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
2567 : }
2568 :
2569 : // We declare this as an array so that retrieving a pointer to this
2570 : // binding's property hooks only requires compile/link-time resolvable
2571 : // address arithmetic. Declaring it as a pointer instead would require
2572 : // doing a run-time load to fetch a pointer to this binding's property
2573 : // hooks. And then structures which embedded a pointer to this structure
2574 : // would require a run-time load for proper initialization, which would
2575 : // then induce static constructors. Lots of static constructors.
2576 : extern const NativePropertyHooks sNativePropertyHooks[];
2577 :
2578 : void
2579 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
2580 :
2581 : JS::Handle<JSObject*>
2582 : GetProtoObjectHandle(JSContext* aCx);
2583 :
2584 : JS::Handle<JSObject*>
2585 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
2586 :
2587 : JSObject*
2588 : GetConstructorObject(JSContext* aCx);
2589 :
2590 : } // namespace WebGLVertexArrayObjectBinding
2591 :
2592 :
2593 :
2594 : } // namespace dom
2595 : } // namespace mozilla
2596 :
2597 : #endif // mozilla_dom_WebGLRenderingContextBinding_h
|