Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM Console.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_ConsoleBinding_h
4 : #define mozilla_dom_ConsoleBinding_h
5 :
6 : #include "js/RootingAPI.h"
7 : #include "jspubtd.h"
8 : #include "mozilla/ErrorResult.h"
9 : #include "mozilla/dom/BindingDeclarations.h"
10 : #include "mozilla/dom/FakeString.h"
11 : #include "mozilla/dom/Nullable.h"
12 : #include "mozilla/dom/UnionMember.h"
13 :
14 : namespace mozilla {
15 : namespace dom {
16 :
17 : class Console;
18 : struct ConsoleAtoms;
19 : struct ConsoleCounterAtoms;
20 : struct ConsoleCounterErrorAtoms;
21 : struct ConsoleEventAtoms;
22 : struct ConsoleProfileEventAtoms;
23 : struct ConsoleStackEntryAtoms;
24 : struct ConsoleTimerEndAtoms;
25 : struct ConsoleTimerErrorAtoms;
26 : struct ConsoleTimerStartAtoms;
27 : struct NativePropertyHooks;
28 : class OwningUnsignedLongLongOrString;
29 : class ProtoAndIfaceCache;
30 : class UnsignedLongLongOrString;
31 :
32 : } // namespace dom
33 : } // namespace mozilla
34 :
35 : namespace mozilla {
36 : namespace dom {
37 :
38 0 : struct ConsoleCounter : public DictionaryBase
39 : {
40 : MOZ_INIT_OUTSIDE_CTOR uint32_t mCount;
41 : MOZ_INIT_OUTSIDE_CTOR nsString mLabel;
42 :
43 : ConsoleCounter();
44 :
45 : explicit inline ConsoleCounter(const FastDictionaryInitializer& )
46 : {
47 : // Do nothing here; this is used by our "Fast" subclass
48 : }
49 :
50 : explicit inline ConsoleCounter(const ConsoleCounter& aOther)
51 : {
52 : *this = aOther;
53 : }
54 :
55 : bool
56 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
57 :
58 : bool
59 : Init(const nsAString& aJSON);
60 :
61 : bool
62 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
63 :
64 : bool
65 : ToJSON(nsAString& aJSON) const;
66 :
67 : void
68 : TraceDictionary(JSTracer* trc);
69 :
70 : ConsoleCounter&
71 : operator=(const ConsoleCounter& aOther);
72 :
73 : private:
74 : static bool
75 : InitIds(JSContext* cx, ConsoleCounterAtoms* atomsCache);
76 : };
77 :
78 : namespace binding_detail {
79 : struct FastConsoleCounter : public ConsoleCounter
80 : {
81 : inline FastConsoleCounter()
82 : : ConsoleCounter(FastDictionaryInitializer())
83 : {
84 : // Doesn't matter what int we pass to the parent constructor
85 : }
86 : };
87 : } // namespace binding_detail
88 :
89 :
90 0 : struct ConsoleCounterError : public DictionaryBase
91 : {
92 : MOZ_INIT_OUTSIDE_CTOR nsString mError;
93 :
94 : ConsoleCounterError();
95 :
96 : explicit inline ConsoleCounterError(const FastDictionaryInitializer& )
97 : {
98 : // Do nothing here; this is used by our "Fast" subclass
99 : }
100 :
101 : explicit inline ConsoleCounterError(const ConsoleCounterError& aOther)
102 : {
103 : *this = aOther;
104 : }
105 :
106 : bool
107 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
108 :
109 : bool
110 : Init(const nsAString& aJSON);
111 :
112 : bool
113 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
114 :
115 : bool
116 : ToJSON(nsAString& aJSON) const;
117 :
118 : void
119 : TraceDictionary(JSTracer* trc);
120 :
121 : ConsoleCounterError&
122 : operator=(const ConsoleCounterError& aOther);
123 :
124 : private:
125 : static bool
126 : InitIds(JSContext* cx, ConsoleCounterErrorAtoms* atomsCache);
127 : };
128 :
129 : namespace binding_detail {
130 : struct FastConsoleCounterError : public ConsoleCounterError
131 : {
132 : inline FastConsoleCounterError()
133 : : ConsoleCounterError(FastDictionaryInitializer())
134 : {
135 : // Doesn't matter what int we pass to the parent constructor
136 : }
137 : };
138 : } // namespace binding_detail
139 :
140 :
141 0 : struct ConsoleProfileEvent : public DictionaryBase
142 : {
143 : MOZ_INIT_OUTSIDE_CTOR nsString mAction;
144 : MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<JS::Value>> mArguments;
145 :
146 : ConsoleProfileEvent();
147 :
148 : explicit inline ConsoleProfileEvent(const FastDictionaryInitializer& )
149 : {
150 : // Do nothing here; this is used by our "Fast" subclass
151 : }
152 :
153 : private:
154 : ConsoleProfileEvent(const ConsoleProfileEvent&) = delete;
155 : ConsoleProfileEvent& operator=(const ConsoleProfileEvent&) = delete;
156 :
157 : static bool
158 : InitIds(JSContext* cx, ConsoleProfileEventAtoms* atomsCache);
159 :
160 : public:
161 : bool
162 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
163 :
164 : bool
165 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
166 :
167 : void
168 : TraceDictionary(JSTracer* trc);
169 : };
170 :
171 : namespace binding_detail {
172 : struct FastConsoleProfileEvent : public ConsoleProfileEvent
173 : {
174 : inline FastConsoleProfileEvent()
175 : : ConsoleProfileEvent(FastDictionaryInitializer())
176 : {
177 : // Doesn't matter what int we pass to the parent constructor
178 : }
179 : };
180 : } // namespace binding_detail
181 :
182 :
183 2 : struct ConsoleStackEntry : public DictionaryBase
184 : {
185 : MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mAsyncCause;
186 : MOZ_INIT_OUTSIDE_CTOR uint32_t mColumnNumber;
187 : MOZ_INIT_OUTSIDE_CTOR nsString mFilename;
188 : MOZ_INIT_OUTSIDE_CTOR nsString mFunctionName;
189 : MOZ_INIT_OUTSIDE_CTOR uint32_t mLanguage;
190 : MOZ_INIT_OUTSIDE_CTOR uint32_t mLineNumber;
191 :
192 : ConsoleStackEntry();
193 :
194 : explicit inline ConsoleStackEntry(const FastDictionaryInitializer& )
195 : {
196 : // Do nothing here; this is used by our "Fast" subclass
197 : }
198 :
199 : explicit inline ConsoleStackEntry(const ConsoleStackEntry& aOther)
200 : {
201 : *this = aOther;
202 : }
203 :
204 : bool
205 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
206 :
207 : bool
208 : Init(const nsAString& aJSON);
209 :
210 : bool
211 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
212 :
213 : bool
214 : ToJSON(nsAString& aJSON) const;
215 :
216 : void
217 : TraceDictionary(JSTracer* trc);
218 :
219 : ConsoleStackEntry&
220 : operator=(const ConsoleStackEntry& aOther);
221 :
222 : private:
223 : static bool
224 : InitIds(JSContext* cx, ConsoleStackEntryAtoms* atomsCache);
225 : };
226 :
227 : namespace binding_detail {
228 : struct FastConsoleStackEntry : public ConsoleStackEntry
229 : {
230 : inline FastConsoleStackEntry()
231 : : ConsoleStackEntry(FastDictionaryInitializer())
232 : {
233 : // Doesn't matter what int we pass to the parent constructor
234 : }
235 : };
236 : } // namespace binding_detail
237 :
238 :
239 0 : struct ConsoleTimerEnd : public DictionaryBase
240 : {
241 : MOZ_INIT_OUTSIDE_CTOR double mDuration;
242 : MOZ_INIT_OUTSIDE_CTOR nsString mName;
243 :
244 : ConsoleTimerEnd();
245 :
246 : explicit inline ConsoleTimerEnd(const FastDictionaryInitializer& )
247 : {
248 : // Do nothing here; this is used by our "Fast" subclass
249 : }
250 :
251 : explicit inline ConsoleTimerEnd(const ConsoleTimerEnd& aOther)
252 : {
253 : *this = aOther;
254 : }
255 :
256 : bool
257 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
258 :
259 : bool
260 : Init(const nsAString& aJSON);
261 :
262 : bool
263 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
264 :
265 : bool
266 : ToJSON(nsAString& aJSON) const;
267 :
268 : void
269 : TraceDictionary(JSTracer* trc);
270 :
271 : ConsoleTimerEnd&
272 : operator=(const ConsoleTimerEnd& aOther);
273 :
274 : private:
275 : static bool
276 : InitIds(JSContext* cx, ConsoleTimerEndAtoms* atomsCache);
277 : };
278 :
279 : namespace binding_detail {
280 : struct FastConsoleTimerEnd : public ConsoleTimerEnd
281 : {
282 : inline FastConsoleTimerEnd()
283 : : ConsoleTimerEnd(FastDictionaryInitializer())
284 : {
285 : // Doesn't matter what int we pass to the parent constructor
286 : }
287 : };
288 : } // namespace binding_detail
289 :
290 :
291 0 : struct ConsoleTimerError : public DictionaryBase
292 : {
293 : MOZ_INIT_OUTSIDE_CTOR nsString mError;
294 : MOZ_INIT_OUTSIDE_CTOR nsString mName;
295 :
296 : ConsoleTimerError();
297 :
298 : explicit inline ConsoleTimerError(const FastDictionaryInitializer& )
299 : {
300 : // Do nothing here; this is used by our "Fast" subclass
301 : }
302 :
303 : explicit inline ConsoleTimerError(const ConsoleTimerError& aOther)
304 : {
305 : *this = aOther;
306 : }
307 :
308 : bool
309 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
310 :
311 : bool
312 : Init(const nsAString& aJSON);
313 :
314 : bool
315 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
316 :
317 : bool
318 : ToJSON(nsAString& aJSON) const;
319 :
320 : void
321 : TraceDictionary(JSTracer* trc);
322 :
323 : ConsoleTimerError&
324 : operator=(const ConsoleTimerError& aOther);
325 :
326 : private:
327 : static bool
328 : InitIds(JSContext* cx, ConsoleTimerErrorAtoms* atomsCache);
329 : };
330 :
331 : namespace binding_detail {
332 : struct FastConsoleTimerError : public ConsoleTimerError
333 : {
334 : inline FastConsoleTimerError()
335 : : ConsoleTimerError(FastDictionaryInitializer())
336 : {
337 : // Doesn't matter what int we pass to the parent constructor
338 : }
339 : };
340 : } // namespace binding_detail
341 :
342 :
343 0 : struct ConsoleTimerStart : public DictionaryBase
344 : {
345 : MOZ_INIT_OUTSIDE_CTOR nsString mName;
346 :
347 : ConsoleTimerStart();
348 :
349 : explicit inline ConsoleTimerStart(const FastDictionaryInitializer& )
350 : {
351 : // Do nothing here; this is used by our "Fast" subclass
352 : }
353 :
354 : explicit inline ConsoleTimerStart(const ConsoleTimerStart& aOther)
355 : {
356 : *this = aOther;
357 : }
358 :
359 : bool
360 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
361 :
362 : bool
363 : Init(const nsAString& aJSON);
364 :
365 : bool
366 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
367 :
368 : bool
369 : ToJSON(nsAString& aJSON) const;
370 :
371 : void
372 : TraceDictionary(JSTracer* trc);
373 :
374 : ConsoleTimerStart&
375 : operator=(const ConsoleTimerStart& aOther);
376 :
377 : private:
378 : static bool
379 : InitIds(JSContext* cx, ConsoleTimerStartAtoms* atomsCache);
380 : };
381 :
382 : namespace binding_detail {
383 : struct FastConsoleTimerStart : public ConsoleTimerStart
384 : {
385 : inline FastConsoleTimerStart()
386 : : ConsoleTimerStart(FastDictionaryInitializer())
387 : {
388 : // Doesn't matter what int we pass to the parent constructor
389 : }
390 : };
391 : } // namespace binding_detail
392 :
393 :
394 : class UnsignedLongLongOrString
395 : {
396 : friend class UnsignedLongLongOrStringArgument;
397 : enum Type
398 : {
399 : eUninitialized,
400 : eUnsignedLongLong,
401 : eString
402 : };
403 :
404 : union Value
405 : {
406 : UnionMember<uint64_t > mUnsignedLongLong;
407 : UnionMember<binding_detail::FakeString > mString;
408 :
409 : };
410 :
411 : Type mType;
412 : Value mValue;
413 :
414 : UnsignedLongLongOrString(const UnsignedLongLongOrString&) = delete;
415 : UnsignedLongLongOrString& operator=(const UnsignedLongLongOrString&) = delete;
416 : public:
417 : explicit inline UnsignedLongLongOrString()
418 : : mType(eUninitialized)
419 : {
420 : }
421 :
422 : inline ~UnsignedLongLongOrString()
423 : {
424 : Uninit();
425 : }
426 :
427 : inline uint64_t&
428 : RawSetAsUnsignedLongLong()
429 : {
430 : if (mType == eUnsignedLongLong) {
431 : return mValue.mUnsignedLongLong.Value();
432 : }
433 : MOZ_ASSERT(mType == eUninitialized);
434 : mType = eUnsignedLongLong;
435 : return mValue.mUnsignedLongLong.SetValue();
436 : }
437 :
438 : inline uint64_t&
439 : SetAsUnsignedLongLong()
440 : {
441 : if (mType == eUnsignedLongLong) {
442 : return mValue.mUnsignedLongLong.Value();
443 : }
444 : Uninit();
445 : mType = eUnsignedLongLong;
446 : return mValue.mUnsignedLongLong.SetValue();
447 : }
448 :
449 : inline bool
450 : IsUnsignedLongLong() const
451 : {
452 : return mType == eUnsignedLongLong;
453 : }
454 :
455 : inline uint64_t&
456 : GetAsUnsignedLongLong()
457 : {
458 : MOZ_ASSERT(IsUnsignedLongLong(), "Wrong type!");
459 : return mValue.mUnsignedLongLong.Value();
460 : }
461 :
462 : inline uint64_t
463 : GetAsUnsignedLongLong() const
464 : {
465 : MOZ_ASSERT(IsUnsignedLongLong(), "Wrong type!");
466 : return mValue.mUnsignedLongLong.Value();
467 : }
468 :
469 : inline binding_detail::FakeString&
470 : RawSetAsString()
471 : {
472 : if (mType == eString) {
473 : return mValue.mString.Value();
474 : }
475 : MOZ_ASSERT(mType == eUninitialized);
476 : mType = eString;
477 : return mValue.mString.SetValue();
478 : }
479 :
480 : inline binding_detail::FakeString&
481 : SetAsString()
482 : {
483 : if (mType == eString) {
484 : return mValue.mString.Value();
485 : }
486 : Uninit();
487 : mType = eString;
488 : return mValue.mString.SetValue();
489 : }
490 :
491 : inline bool
492 : IsString() const
493 : {
494 : return mType == eString;
495 : }
496 :
497 : inline binding_detail::FakeString&
498 : GetAsString()
499 : {
500 : MOZ_ASSERT(IsString(), "Wrong type!");
501 : return mValue.mString.Value();
502 : }
503 :
504 : inline const nsAString&
505 : GetAsString() const
506 : {
507 : MOZ_ASSERT(IsString(), "Wrong type!");
508 : return mValue.mString.Value();
509 : }
510 :
511 : inline void
512 : Uninit()
513 : {
514 : switch (mType) {
515 : case eUninitialized: {
516 : break;
517 : }
518 : case eUnsignedLongLong: {
519 : DestroyUnsignedLongLong();
520 : break;
521 : }
522 : case eString: {
523 : DestroyString();
524 : break;
525 : }
526 : }
527 : }
528 :
529 : bool
530 : ToJSVal(JSContext* cx, JS::Handle<JSObject*> scopeObj, JS::MutableHandle<JS::Value> rval) const;
531 :
532 : private:
533 : inline void
534 : DestroyUnsignedLongLong()
535 : {
536 : MOZ_ASSERT(IsUnsignedLongLong(), "Wrong type!");
537 : mValue.mUnsignedLongLong.Destroy();
538 : mType = eUninitialized;
539 : }
540 :
541 : inline void
542 : DestroyString()
543 : {
544 : MOZ_ASSERT(IsString(), "Wrong type!");
545 : mValue.mString.Destroy();
546 : mType = eUninitialized;
547 : }
548 : };
549 :
550 :
551 : class OwningUnsignedLongLongOrString : public AllOwningUnionBase
552 : {
553 : friend void ImplCycleCollectionUnlink(OwningUnsignedLongLongOrString& aUnion);
554 : enum Type
555 : {
556 : eUninitialized,
557 : eUnsignedLongLong,
558 : eString
559 : };
560 :
561 2 : union Value
562 : {
563 : UnionMember<uint64_t > mUnsignedLongLong;
564 : UnionMember<nsString > mString;
565 :
566 : };
567 :
568 : Type mType;
569 : Value mValue;
570 :
571 : public:
572 2 : explicit inline OwningUnsignedLongLongOrString()
573 2 : : mType(eUninitialized)
574 : {
575 2 : }
576 :
577 : explicit inline OwningUnsignedLongLongOrString(const OwningUnsignedLongLongOrString& aOther)
578 : : mType(eUninitialized)
579 : {
580 : *this = aOther;
581 : }
582 :
583 2 : inline ~OwningUnsignedLongLongOrString()
584 2 : {
585 2 : Uninit();
586 2 : }
587 :
588 : uint64_t&
589 : RawSetAsUnsignedLongLong();
590 :
591 : uint64_t&
592 : SetAsUnsignedLongLong();
593 :
594 : bool
595 : TrySetToUnsignedLongLong(JSContext* cx, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
596 :
597 : inline bool
598 2 : IsUnsignedLongLong() const
599 : {
600 2 : return mType == eUnsignedLongLong;
601 : }
602 :
603 : inline uint64_t&
604 : GetAsUnsignedLongLong()
605 : {
606 : MOZ_ASSERT(IsUnsignedLongLong(), "Wrong type!");
607 : return mValue.mUnsignedLongLong.Value();
608 : }
609 :
610 : inline uint64_t const &
611 0 : GetAsUnsignedLongLong() const
612 : {
613 0 : MOZ_ASSERT(IsUnsignedLongLong(), "Wrong type!");
614 0 : return mValue.mUnsignedLongLong.Value();
615 : }
616 :
617 : nsString&
618 : RawSetAsString();
619 :
620 : nsString&
621 : SetAsString();
622 :
623 : bool
624 : TrySetToString(JSContext* cx, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
625 :
626 : inline void
627 : SetStringData(const nsString::char_type* aData, nsString::size_type aLength)
628 : {
629 : RawSetAsString().Assign(aData, aLength);
630 : }
631 :
632 : inline bool
633 0 : IsString() const
634 : {
635 0 : return mType == eString;
636 : }
637 :
638 : inline nsString&
639 : GetAsString()
640 : {
641 : MOZ_ASSERT(IsString(), "Wrong type!");
642 : return mValue.mString.Value();
643 : }
644 :
645 : inline nsString const &
646 0 : GetAsString() const
647 : {
648 0 : MOZ_ASSERT(IsString(), "Wrong type!");
649 0 : return mValue.mString.Value();
650 : }
651 :
652 : void
653 : Uninit();
654 :
655 : bool
656 : ToJSVal(JSContext* cx, JS::Handle<JSObject*> scopeObj, JS::MutableHandle<JS::Value> rval) const;
657 :
658 : void
659 : TraceUnion(JSTracer* trc);
660 :
661 : OwningUnsignedLongLongOrString&
662 : operator=(const OwningUnsignedLongLongOrString& aOther);
663 :
664 : private:
665 : void
666 : DestroyUnsignedLongLong();
667 :
668 : void
669 : DestroyString();
670 : };
671 :
672 :
673 1 : struct ConsoleEvent : public DictionaryBase
674 : {
675 : MOZ_INIT_OUTSIDE_CTOR Optional<OwningUnsignedLongLongOrString> mID;
676 : MOZ_INIT_OUTSIDE_CTOR nsString mAddonId;
677 : MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<JS::Value>> mArguments;
678 : MOZ_INIT_OUTSIDE_CTOR uint32_t mColumnNumber;
679 : MOZ_INIT_OUTSIDE_CTOR JS::Value mCounter;
680 : MOZ_INIT_OUTSIDE_CTOR nsString mFilename;
681 : MOZ_INIT_OUTSIDE_CTOR nsString mFunctionName;
682 : MOZ_INIT_OUTSIDE_CTOR nsString mGroupName;
683 : MOZ_INIT_OUTSIDE_CTOR Optional<OwningUnsignedLongLongOrString> mInnerID;
684 : MOZ_INIT_OUTSIDE_CTOR nsString mLevel;
685 : MOZ_INIT_OUTSIDE_CTOR uint32_t mLineNumber;
686 : MOZ_INIT_OUTSIDE_CTOR JS::Value mOriginAttributes;
687 : MOZ_INIT_OUTSIDE_CTOR bool mPrivate;
688 : MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mStyles;
689 : MOZ_INIT_OUTSIDE_CTOR double mTimeStamp;
690 : MOZ_INIT_OUTSIDE_CTOR JS::Value mTimer;
691 :
692 : ConsoleEvent();
693 :
694 : explicit inline ConsoleEvent(const FastDictionaryInitializer& )
695 : : mCounter(JS::UndefinedValue()),
696 : mOriginAttributes(JS::UndefinedValue()),
697 : mTimer(JS::UndefinedValue())
698 : {
699 : // Do nothing here; this is used by our "Fast" subclass
700 : }
701 :
702 : private:
703 : ConsoleEvent(const ConsoleEvent&) = delete;
704 : ConsoleEvent& operator=(const ConsoleEvent&) = delete;
705 :
706 : static bool
707 : InitIds(JSContext* cx, ConsoleEventAtoms* atomsCache);
708 :
709 : public:
710 : bool
711 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
712 :
713 : bool
714 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
715 :
716 : void
717 : TraceDictionary(JSTracer* trc);
718 : };
719 :
720 : namespace binding_detail {
721 : struct FastConsoleEvent : public ConsoleEvent
722 : {
723 : inline FastConsoleEvent()
724 : : ConsoleEvent(FastDictionaryInitializer())
725 : {
726 : // Doesn't matter what int we pass to the parent constructor
727 : }
728 : };
729 : } // namespace binding_detail
730 :
731 :
732 : namespace consoleBinding {
733 :
734 : typedef mozilla::dom::Console NativeType;
735 :
736 : JSObject*
737 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
738 :
739 : // We declare this as an array so that retrieving a pointer to this
740 : // binding's property hooks only requires compile/link-time resolvable
741 : // address arithmetic. Declaring it as a pointer instead would require
742 : // doing a run-time load to fetch a pointer to this binding's property
743 : // hooks. And then structures which embedded a pointer to this structure
744 : // would require a run-time load for proper initialization, which would
745 : // then induce static constructors. Lots of static constructors.
746 : extern const NativePropertyHooks sNativePropertyHooks[];
747 :
748 : void
749 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
750 :
751 : JS::Handle<JSObject*>
752 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
753 :
754 : JSObject*
755 : GetConstructorObject(JSContext* aCx);
756 :
757 : } // namespace consoleBinding
758 :
759 :
760 :
761 : } // namespace dom
762 : } // namespace mozilla
763 :
764 : #endif // mozilla_dom_ConsoleBinding_h
|