Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/NetDashboardBinding.h
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM NetDashboard.webidl BY Codegen.py - DO NOT EDIT */
2
3
#ifndef mozilla_dom_NetDashboardBinding_h
4
#define mozilla_dom_NetDashboardBinding_h
5
6
#include "GeckoProfiler.h"
7
#include "js/RootingAPI.h"
8
#include "jspubtd.h"
9
#include "mozilla/ErrorResult.h"
10
#include "mozilla/dom/BindingDeclarations.h"
11
#include "mozilla/dom/Nullable.h"
12
13
namespace mozilla {
14
namespace dom {
15
16
struct ConnStatusDictAtoms;
17
struct DNSCacheDictAtoms;
18
struct DNSLookupDictAtoms;
19
struct DnsCacheEntry;
20
struct DnsCacheEntryAtoms;
21
struct HalfOpenInfoDict;
22
struct HalfOpenInfoDictAtoms;
23
struct HttpConnDictAtoms;
24
struct HttpConnInfo;
25
struct HttpConnInfoAtoms;
26
struct HttpConnectionElement;
27
struct HttpConnectionElementAtoms;
28
struct NativePropertyHooks;
29
class ProtoAndIfaceCache;
30
struct RcwnPerfStats;
31
struct RcwnPerfStatsAtoms;
32
struct RcwnStatusAtoms;
33
struct SocketElement;
34
struct SocketElementAtoms;
35
struct SocketsDictAtoms;
36
struct WebSocketDictAtoms;
37
struct WebSocketElement;
38
struct WebSocketElementAtoms;
39
40
} // namespace dom
41
} // namespace mozilla
42
43
namespace mozilla {
44
namespace dom {
45
46
struct ConnStatusDict : public DictionaryBase
47
{
48
  MOZ_INIT_OUTSIDE_CTOR nsString mStatus;
49
50
  ConnStatusDict();
51
52
  explicit inline ConnStatusDict(const FastDictionaryInitializer& )
53
0
  {
54
0
    // Do nothing here; this is used by our "Fast" subclass
55
0
  }
56
57
  explicit inline ConnStatusDict(const ConnStatusDict& aOther)
58
0
  {
59
0
    *this = aOther;
60
0
  }
61
62
  bool
63
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
64
65
  bool
66
  Init(const nsAString& aJSON);
67
68
  bool
69
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
70
71
  bool
72
  ToJSON(nsAString& aJSON) const;
73
74
  void
75
  TraceDictionary(JSTracer* trc);
76
77
  ConnStatusDict&
78
  operator=(const ConnStatusDict& aOther);
79
80
private:
81
  static bool
82
  InitIds(JSContext* cx, ConnStatusDictAtoms* atomsCache);
83
};
84
85
namespace binding_detail {
86
struct FastConnStatusDict : public ConnStatusDict
87
{
88
  inline FastConnStatusDict()
89
    : ConnStatusDict(FastDictionaryInitializer())
90
0
  {
91
0
    // Doesn't matter what int we pass to the parent constructor
92
0
  }
93
};
94
} // namespace binding_detail
95
96
97
struct DNSLookupDict : public DictionaryBase
98
{
99
  MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mAddress;
100
  MOZ_INIT_OUTSIDE_CTOR bool mAnswer;
101
  MOZ_INIT_OUTSIDE_CTOR nsString mError;
102
103
  DNSLookupDict();
104
105
  explicit inline DNSLookupDict(const FastDictionaryInitializer& )
106
0
  {
107
0
    // Do nothing here; this is used by our "Fast" subclass
108
0
  }
109
110
  explicit inline DNSLookupDict(const DNSLookupDict& aOther)
111
0
  {
112
0
    *this = aOther;
113
0
  }
114
115
  bool
116
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
117
118
  bool
119
  Init(const nsAString& aJSON);
120
121
  bool
122
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
123
124
  bool
125
  ToJSON(nsAString& aJSON) const;
126
127
  void
128
  TraceDictionary(JSTracer* trc);
129
130
  DNSLookupDict&
131
  operator=(const DNSLookupDict& aOther);
132
133
private:
134
  static bool
135
  InitIds(JSContext* cx, DNSLookupDictAtoms* atomsCache);
136
};
137
138
namespace binding_detail {
139
struct FastDNSLookupDict : public DNSLookupDict
140
{
141
  inline FastDNSLookupDict()
142
    : DNSLookupDict(FastDictionaryInitializer())
143
0
  {
144
0
    // Doesn't matter what int we pass to the parent constructor
145
0
  }
146
};
147
} // namespace binding_detail
148
149
150
struct DnsCacheEntry : public DictionaryBase
151
{
152
  MOZ_INIT_OUTSIDE_CTOR double mExpiration;
153
  MOZ_INIT_OUTSIDE_CTOR nsString mFamily;
154
  MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mHostaddr;
155
  MOZ_INIT_OUTSIDE_CTOR nsString mHostname;
156
  MOZ_INIT_OUTSIDE_CTOR bool mTrr;
157
158
  DnsCacheEntry();
159
160
  explicit inline DnsCacheEntry(const FastDictionaryInitializer& )
161
0
  {
162
0
    // Do nothing here; this is used by our "Fast" subclass
163
0
  }
164
165
  explicit inline DnsCacheEntry(const DnsCacheEntry& aOther)
166
0
  {
167
0
    *this = aOther;
168
0
  }
169
170
  bool
171
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
172
173
  bool
174
  Init(const nsAString& aJSON);
175
176
  bool
177
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
178
179
  bool
180
  ToJSON(nsAString& aJSON) const;
181
182
  void
183
  TraceDictionary(JSTracer* trc);
184
185
  DnsCacheEntry&
186
  operator=(const DnsCacheEntry& aOther);
187
188
private:
189
  static bool
190
  InitIds(JSContext* cx, DnsCacheEntryAtoms* atomsCache);
191
};
192
193
namespace binding_detail {
194
struct FastDnsCacheEntry : public DnsCacheEntry
195
{
196
  inline FastDnsCacheEntry()
197
    : DnsCacheEntry(FastDictionaryInitializer())
198
0
  {
199
0
    // Doesn't matter what int we pass to the parent constructor
200
0
  }
201
};
202
} // namespace binding_detail
203
204
205
struct HalfOpenInfoDict : public DictionaryBase
206
{
207
  MOZ_INIT_OUTSIDE_CTOR bool mSpeculative;
208
209
  HalfOpenInfoDict();
210
211
  explicit inline HalfOpenInfoDict(const FastDictionaryInitializer& )
212
0
  {
213
0
    // Do nothing here; this is used by our "Fast" subclass
214
0
  }
215
216
  explicit inline HalfOpenInfoDict(const HalfOpenInfoDict& aOther)
217
0
  {
218
0
    *this = aOther;
219
0
  }
220
221
  bool
222
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
223
224
  bool
225
  Init(const nsAString& aJSON);
226
227
  bool
228
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
229
230
  bool
231
  ToJSON(nsAString& aJSON) const;
232
233
  void
234
  TraceDictionary(JSTracer* trc);
235
236
  HalfOpenInfoDict&
237
  operator=(const HalfOpenInfoDict& aOther);
238
239
private:
240
  static bool
241
  InitIds(JSContext* cx, HalfOpenInfoDictAtoms* atomsCache);
242
};
243
244
namespace binding_detail {
245
struct FastHalfOpenInfoDict : public HalfOpenInfoDict
246
{
247
  inline FastHalfOpenInfoDict()
248
    : HalfOpenInfoDict(FastDictionaryInitializer())
249
0
  {
250
0
    // Doesn't matter what int we pass to the parent constructor
251
0
  }
252
};
253
} // namespace binding_detail
254
255
256
struct HttpConnInfo : public DictionaryBase
257
{
258
  MOZ_INIT_OUTSIDE_CTOR nsString mProtocolVersion;
259
  MOZ_INIT_OUTSIDE_CTOR uint32_t mRtt;
260
  MOZ_INIT_OUTSIDE_CTOR uint32_t mTtl;
261
262
  HttpConnInfo();
263
264
  explicit inline HttpConnInfo(const FastDictionaryInitializer& )
265
0
  {
266
0
    // Do nothing here; this is used by our "Fast" subclass
267
0
  }
268
269
  explicit inline HttpConnInfo(const HttpConnInfo& aOther)
270
0
  {
271
0
    *this = aOther;
272
0
  }
273
274
  bool
275
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
276
277
  bool
278
  Init(const nsAString& aJSON);
279
280
  bool
281
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
282
283
  bool
284
  ToJSON(nsAString& aJSON) const;
285
286
  void
287
  TraceDictionary(JSTracer* trc);
288
289
  HttpConnInfo&
290
  operator=(const HttpConnInfo& aOther);
291
292
private:
293
  static bool
294
  InitIds(JSContext* cx, HttpConnInfoAtoms* atomsCache);
295
};
296
297
namespace binding_detail {
298
struct FastHttpConnInfo : public HttpConnInfo
299
{
300
  inline FastHttpConnInfo()
301
    : HttpConnInfo(FastDictionaryInitializer())
302
0
  {
303
0
    // Doesn't matter what int we pass to the parent constructor
304
0
  }
305
};
306
} // namespace binding_detail
307
308
309
struct RcwnPerfStats : public DictionaryBase
310
{
311
  MOZ_INIT_OUTSIDE_CTOR uint32_t mAvgLong;
312
  MOZ_INIT_OUTSIDE_CTOR uint32_t mAvgShort;
313
  MOZ_INIT_OUTSIDE_CTOR uint32_t mStddevLong;
314
315
  RcwnPerfStats();
316
317
  explicit inline RcwnPerfStats(const FastDictionaryInitializer& )
318
0
  {
319
0
    // Do nothing here; this is used by our "Fast" subclass
320
0
  }
321
322
  explicit inline RcwnPerfStats(const RcwnPerfStats& aOther)
323
0
  {
324
0
    *this = aOther;
325
0
  }
326
327
  bool
328
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
329
330
  bool
331
  Init(const nsAString& aJSON);
332
333
  bool
334
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
335
336
  bool
337
  ToJSON(nsAString& aJSON) const;
338
339
  void
340
  TraceDictionary(JSTracer* trc);
341
342
  RcwnPerfStats&
343
  operator=(const RcwnPerfStats& aOther);
344
345
private:
346
  static bool
347
  InitIds(JSContext* cx, RcwnPerfStatsAtoms* atomsCache);
348
};
349
350
namespace binding_detail {
351
struct FastRcwnPerfStats : public RcwnPerfStats
352
{
353
  inline FastRcwnPerfStats()
354
    : RcwnPerfStats(FastDictionaryInitializer())
355
0
  {
356
0
    // Doesn't matter what int we pass to the parent constructor
357
0
  }
358
};
359
} // namespace binding_detail
360
361
362
struct SocketElement : public DictionaryBase
363
{
364
  MOZ_INIT_OUTSIDE_CTOR bool mActive;
365
  MOZ_INIT_OUTSIDE_CTOR nsString mHost;
366
  MOZ_INIT_OUTSIDE_CTOR uint32_t mPort;
367
  MOZ_INIT_OUTSIDE_CTOR double mReceived;
368
  MOZ_INIT_OUTSIDE_CTOR double mSent;
369
  MOZ_INIT_OUTSIDE_CTOR bool mTcp;
370
371
  SocketElement();
372
373
  explicit inline SocketElement(const FastDictionaryInitializer& )
374
0
  {
375
0
    // Do nothing here; this is used by our "Fast" subclass
376
0
  }
377
378
  explicit inline SocketElement(const SocketElement& aOther)
379
0
  {
380
0
    *this = aOther;
381
0
  }
382
383
  bool
384
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
385
386
  bool
387
  Init(const nsAString& aJSON);
388
389
  bool
390
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
391
392
  bool
393
  ToJSON(nsAString& aJSON) const;
394
395
  void
396
  TraceDictionary(JSTracer* trc);
397
398
  SocketElement&
399
  operator=(const SocketElement& aOther);
400
401
private:
402
  static bool
403
  InitIds(JSContext* cx, SocketElementAtoms* atomsCache);
404
};
405
406
namespace binding_detail {
407
struct FastSocketElement : public SocketElement
408
{
409
  inline FastSocketElement()
410
    : SocketElement(FastDictionaryInitializer())
411
0
  {
412
0
    // Doesn't matter what int we pass to the parent constructor
413
0
  }
414
};
415
} // namespace binding_detail
416
417
418
struct WebSocketElement : public DictionaryBase
419
{
420
  MOZ_INIT_OUTSIDE_CTOR bool mEncrypted;
421
  MOZ_INIT_OUTSIDE_CTOR nsString mHostport;
422
  MOZ_INIT_OUTSIDE_CTOR uint32_t mMsgreceived;
423
  MOZ_INIT_OUTSIDE_CTOR uint32_t mMsgsent;
424
  MOZ_INIT_OUTSIDE_CTOR double mReceivedsize;
425
  MOZ_INIT_OUTSIDE_CTOR double mSentsize;
426
427
  WebSocketElement();
428
429
  explicit inline WebSocketElement(const FastDictionaryInitializer& )
430
0
  {
431
0
    // Do nothing here; this is used by our "Fast" subclass
432
0
  }
433
434
  explicit inline WebSocketElement(const WebSocketElement& aOther)
435
0
  {
436
0
    *this = aOther;
437
0
  }
438
439
  bool
440
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
441
442
  bool
443
  Init(const nsAString& aJSON);
444
445
  bool
446
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
447
448
  bool
449
  ToJSON(nsAString& aJSON) const;
450
451
  void
452
  TraceDictionary(JSTracer* trc);
453
454
  WebSocketElement&
455
  operator=(const WebSocketElement& aOther);
456
457
private:
458
  static bool
459
  InitIds(JSContext* cx, WebSocketElementAtoms* atomsCache);
460
};
461
462
namespace binding_detail {
463
struct FastWebSocketElement : public WebSocketElement
464
{
465
  inline FastWebSocketElement()
466
    : WebSocketElement(FastDictionaryInitializer())
467
0
  {
468
0
    // Doesn't matter what int we pass to the parent constructor
469
0
  }
470
};
471
} // namespace binding_detail
472
473
474
struct DNSCacheDict : public DictionaryBase
475
{
476
  MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<DnsCacheEntry>> mEntries;
477
478
  DNSCacheDict();
479
480
  explicit inline DNSCacheDict(const FastDictionaryInitializer& )
481
0
  {
482
0
    // Do nothing here; this is used by our "Fast" subclass
483
0
  }
484
485
  explicit inline DNSCacheDict(const DNSCacheDict& aOther)
486
0
  {
487
0
    *this = aOther;
488
0
  }
489
490
  bool
491
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
492
493
  bool
494
  Init(const nsAString& aJSON);
495
496
  bool
497
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
498
499
  bool
500
  ToJSON(nsAString& aJSON) const;
501
502
  void
503
  TraceDictionary(JSTracer* trc);
504
505
  DNSCacheDict&
506
  operator=(const DNSCacheDict& aOther);
507
508
private:
509
  static bool
510
  InitIds(JSContext* cx, DNSCacheDictAtoms* atomsCache);
511
};
512
513
namespace binding_detail {
514
struct FastDNSCacheDict : public DNSCacheDict
515
{
516
  inline FastDNSCacheDict()
517
    : DNSCacheDict(FastDictionaryInitializer())
518
0
  {
519
0
    // Doesn't matter what int we pass to the parent constructor
520
0
  }
521
};
522
} // namespace binding_detail
523
524
525
struct HttpConnectionElement : public DictionaryBase
526
{
527
  MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<HttpConnInfo>> mActive;
528
  MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<HalfOpenInfoDict>> mHalfOpens;
529
  MOZ_INIT_OUTSIDE_CTOR nsString mHost;
530
  MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<HttpConnInfo>> mIdle;
531
  MOZ_INIT_OUTSIDE_CTOR uint32_t mPort;
532
  MOZ_INIT_OUTSIDE_CTOR bool mSpdy;
533
  MOZ_INIT_OUTSIDE_CTOR bool mSsl;
534
535
  HttpConnectionElement();
536
537
  explicit inline HttpConnectionElement(const FastDictionaryInitializer& )
538
0
  {
539
0
    // Do nothing here; this is used by our "Fast" subclass
540
0
  }
541
542
  explicit inline HttpConnectionElement(const HttpConnectionElement& aOther)
543
0
  {
544
0
    *this = aOther;
545
0
  }
546
547
  bool
548
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
549
550
  bool
551
  Init(const nsAString& aJSON);
552
553
  bool
554
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
555
556
  bool
557
  ToJSON(nsAString& aJSON) const;
558
559
  void
560
  TraceDictionary(JSTracer* trc);
561
562
  HttpConnectionElement&
563
  operator=(const HttpConnectionElement& aOther);
564
565
private:
566
  static bool
567
  InitIds(JSContext* cx, HttpConnectionElementAtoms* atomsCache);
568
};
569
570
namespace binding_detail {
571
struct FastHttpConnectionElement : public HttpConnectionElement
572
{
573
  inline FastHttpConnectionElement()
574
    : HttpConnectionElement(FastDictionaryInitializer())
575
0
  {
576
0
    // Doesn't matter what int we pass to the parent constructor
577
0
  }
578
};
579
} // namespace binding_detail
580
581
582
struct RcwnStatus : public DictionaryBase
583
{
584
  MOZ_INIT_OUTSIDE_CTOR uint32_t mCacheNotSlowCount;
585
  MOZ_INIT_OUTSIDE_CTOR uint32_t mCacheSlowCount;
586
  MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<RcwnPerfStats>> mPerfStats;
587
  MOZ_INIT_OUTSIDE_CTOR uint32_t mRcwnCacheWonCount;
588
  MOZ_INIT_OUTSIDE_CTOR uint32_t mRcwnNetWonCount;
589
  MOZ_INIT_OUTSIDE_CTOR uint32_t mTotalNetworkRequests;
590
591
  RcwnStatus();
592
593
  explicit inline RcwnStatus(const FastDictionaryInitializer& )
594
0
  {
595
0
    // Do nothing here; this is used by our "Fast" subclass
596
0
  }
597
598
  explicit inline RcwnStatus(const RcwnStatus& aOther)
599
0
  {
600
0
    *this = aOther;
601
0
  }
602
603
  bool
604
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
605
606
  bool
607
  Init(const nsAString& aJSON);
608
609
  bool
610
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
611
612
  bool
613
  ToJSON(nsAString& aJSON) const;
614
615
  void
616
  TraceDictionary(JSTracer* trc);
617
618
  RcwnStatus&
619
  operator=(const RcwnStatus& aOther);
620
621
private:
622
  static bool
623
  InitIds(JSContext* cx, RcwnStatusAtoms* atomsCache);
624
};
625
626
namespace binding_detail {
627
struct FastRcwnStatus : public RcwnStatus
628
{
629
  inline FastRcwnStatus()
630
    : RcwnStatus(FastDictionaryInitializer())
631
0
  {
632
0
    // Doesn't matter what int we pass to the parent constructor
633
0
  }
634
};
635
} // namespace binding_detail
636
637
638
struct SocketsDict : public DictionaryBase
639
{
640
  MOZ_INIT_OUTSIDE_CTOR double mReceived;
641
  MOZ_INIT_OUTSIDE_CTOR double mSent;
642
  MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<SocketElement>> mSockets;
643
644
  SocketsDict();
645
646
  explicit inline SocketsDict(const FastDictionaryInitializer& )
647
0
  {
648
0
    // Do nothing here; this is used by our "Fast" subclass
649
0
  }
650
651
  explicit inline SocketsDict(const SocketsDict& aOther)
652
0
  {
653
0
    *this = aOther;
654
0
  }
655
656
  bool
657
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
658
659
  bool
660
  Init(const nsAString& aJSON);
661
662
  bool
663
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
664
665
  bool
666
  ToJSON(nsAString& aJSON) const;
667
668
  void
669
  TraceDictionary(JSTracer* trc);
670
671
  SocketsDict&
672
  operator=(const SocketsDict& aOther);
673
674
private:
675
  static bool
676
  InitIds(JSContext* cx, SocketsDictAtoms* atomsCache);
677
};
678
679
namespace binding_detail {
680
struct FastSocketsDict : public SocketsDict
681
{
682
  inline FastSocketsDict()
683
    : SocketsDict(FastDictionaryInitializer())
684
0
  {
685
0
    // Doesn't matter what int we pass to the parent constructor
686
0
  }
687
};
688
} // namespace binding_detail
689
690
691
struct WebSocketDict : public DictionaryBase
692
{
693
  MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<WebSocketElement>> mWebsockets;
694
695
  WebSocketDict();
696
697
  explicit inline WebSocketDict(const FastDictionaryInitializer& )
698
0
  {
699
0
    // Do nothing here; this is used by our "Fast" subclass
700
0
  }
701
702
  explicit inline WebSocketDict(const WebSocketDict& aOther)
703
0
  {
704
0
    *this = aOther;
705
0
  }
706
707
  bool
708
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
709
710
  bool
711
  Init(const nsAString& aJSON);
712
713
  bool
714
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
715
716
  bool
717
  ToJSON(nsAString& aJSON) const;
718
719
  void
720
  TraceDictionary(JSTracer* trc);
721
722
  WebSocketDict&
723
  operator=(const WebSocketDict& aOther);
724
725
private:
726
  static bool
727
  InitIds(JSContext* cx, WebSocketDictAtoms* atomsCache);
728
};
729
730
namespace binding_detail {
731
struct FastWebSocketDict : public WebSocketDict
732
{
733
  inline FastWebSocketDict()
734
    : WebSocketDict(FastDictionaryInitializer())
735
0
  {
736
0
    // Doesn't matter what int we pass to the parent constructor
737
0
  }
738
};
739
} // namespace binding_detail
740
741
742
struct HttpConnDict : public DictionaryBase
743
{
744
  MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<HttpConnectionElement>> mConnections;
745
746
  HttpConnDict();
747
748
  explicit inline HttpConnDict(const FastDictionaryInitializer& )
749
0
  {
750
0
    // Do nothing here; this is used by our "Fast" subclass
751
0
  }
752
753
  explicit inline HttpConnDict(const HttpConnDict& aOther)
754
0
  {
755
0
    *this = aOther;
756
0
  }
757
758
  bool
759
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
760
761
  bool
762
  Init(const nsAString& aJSON);
763
764
  bool
765
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
766
767
  bool
768
  ToJSON(nsAString& aJSON) const;
769
770
  void
771
  TraceDictionary(JSTracer* trc);
772
773
  HttpConnDict&
774
  operator=(const HttpConnDict& aOther);
775
776
private:
777
  static bool
778
  InitIds(JSContext* cx, HttpConnDictAtoms* atomsCache);
779
};
780
781
namespace binding_detail {
782
struct FastHttpConnDict : public HttpConnDict
783
{
784
  inline FastHttpConnDict()
785
    : HttpConnDict(FastDictionaryInitializer())
786
0
  {
787
0
    // Doesn't matter what int we pass to the parent constructor
788
0
  }
789
};
790
} // namespace binding_detail
791
792
793
} // namespace dom
794
} // namespace mozilla
795
796
#endif // mozilla_dom_NetDashboardBinding_h