Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dom/bindings/PerformanceTimingBinding.cpp
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM PerformanceTiming.webidl BY Codegen.py - DO NOT EDIT */
2
3
#include "PerformanceTimingBinding.h"
4
#include "WrapperFactory.h"
5
#include "mozilla/OwningNonNull.h"
6
#include "mozilla/Preferences.h"
7
#include "mozilla/dom/BindingUtils.h"
8
#include "mozilla/dom/DOMJSClass.h"
9
#include "mozilla/dom/NonRefcountedDOMObject.h"
10
#include "mozilla/dom/PerformanceTiming.h"
11
#include "mozilla/dom/PrimitiveConversions.h"
12
#include "mozilla/dom/XrayExpandoClass.h"
13
14
namespace mozilla {
15
namespace dom {
16
17
namespace binding_detail {}; // Just to make sure it's known as a namespace
18
using namespace mozilla::dom::binding_detail;
19
20
21
namespace PerformanceTiming_Binding {
22
23
MOZ_CAN_RUN_SCRIPT static bool
24
get_navigationStart(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
25
0
{
26
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.navigationStart", DOM, cx);
27
0
28
0
  uint64_t result(self->NavigationStart());
29
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
30
0
  args.rval().set(JS_NumberValue(double(result)));
31
0
  return true;
32
0
}
33
34
static const JSJitInfo navigationStart_getterinfo = {
35
  { (JSJitGetterOp)get_navigationStart },
36
  { prototypes::id::PerformanceTiming },
37
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
38
  JSJitInfo::Getter,
39
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
40
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
41
  true,  /* isInfallible. False in setters. */
42
  false,  /* isMovable.  Not relevant for setters. */
43
  false, /* isEliminatable.  Not relevant for setters. */
44
  false, /* isAlwaysInSlot.  Only relevant for getters. */
45
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
46
  false,  /* isTypedMethod.  Only relevant for methods. */
47
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
48
};
49
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
50
static_assert(0 < 1, "There is no slot for us");
51
52
MOZ_CAN_RUN_SCRIPT static bool
53
get_unloadEventStart(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
54
0
{
55
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.unloadEventStart", DOM, cx);
56
0
57
0
  uint64_t result(self->UnloadEventStart());
58
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
59
0
  args.rval().set(JS_NumberValue(double(result)));
60
0
  return true;
61
0
}
62
63
static const JSJitInfo unloadEventStart_getterinfo = {
64
  { (JSJitGetterOp)get_unloadEventStart },
65
  { prototypes::id::PerformanceTiming },
66
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
67
  JSJitInfo::Getter,
68
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
69
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
70
  true,  /* isInfallible. False in setters. */
71
  false,  /* isMovable.  Not relevant for setters. */
72
  false, /* isEliminatable.  Not relevant for setters. */
73
  false, /* isAlwaysInSlot.  Only relevant for getters. */
74
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
75
  false,  /* isTypedMethod.  Only relevant for methods. */
76
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
77
};
78
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
79
static_assert(0 < 1, "There is no slot for us");
80
81
MOZ_CAN_RUN_SCRIPT static bool
82
get_unloadEventEnd(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
83
0
{
84
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.unloadEventEnd", DOM, cx);
85
0
86
0
  uint64_t result(self->UnloadEventEnd());
87
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
88
0
  args.rval().set(JS_NumberValue(double(result)));
89
0
  return true;
90
0
}
91
92
static const JSJitInfo unloadEventEnd_getterinfo = {
93
  { (JSJitGetterOp)get_unloadEventEnd },
94
  { prototypes::id::PerformanceTiming },
95
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
96
  JSJitInfo::Getter,
97
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
98
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
99
  true,  /* isInfallible. False in setters. */
100
  false,  /* isMovable.  Not relevant for setters. */
101
  false, /* isEliminatable.  Not relevant for setters. */
102
  false, /* isAlwaysInSlot.  Only relevant for getters. */
103
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
104
  false,  /* isTypedMethod.  Only relevant for methods. */
105
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
106
};
107
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
108
static_assert(0 < 1, "There is no slot for us");
109
110
MOZ_CAN_RUN_SCRIPT static bool
111
get_redirectStart(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
112
0
{
113
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.redirectStart", DOM, cx);
114
0
115
0
  uint64_t result(self->RedirectStart());
116
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
117
0
  args.rval().set(JS_NumberValue(double(result)));
118
0
  return true;
119
0
}
120
121
static const JSJitInfo redirectStart_getterinfo = {
122
  { (JSJitGetterOp)get_redirectStart },
123
  { prototypes::id::PerformanceTiming },
124
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
125
  JSJitInfo::Getter,
126
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
127
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
128
  true,  /* isInfallible. False in setters. */
129
  false,  /* isMovable.  Not relevant for setters. */
130
  false, /* isEliminatable.  Not relevant for setters. */
131
  false, /* isAlwaysInSlot.  Only relevant for getters. */
132
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
133
  false,  /* isTypedMethod.  Only relevant for methods. */
134
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
135
};
136
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
137
static_assert(0 < 1, "There is no slot for us");
138
139
MOZ_CAN_RUN_SCRIPT static bool
140
get_redirectEnd(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
141
0
{
142
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.redirectEnd", DOM, cx);
143
0
144
0
  uint64_t result(self->RedirectEnd());
145
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
146
0
  args.rval().set(JS_NumberValue(double(result)));
147
0
  return true;
148
0
}
149
150
static const JSJitInfo redirectEnd_getterinfo = {
151
  { (JSJitGetterOp)get_redirectEnd },
152
  { prototypes::id::PerformanceTiming },
153
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
154
  JSJitInfo::Getter,
155
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
156
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
157
  true,  /* isInfallible. False in setters. */
158
  false,  /* isMovable.  Not relevant for setters. */
159
  false, /* isEliminatable.  Not relevant for setters. */
160
  false, /* isAlwaysInSlot.  Only relevant for getters. */
161
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
162
  false,  /* isTypedMethod.  Only relevant for methods. */
163
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
164
};
165
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
166
static_assert(0 < 1, "There is no slot for us");
167
168
MOZ_CAN_RUN_SCRIPT static bool
169
get_fetchStart(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
170
0
{
171
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.fetchStart", DOM, cx);
172
0
173
0
  uint64_t result(self->FetchStart());
174
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
175
0
  args.rval().set(JS_NumberValue(double(result)));
176
0
  return true;
177
0
}
178
179
static const JSJitInfo fetchStart_getterinfo = {
180
  { (JSJitGetterOp)get_fetchStart },
181
  { prototypes::id::PerformanceTiming },
182
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
183
  JSJitInfo::Getter,
184
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
185
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
186
  true,  /* isInfallible. False in setters. */
187
  false,  /* isMovable.  Not relevant for setters. */
188
  false, /* isEliminatable.  Not relevant for setters. */
189
  false, /* isAlwaysInSlot.  Only relevant for getters. */
190
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
191
  false,  /* isTypedMethod.  Only relevant for methods. */
192
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
193
};
194
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
195
static_assert(0 < 1, "There is no slot for us");
196
197
MOZ_CAN_RUN_SCRIPT static bool
198
get_domainLookupStart(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
199
0
{
200
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.domainLookupStart", DOM, cx);
201
0
202
0
  uint64_t result(self->DomainLookupStart());
203
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
204
0
  args.rval().set(JS_NumberValue(double(result)));
205
0
  return true;
206
0
}
207
208
static const JSJitInfo domainLookupStart_getterinfo = {
209
  { (JSJitGetterOp)get_domainLookupStart },
210
  { prototypes::id::PerformanceTiming },
211
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
212
  JSJitInfo::Getter,
213
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
214
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
215
  true,  /* isInfallible. False in setters. */
216
  false,  /* isMovable.  Not relevant for setters. */
217
  false, /* isEliminatable.  Not relevant for setters. */
218
  false, /* isAlwaysInSlot.  Only relevant for getters. */
219
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
220
  false,  /* isTypedMethod.  Only relevant for methods. */
221
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
222
};
223
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
224
static_assert(0 < 1, "There is no slot for us");
225
226
MOZ_CAN_RUN_SCRIPT static bool
227
get_domainLookupEnd(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
228
0
{
229
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.domainLookupEnd", DOM, cx);
230
0
231
0
  uint64_t result(self->DomainLookupEnd());
232
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
233
0
  args.rval().set(JS_NumberValue(double(result)));
234
0
  return true;
235
0
}
236
237
static const JSJitInfo domainLookupEnd_getterinfo = {
238
  { (JSJitGetterOp)get_domainLookupEnd },
239
  { prototypes::id::PerformanceTiming },
240
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
241
  JSJitInfo::Getter,
242
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
243
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
244
  true,  /* isInfallible. False in setters. */
245
  false,  /* isMovable.  Not relevant for setters. */
246
  false, /* isEliminatable.  Not relevant for setters. */
247
  false, /* isAlwaysInSlot.  Only relevant for getters. */
248
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
249
  false,  /* isTypedMethod.  Only relevant for methods. */
250
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
251
};
252
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
253
static_assert(0 < 1, "There is no slot for us");
254
255
MOZ_CAN_RUN_SCRIPT static bool
256
get_connectStart(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
257
0
{
258
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.connectStart", DOM, cx);
259
0
260
0
  uint64_t result(self->ConnectStart());
261
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
262
0
  args.rval().set(JS_NumberValue(double(result)));
263
0
  return true;
264
0
}
265
266
static const JSJitInfo connectStart_getterinfo = {
267
  { (JSJitGetterOp)get_connectStart },
268
  { prototypes::id::PerformanceTiming },
269
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
270
  JSJitInfo::Getter,
271
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
272
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
273
  true,  /* isInfallible. False in setters. */
274
  false,  /* isMovable.  Not relevant for setters. */
275
  false, /* isEliminatable.  Not relevant for setters. */
276
  false, /* isAlwaysInSlot.  Only relevant for getters. */
277
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
278
  false,  /* isTypedMethod.  Only relevant for methods. */
279
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
280
};
281
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
282
static_assert(0 < 1, "There is no slot for us");
283
284
MOZ_CAN_RUN_SCRIPT static bool
285
get_connectEnd(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
286
0
{
287
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.connectEnd", DOM, cx);
288
0
289
0
  uint64_t result(self->ConnectEnd());
290
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
291
0
  args.rval().set(JS_NumberValue(double(result)));
292
0
  return true;
293
0
}
294
295
static const JSJitInfo connectEnd_getterinfo = {
296
  { (JSJitGetterOp)get_connectEnd },
297
  { prototypes::id::PerformanceTiming },
298
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
299
  JSJitInfo::Getter,
300
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
301
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
302
  true,  /* isInfallible. False in setters. */
303
  false,  /* isMovable.  Not relevant for setters. */
304
  false, /* isEliminatable.  Not relevant for setters. */
305
  false, /* isAlwaysInSlot.  Only relevant for getters. */
306
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
307
  false,  /* isTypedMethod.  Only relevant for methods. */
308
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
309
};
310
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
311
static_assert(0 < 1, "There is no slot for us");
312
313
MOZ_CAN_RUN_SCRIPT static bool
314
get_secureConnectionStart(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
315
0
{
316
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.secureConnectionStart", DOM, cx);
317
0
318
0
  uint64_t result(self->SecureConnectionStart());
319
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
320
0
  args.rval().set(JS_NumberValue(double(result)));
321
0
  return true;
322
0
}
323
324
static const JSJitInfo secureConnectionStart_getterinfo = {
325
  { (JSJitGetterOp)get_secureConnectionStart },
326
  { prototypes::id::PerformanceTiming },
327
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
328
  JSJitInfo::Getter,
329
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
330
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
331
  true,  /* isInfallible. False in setters. */
332
  false,  /* isMovable.  Not relevant for setters. */
333
  false, /* isEliminatable.  Not relevant for setters. */
334
  false, /* isAlwaysInSlot.  Only relevant for getters. */
335
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
336
  false,  /* isTypedMethod.  Only relevant for methods. */
337
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
338
};
339
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
340
static_assert(0 < 1, "There is no slot for us");
341
342
MOZ_CAN_RUN_SCRIPT static bool
343
get_requestStart(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
344
0
{
345
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.requestStart", DOM, cx);
346
0
347
0
  uint64_t result(self->RequestStart());
348
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
349
0
  args.rval().set(JS_NumberValue(double(result)));
350
0
  return true;
351
0
}
352
353
static const JSJitInfo requestStart_getterinfo = {
354
  { (JSJitGetterOp)get_requestStart },
355
  { prototypes::id::PerformanceTiming },
356
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
357
  JSJitInfo::Getter,
358
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
359
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
360
  true,  /* isInfallible. False in setters. */
361
  false,  /* isMovable.  Not relevant for setters. */
362
  false, /* isEliminatable.  Not relevant for setters. */
363
  false, /* isAlwaysInSlot.  Only relevant for getters. */
364
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
365
  false,  /* isTypedMethod.  Only relevant for methods. */
366
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
367
};
368
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
369
static_assert(0 < 1, "There is no slot for us");
370
371
MOZ_CAN_RUN_SCRIPT static bool
372
get_responseStart(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
373
0
{
374
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.responseStart", DOM, cx);
375
0
376
0
  uint64_t result(self->ResponseStart());
377
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
378
0
  args.rval().set(JS_NumberValue(double(result)));
379
0
  return true;
380
0
}
381
382
static const JSJitInfo responseStart_getterinfo = {
383
  { (JSJitGetterOp)get_responseStart },
384
  { prototypes::id::PerformanceTiming },
385
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
386
  JSJitInfo::Getter,
387
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
388
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
389
  true,  /* isInfallible. False in setters. */
390
  false,  /* isMovable.  Not relevant for setters. */
391
  false, /* isEliminatable.  Not relevant for setters. */
392
  false, /* isAlwaysInSlot.  Only relevant for getters. */
393
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
394
  false,  /* isTypedMethod.  Only relevant for methods. */
395
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
396
};
397
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
398
static_assert(0 < 1, "There is no slot for us");
399
400
MOZ_CAN_RUN_SCRIPT static bool
401
get_responseEnd(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
402
0
{
403
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.responseEnd", DOM, cx);
404
0
405
0
  uint64_t result(self->ResponseEnd());
406
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
407
0
  args.rval().set(JS_NumberValue(double(result)));
408
0
  return true;
409
0
}
410
411
static const JSJitInfo responseEnd_getterinfo = {
412
  { (JSJitGetterOp)get_responseEnd },
413
  { prototypes::id::PerformanceTiming },
414
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
415
  JSJitInfo::Getter,
416
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
417
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
418
  true,  /* isInfallible. False in setters. */
419
  false,  /* isMovable.  Not relevant for setters. */
420
  false, /* isEliminatable.  Not relevant for setters. */
421
  false, /* isAlwaysInSlot.  Only relevant for getters. */
422
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
423
  false,  /* isTypedMethod.  Only relevant for methods. */
424
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
425
};
426
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
427
static_assert(0 < 1, "There is no slot for us");
428
429
MOZ_CAN_RUN_SCRIPT static bool
430
get_domLoading(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
431
0
{
432
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.domLoading", DOM, cx);
433
0
434
0
  uint64_t result(self->DomLoading());
435
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
436
0
  args.rval().set(JS_NumberValue(double(result)));
437
0
  return true;
438
0
}
439
440
static const JSJitInfo domLoading_getterinfo = {
441
  { (JSJitGetterOp)get_domLoading },
442
  { prototypes::id::PerformanceTiming },
443
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
444
  JSJitInfo::Getter,
445
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
446
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
447
  true,  /* isInfallible. False in setters. */
448
  false,  /* isMovable.  Not relevant for setters. */
449
  false, /* isEliminatable.  Not relevant for setters. */
450
  false, /* isAlwaysInSlot.  Only relevant for getters. */
451
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
452
  false,  /* isTypedMethod.  Only relevant for methods. */
453
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
454
};
455
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
456
static_assert(0 < 1, "There is no slot for us");
457
458
MOZ_CAN_RUN_SCRIPT static bool
459
get_domInteractive(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
460
0
{
461
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.domInteractive", DOM, cx);
462
0
463
0
  uint64_t result(self->DomInteractive());
464
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
465
0
  args.rval().set(JS_NumberValue(double(result)));
466
0
  return true;
467
0
}
468
469
static const JSJitInfo domInteractive_getterinfo = {
470
  { (JSJitGetterOp)get_domInteractive },
471
  { prototypes::id::PerformanceTiming },
472
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
473
  JSJitInfo::Getter,
474
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
475
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
476
  true,  /* isInfallible. False in setters. */
477
  false,  /* isMovable.  Not relevant for setters. */
478
  false, /* isEliminatable.  Not relevant for setters. */
479
  false, /* isAlwaysInSlot.  Only relevant for getters. */
480
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
481
  false,  /* isTypedMethod.  Only relevant for methods. */
482
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
483
};
484
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
485
static_assert(0 < 1, "There is no slot for us");
486
487
MOZ_CAN_RUN_SCRIPT static bool
488
get_domContentLoadedEventStart(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
489
0
{
490
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.domContentLoadedEventStart", DOM, cx);
491
0
492
0
  uint64_t result(self->DomContentLoadedEventStart());
493
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
494
0
  args.rval().set(JS_NumberValue(double(result)));
495
0
  return true;
496
0
}
497
498
static const JSJitInfo domContentLoadedEventStart_getterinfo = {
499
  { (JSJitGetterOp)get_domContentLoadedEventStart },
500
  { prototypes::id::PerformanceTiming },
501
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
502
  JSJitInfo::Getter,
503
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
504
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
505
  true,  /* isInfallible. False in setters. */
506
  false,  /* isMovable.  Not relevant for setters. */
507
  false, /* isEliminatable.  Not relevant for setters. */
508
  false, /* isAlwaysInSlot.  Only relevant for getters. */
509
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
510
  false,  /* isTypedMethod.  Only relevant for methods. */
511
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
512
};
513
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
514
static_assert(0 < 1, "There is no slot for us");
515
516
MOZ_CAN_RUN_SCRIPT static bool
517
get_domContentLoadedEventEnd(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
518
0
{
519
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.domContentLoadedEventEnd", DOM, cx);
520
0
521
0
  uint64_t result(self->DomContentLoadedEventEnd());
522
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
523
0
  args.rval().set(JS_NumberValue(double(result)));
524
0
  return true;
525
0
}
526
527
static const JSJitInfo domContentLoadedEventEnd_getterinfo = {
528
  { (JSJitGetterOp)get_domContentLoadedEventEnd },
529
  { prototypes::id::PerformanceTiming },
530
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
531
  JSJitInfo::Getter,
532
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
533
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
534
  true,  /* isInfallible. False in setters. */
535
  false,  /* isMovable.  Not relevant for setters. */
536
  false, /* isEliminatable.  Not relevant for setters. */
537
  false, /* isAlwaysInSlot.  Only relevant for getters. */
538
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
539
  false,  /* isTypedMethod.  Only relevant for methods. */
540
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
541
};
542
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
543
static_assert(0 < 1, "There is no slot for us");
544
545
MOZ_CAN_RUN_SCRIPT static bool
546
get_domComplete(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
547
0
{
548
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.domComplete", DOM, cx);
549
0
550
0
  uint64_t result(self->DomComplete());
551
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
552
0
  args.rval().set(JS_NumberValue(double(result)));
553
0
  return true;
554
0
}
555
556
static const JSJitInfo domComplete_getterinfo = {
557
  { (JSJitGetterOp)get_domComplete },
558
  { prototypes::id::PerformanceTiming },
559
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
560
  JSJitInfo::Getter,
561
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
562
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
563
  true,  /* isInfallible. False in setters. */
564
  false,  /* isMovable.  Not relevant for setters. */
565
  false, /* isEliminatable.  Not relevant for setters. */
566
  false, /* isAlwaysInSlot.  Only relevant for getters. */
567
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
568
  false,  /* isTypedMethod.  Only relevant for methods. */
569
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
570
};
571
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
572
static_assert(0 < 1, "There is no slot for us");
573
574
MOZ_CAN_RUN_SCRIPT static bool
575
get_loadEventStart(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
576
0
{
577
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.loadEventStart", DOM, cx);
578
0
579
0
  uint64_t result(self->LoadEventStart());
580
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
581
0
  args.rval().set(JS_NumberValue(double(result)));
582
0
  return true;
583
0
}
584
585
static const JSJitInfo loadEventStart_getterinfo = {
586
  { (JSJitGetterOp)get_loadEventStart },
587
  { prototypes::id::PerformanceTiming },
588
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
589
  JSJitInfo::Getter,
590
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
591
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
592
  true,  /* isInfallible. False in setters. */
593
  false,  /* isMovable.  Not relevant for setters. */
594
  false, /* isEliminatable.  Not relevant for setters. */
595
  false, /* isAlwaysInSlot.  Only relevant for getters. */
596
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
597
  false,  /* isTypedMethod.  Only relevant for methods. */
598
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
599
};
600
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
601
static_assert(0 < 1, "There is no slot for us");
602
603
MOZ_CAN_RUN_SCRIPT static bool
604
get_loadEventEnd(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
605
0
{
606
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.loadEventEnd", DOM, cx);
607
0
608
0
  uint64_t result(self->LoadEventEnd());
609
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
610
0
  args.rval().set(JS_NumberValue(double(result)));
611
0
  return true;
612
0
}
613
614
static const JSJitInfo loadEventEnd_getterinfo = {
615
  { (JSJitGetterOp)get_loadEventEnd },
616
  { prototypes::id::PerformanceTiming },
617
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
618
  JSJitInfo::Getter,
619
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
620
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
621
  true,  /* isInfallible. False in setters. */
622
  false,  /* isMovable.  Not relevant for setters. */
623
  false, /* isEliminatable.  Not relevant for setters. */
624
  false, /* isAlwaysInSlot.  Only relevant for getters. */
625
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
626
  false,  /* isTypedMethod.  Only relevant for methods. */
627
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
628
};
629
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
630
static_assert(0 < 1, "There is no slot for us");
631
632
MOZ_CAN_RUN_SCRIPT static bool
633
get_timeToNonBlankPaint(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
634
0
{
635
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.timeToNonBlankPaint", DOM, cx);
636
0
637
0
  uint64_t result(self->TimeToNonBlankPaint());
638
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
639
0
  args.rval().set(JS_NumberValue(double(result)));
640
0
  return true;
641
0
}
642
643
static const JSJitInfo timeToNonBlankPaint_getterinfo = {
644
  { (JSJitGetterOp)get_timeToNonBlankPaint },
645
  { prototypes::id::PerformanceTiming },
646
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
647
  JSJitInfo::Getter,
648
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
649
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
650
  true,  /* isInfallible. False in setters. */
651
  false,  /* isMovable.  Not relevant for setters. */
652
  false, /* isEliminatable.  Not relevant for setters. */
653
  false, /* isAlwaysInSlot.  Only relevant for getters. */
654
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
655
  false,  /* isTypedMethod.  Only relevant for methods. */
656
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
657
};
658
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
659
static_assert(0 < 1, "There is no slot for us");
660
661
MOZ_CAN_RUN_SCRIPT static bool
662
get_timeToDOMContentFlushed(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JSJitGetterCallArgs args)
663
0
{
664
0
  AUTO_PROFILER_LABEL_FAST("get PerformanceTiming.timeToDOMContentFlushed", DOM, cx);
665
0
666
0
  uint64_t result(self->TimeToDOMContentFlushed());
667
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
668
0
  args.rval().set(JS_NumberValue(double(result)));
669
0
  return true;
670
0
}
671
672
static const JSJitInfo timeToDOMContentFlushed_getterinfo = {
673
  { (JSJitGetterOp)get_timeToDOMContentFlushed },
674
  { prototypes::id::PerformanceTiming },
675
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
676
  JSJitInfo::Getter,
677
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
678
  JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
679
  true,  /* isInfallible. False in setters. */
680
  false,  /* isMovable.  Not relevant for setters. */
681
  false, /* isEliminatable.  Not relevant for setters. */
682
  false, /* isAlwaysInSlot.  Only relevant for getters. */
683
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
684
  false,  /* isTypedMethod.  Only relevant for methods. */
685
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
686
};
687
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
688
static_assert(0 < 1, "There is no slot for us");
689
690
MOZ_CAN_RUN_SCRIPT static bool
691
toJSON(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, const JSJitMethodCallArgs& args)
692
0
{
693
0
  AUTO_PROFILER_LABEL_FAST("PerformanceTiming.toJSON", DOM, cx);
694
0
695
0
  JS::Rooted<JSObject*> result(cx, JS_NewPlainObject(cx));
696
0
  if (!result) {
697
0
    return false;
698
0
  }
699
0
  if (!PerformanceTiming_Binding::CollectJSONAttributes(cx, obj, self, result)) {
700
0
    return false;
701
0
  }
702
0
  args.rval().setObject(*result);
703
0
  return true;
704
0
}
705
706
static const JSJitInfo toJSON_methodinfo = {
707
  { (JSJitGetterOp)toJSON },
708
  { prototypes::id::PerformanceTiming },
709
  { PrototypeTraits<prototypes::id::PerformanceTiming>::Depth },
710
  JSJitInfo::Method,
711
  JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
712
  JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
713
  false,  /* isInfallible. False in setters. */
714
  false,  /* isMovable.  Not relevant for setters. */
715
  false, /* isEliminatable.  Not relevant for setters. */
716
  false, /* isAlwaysInSlot.  Only relevant for getters. */
717
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
718
  false,  /* isTypedMethod.  Only relevant for methods. */
719
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
720
};
721
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
722
static_assert(0 < 1, "There is no slot for us");
723
724
static bool
725
_addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
726
0
{
727
0
  mozilla::dom::PerformanceTiming* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::PerformanceTiming>(obj);
728
0
  // We don't want to preserve if we don't have a wrapper, and we
729
0
  // obviously can't preserve if we're not initialized.
730
0
  if (self && self->GetWrapperPreserveColor()) {
731
0
    PreserveWrapper(self);
732
0
  }
733
0
  return true;
734
0
}
735
736
static void
737
_finalize(js::FreeOp* fop, JSObject* obj)
738
0
{
739
0
  mozilla::dom::PerformanceTiming* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::PerformanceTiming>(obj);
740
0
  if (self) {
741
0
    ClearWrapper(self, self, obj);
742
0
    AddForDeferredFinalization<mozilla::dom::PerformanceTiming>(self);
743
0
  }
744
0
}
745
746
static size_t
747
_objectMoved(JSObject* obj, JSObject* old)
748
0
{
749
0
  mozilla::dom::PerformanceTiming* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::PerformanceTiming>(obj);
750
0
  if (self) {
751
0
    UpdateWrapper(self, self, obj, old);
752
0
  }
753
0
754
0
  return 0;
755
0
}
756
757
// We deliberately use brace-elision to make Visual Studio produce better initalization code.
758
#if defined(__clang__)
759
#pragma clang diagnostic push
760
#pragma clang diagnostic ignored "-Wmissing-braces"
761
#endif
762
static const JSFunctionSpec sMethods_specs[] = {
763
  JS_FNSPEC("toJSON", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&toJSON_methodinfo), 0, JSPROP_ENUMERATE, nullptr),
764
  JS_FS_END
765
};
766
#if defined(__clang__)
767
#pragma clang diagnostic pop
768
#endif
769
770
771
static const Prefable<const JSFunctionSpec> sMethods[] = {
772
  { nullptr, &sMethods_specs[0] },
773
  { nullptr, nullptr }
774
};
775
776
static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
777
    "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
778
static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
779
    "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
780
781
// We deliberately use brace-elision to make Visual Studio produce better initalization code.
782
#if defined(__clang__)
783
#pragma clang diagnostic push
784
#pragma clang diagnostic ignored "-Wmissing-braces"
785
#endif
786
static const JSPropertySpec sAttributes_specs[] = {
787
  { "navigationStart", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &navigationStart_getterinfo, nullptr, nullptr },
788
  { "unloadEventStart", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &unloadEventStart_getterinfo, nullptr, nullptr },
789
  { "unloadEventEnd", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &unloadEventEnd_getterinfo, nullptr, nullptr },
790
  { "redirectStart", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &redirectStart_getterinfo, nullptr, nullptr },
791
  { "redirectEnd", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &redirectEnd_getterinfo, nullptr, nullptr },
792
  { "fetchStart", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &fetchStart_getterinfo, nullptr, nullptr },
793
  { "domainLookupStart", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &domainLookupStart_getterinfo, nullptr, nullptr },
794
  { "domainLookupEnd", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &domainLookupEnd_getterinfo, nullptr, nullptr },
795
  { "connectStart", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &connectStart_getterinfo, nullptr, nullptr },
796
  { "connectEnd", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &connectEnd_getterinfo, nullptr, nullptr },
797
  { "secureConnectionStart", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &secureConnectionStart_getterinfo, nullptr, nullptr },
798
  { "requestStart", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &requestStart_getterinfo, nullptr, nullptr },
799
  { "responseStart", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &responseStart_getterinfo, nullptr, nullptr },
800
  { "responseEnd", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &responseEnd_getterinfo, nullptr, nullptr },
801
  { "domLoading", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &domLoading_getterinfo, nullptr, nullptr },
802
  { "domInteractive", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &domInteractive_getterinfo, nullptr, nullptr },
803
  { "domContentLoadedEventStart", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &domContentLoadedEventStart_getterinfo, nullptr, nullptr },
804
  { "domContentLoadedEventEnd", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &domContentLoadedEventEnd_getterinfo, nullptr, nullptr },
805
  { "domComplete", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &domComplete_getterinfo, nullptr, nullptr },
806
  { "loadEventStart", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &loadEventStart_getterinfo, nullptr, nullptr },
807
  { "loadEventEnd", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &loadEventEnd_getterinfo, nullptr, nullptr },
808
  { nullptr, 0, nullptr, nullptr, nullptr, nullptr },
809
  { "timeToNonBlankPaint", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &timeToNonBlankPaint_getterinfo, nullptr, nullptr },
810
  { nullptr, 0, nullptr, nullptr, nullptr, nullptr },
811
  { "timeToDOMContentFlushed", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &timeToDOMContentFlushed_getterinfo, nullptr, nullptr },
812
  { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
813
};
814
#if defined(__clang__)
815
#pragma clang diagnostic pop
816
#endif
817
818
// Can't be const because the pref-enabled boolean needs to be writable
819
static PrefableDisablers sAttributes_disablers22 = {
820
  true, false, 0, nullptr
821
};
822
823
// Can't be const because the pref-enabled boolean needs to be writable
824
static PrefableDisablers sAttributes_disablers24 = {
825
  true, false, 0, nullptr
826
};
827
828
static const Prefable<const JSPropertySpec> sAttributes[] = {
829
  { nullptr, &sAttributes_specs[0] },
830
  { &sAttributes_disablers22, &sAttributes_specs[22] },
831
  { &sAttributes_disablers24, &sAttributes_specs[24] },
832
  { nullptr, nullptr }
833
};
834
835
static_assert(3 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
836
    "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
837
static_assert(21 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
838
    "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
839
840
841
static uint16_t sNativeProperties_sortedPropertyIndices[24];
842
static PropertyInfo sNativeProperties_propertyInfos[24];
843
844
static const NativePropertiesN<2> sNativeProperties = {
845
  false, 0,
846
  false, 0,
847
  true,  0 /* sMethods */,
848
  true,  1 /* sAttributes */,
849
  false, 0,
850
  false, 0,
851
  false, 0,
852
  -1,
853
  24,
854
  sNativeProperties_sortedPropertyIndices,
855
  {
856
    { sMethods, &sNativeProperties_propertyInfos[0] },
857
    { sAttributes, &sNativeProperties_propertyInfos[1] }
858
  }
859
};
860
static_assert(24 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
861
    "We have a property info count that is oversized");
862
863
MOZ_CAN_RUN_SCRIPT bool
864
CollectJSONAttributes(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PerformanceTiming* self, JS::Rooted<JSObject*>& result)
865
0
{
866
0
  JS::Rooted<JSObject*> unwrappedObj(cx, js::CheckedUnwrap(obj));
867
0
  if (!unwrappedObj) {
868
0
    // How did that happen?  We managed to get called with that
869
0
    // object as "this"!  Just give up on sanity.
870
0
    return false;
871
0
  }
872
0
873
0
  { // scope for "temp"
874
0
    JS::Rooted<JS::Value> temp(cx);
875
0
    if (!get_navigationStart(cx, obj, self, JSJitGetterCallArgs(&temp))) {
876
0
      return false;
877
0
    }
878
0
    if (!JS_DefineProperty(cx, result, "navigationStart", temp, JSPROP_ENUMERATE)) {
879
0
      return false;
880
0
    }
881
0
  }
882
0
  { // scope for "temp"
883
0
    JS::Rooted<JS::Value> temp(cx);
884
0
    if (!get_unloadEventStart(cx, obj, self, JSJitGetterCallArgs(&temp))) {
885
0
      return false;
886
0
    }
887
0
    if (!JS_DefineProperty(cx, result, "unloadEventStart", temp, JSPROP_ENUMERATE)) {
888
0
      return false;
889
0
    }
890
0
  }
891
0
  { // scope for "temp"
892
0
    JS::Rooted<JS::Value> temp(cx);
893
0
    if (!get_unloadEventEnd(cx, obj, self, JSJitGetterCallArgs(&temp))) {
894
0
      return false;
895
0
    }
896
0
    if (!JS_DefineProperty(cx, result, "unloadEventEnd", temp, JSPROP_ENUMERATE)) {
897
0
      return false;
898
0
    }
899
0
  }
900
0
  { // scope for "temp"
901
0
    JS::Rooted<JS::Value> temp(cx);
902
0
    if (!get_redirectStart(cx, obj, self, JSJitGetterCallArgs(&temp))) {
903
0
      return false;
904
0
    }
905
0
    if (!JS_DefineProperty(cx, result, "redirectStart", temp, JSPROP_ENUMERATE)) {
906
0
      return false;
907
0
    }
908
0
  }
909
0
  { // scope for "temp"
910
0
    JS::Rooted<JS::Value> temp(cx);
911
0
    if (!get_redirectEnd(cx, obj, self, JSJitGetterCallArgs(&temp))) {
912
0
      return false;
913
0
    }
914
0
    if (!JS_DefineProperty(cx, result, "redirectEnd", temp, JSPROP_ENUMERATE)) {
915
0
      return false;
916
0
    }
917
0
  }
918
0
  { // scope for "temp"
919
0
    JS::Rooted<JS::Value> temp(cx);
920
0
    if (!get_fetchStart(cx, obj, self, JSJitGetterCallArgs(&temp))) {
921
0
      return false;
922
0
    }
923
0
    if (!JS_DefineProperty(cx, result, "fetchStart", temp, JSPROP_ENUMERATE)) {
924
0
      return false;
925
0
    }
926
0
  }
927
0
  { // scope for "temp"
928
0
    JS::Rooted<JS::Value> temp(cx);
929
0
    if (!get_domainLookupStart(cx, obj, self, JSJitGetterCallArgs(&temp))) {
930
0
      return false;
931
0
    }
932
0
    if (!JS_DefineProperty(cx, result, "domainLookupStart", temp, JSPROP_ENUMERATE)) {
933
0
      return false;
934
0
    }
935
0
  }
936
0
  { // scope for "temp"
937
0
    JS::Rooted<JS::Value> temp(cx);
938
0
    if (!get_domainLookupEnd(cx, obj, self, JSJitGetterCallArgs(&temp))) {
939
0
      return false;
940
0
    }
941
0
    if (!JS_DefineProperty(cx, result, "domainLookupEnd", temp, JSPROP_ENUMERATE)) {
942
0
      return false;
943
0
    }
944
0
  }
945
0
  { // scope for "temp"
946
0
    JS::Rooted<JS::Value> temp(cx);
947
0
    if (!get_connectStart(cx, obj, self, JSJitGetterCallArgs(&temp))) {
948
0
      return false;
949
0
    }
950
0
    if (!JS_DefineProperty(cx, result, "connectStart", temp, JSPROP_ENUMERATE)) {
951
0
      return false;
952
0
    }
953
0
  }
954
0
  { // scope for "temp"
955
0
    JS::Rooted<JS::Value> temp(cx);
956
0
    if (!get_connectEnd(cx, obj, self, JSJitGetterCallArgs(&temp))) {
957
0
      return false;
958
0
    }
959
0
    if (!JS_DefineProperty(cx, result, "connectEnd", temp, JSPROP_ENUMERATE)) {
960
0
      return false;
961
0
    }
962
0
  }
963
0
  { // scope for "temp"
964
0
    JS::Rooted<JS::Value> temp(cx);
965
0
    if (!get_secureConnectionStart(cx, obj, self, JSJitGetterCallArgs(&temp))) {
966
0
      return false;
967
0
    }
968
0
    if (!JS_DefineProperty(cx, result, "secureConnectionStart", temp, JSPROP_ENUMERATE)) {
969
0
      return false;
970
0
    }
971
0
  }
972
0
  { // scope for "temp"
973
0
    JS::Rooted<JS::Value> temp(cx);
974
0
    if (!get_requestStart(cx, obj, self, JSJitGetterCallArgs(&temp))) {
975
0
      return false;
976
0
    }
977
0
    if (!JS_DefineProperty(cx, result, "requestStart", temp, JSPROP_ENUMERATE)) {
978
0
      return false;
979
0
    }
980
0
  }
981
0
  { // scope for "temp"
982
0
    JS::Rooted<JS::Value> temp(cx);
983
0
    if (!get_responseStart(cx, obj, self, JSJitGetterCallArgs(&temp))) {
984
0
      return false;
985
0
    }
986
0
    if (!JS_DefineProperty(cx, result, "responseStart", temp, JSPROP_ENUMERATE)) {
987
0
      return false;
988
0
    }
989
0
  }
990
0
  { // scope for "temp"
991
0
    JS::Rooted<JS::Value> temp(cx);
992
0
    if (!get_responseEnd(cx, obj, self, JSJitGetterCallArgs(&temp))) {
993
0
      return false;
994
0
    }
995
0
    if (!JS_DefineProperty(cx, result, "responseEnd", temp, JSPROP_ENUMERATE)) {
996
0
      return false;
997
0
    }
998
0
  }
999
0
  { // scope for "temp"
1000
0
    JS::Rooted<JS::Value> temp(cx);
1001
0
    if (!get_domLoading(cx, obj, self, JSJitGetterCallArgs(&temp))) {
1002
0
      return false;
1003
0
    }
1004
0
    if (!JS_DefineProperty(cx, result, "domLoading", temp, JSPROP_ENUMERATE)) {
1005
0
      return false;
1006
0
    }
1007
0
  }
1008
0
  { // scope for "temp"
1009
0
    JS::Rooted<JS::Value> temp(cx);
1010
0
    if (!get_domInteractive(cx, obj, self, JSJitGetterCallArgs(&temp))) {
1011
0
      return false;
1012
0
    }
1013
0
    if (!JS_DefineProperty(cx, result, "domInteractive", temp, JSPROP_ENUMERATE)) {
1014
0
      return false;
1015
0
    }
1016
0
  }
1017
0
  { // scope for "temp"
1018
0
    JS::Rooted<JS::Value> temp(cx);
1019
0
    if (!get_domContentLoadedEventStart(cx, obj, self, JSJitGetterCallArgs(&temp))) {
1020
0
      return false;
1021
0
    }
1022
0
    if (!JS_DefineProperty(cx, result, "domContentLoadedEventStart", temp, JSPROP_ENUMERATE)) {
1023
0
      return false;
1024
0
    }
1025
0
  }
1026
0
  { // scope for "temp"
1027
0
    JS::Rooted<JS::Value> temp(cx);
1028
0
    if (!get_domContentLoadedEventEnd(cx, obj, self, JSJitGetterCallArgs(&temp))) {
1029
0
      return false;
1030
0
    }
1031
0
    if (!JS_DefineProperty(cx, result, "domContentLoadedEventEnd", temp, JSPROP_ENUMERATE)) {
1032
0
      return false;
1033
0
    }
1034
0
  }
1035
0
  { // scope for "temp"
1036
0
    JS::Rooted<JS::Value> temp(cx);
1037
0
    if (!get_domComplete(cx, obj, self, JSJitGetterCallArgs(&temp))) {
1038
0
      return false;
1039
0
    }
1040
0
    if (!JS_DefineProperty(cx, result, "domComplete", temp, JSPROP_ENUMERATE)) {
1041
0
      return false;
1042
0
    }
1043
0
  }
1044
0
  { // scope for "temp"
1045
0
    JS::Rooted<JS::Value> temp(cx);
1046
0
    if (!get_loadEventStart(cx, obj, self, JSJitGetterCallArgs(&temp))) {
1047
0
      return false;
1048
0
    }
1049
0
    if (!JS_DefineProperty(cx, result, "loadEventStart", temp, JSPROP_ENUMERATE)) {
1050
0
      return false;
1051
0
    }
1052
0
  }
1053
0
  { // scope for "temp"
1054
0
    JS::Rooted<JS::Value> temp(cx);
1055
0
    if (!get_loadEventEnd(cx, obj, self, JSJitGetterCallArgs(&temp))) {
1056
0
      return false;
1057
0
    }
1058
0
    if (!JS_DefineProperty(cx, result, "loadEventEnd", temp, JSPROP_ENUMERATE)) {
1059
0
      return false;
1060
0
    }
1061
0
  }
1062
0
  // This is unfortunately a linear scan through sAttributes, but we
1063
0
  // only do it for things which _might_ be disabled, which should
1064
0
  // help keep the performance problems down.
1065
0
  if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_timeToNonBlankPaint, sAttributes)) {
1066
0
    JS::Rooted<JS::Value> temp(cx);
1067
0
    if (!get_timeToNonBlankPaint(cx, obj, self, JSJitGetterCallArgs(&temp))) {
1068
0
      return false;
1069
0
    }
1070
0
    if (!JS_DefineProperty(cx, result, "timeToNonBlankPaint", temp, JSPROP_ENUMERATE)) {
1071
0
      return false;
1072
0
    }
1073
0
  }
1074
0
  // This is unfortunately a linear scan through sAttributes, but we
1075
0
  // only do it for things which _might_ be disabled, which should
1076
0
  // help keep the performance problems down.
1077
0
  if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_timeToDOMContentFlushed, sAttributes)) {
1078
0
    JS::Rooted<JS::Value> temp(cx);
1079
0
    if (!get_timeToDOMContentFlushed(cx, obj, self, JSJitGetterCallArgs(&temp))) {
1080
0
      return false;
1081
0
    }
1082
0
    if (!JS_DefineProperty(cx, result, "timeToDOMContentFlushed", temp, JSPROP_ENUMERATE)) {
1083
0
      return false;
1084
0
    }
1085
0
  }
1086
0
  return true;
1087
0
}
1088
1089
static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
1090
  {
1091
    "Function",
1092
    JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
1093
    &sBoringInterfaceObjectClassClassOps,
1094
    JS_NULL_CLASS_SPEC,
1095
    JS_NULL_CLASS_EXT,
1096
    &sInterfaceObjectClassObjectOps
1097
  },
1098
  eInterface,
1099
  true,
1100
  prototypes::id::PerformanceTiming,
1101
  PrototypeTraits<prototypes::id::PerformanceTiming>::Depth,
1102
  sNativePropertyHooks,
1103
  "function PerformanceTiming() {\n    [native code]\n}",
1104
  JS::GetRealmFunctionPrototype
1105
};
1106
1107
static const DOMIfaceAndProtoJSClass sPrototypeClass = {
1108
  {
1109
    "PerformanceTimingPrototype",
1110
    JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
1111
    JS_NULL_CLASS_OPS,
1112
    JS_NULL_CLASS_SPEC,
1113
    JS_NULL_CLASS_EXT,
1114
    JS_NULL_OBJECT_OPS
1115
  },
1116
  eInterfacePrototype,
1117
  false,
1118
  prototypes::id::PerformanceTiming,
1119
  PrototypeTraits<prototypes::id::PerformanceTiming>::Depth,
1120
  sNativePropertyHooks,
1121
  "[object PerformanceTimingPrototype]",
1122
  JS::GetRealmObjectPrototype
1123
};
1124
1125
static const js::ClassOps sClassOps = {
1126
  _addProperty, /* addProperty */
1127
  nullptr,               /* delProperty */
1128
  nullptr,               /* enumerate */
1129
  nullptr, /* newEnumerate */
1130
  nullptr, /* resolve */
1131
  nullptr, /* mayResolve */
1132
  _finalize, /* finalize */
1133
  nullptr, /* call */
1134
  nullptr,               /* hasInstance */
1135
  nullptr,               /* construct */
1136
  nullptr, /* trace */
1137
};
1138
1139
static const js::ClassExtension sClassExtension = {
1140
  nullptr, /* weakmapKeyDelegateOp */
1141
  _objectMoved /* objectMovedOp */
1142
};
1143
1144
static const DOMJSClass sClass = {
1145
  { "PerformanceTiming",
1146
    JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
1147
    &sClassOps,
1148
    JS_NULL_CLASS_SPEC,
1149
    &sClassExtension,
1150
    JS_NULL_OBJECT_OPS
1151
  },
1152
  { prototypes::id::PerformanceTiming, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
1153
  IsBaseOf<nsISupports, mozilla::dom::PerformanceTiming >::value,
1154
  sNativePropertyHooks,
1155
  FindAssociatedGlobalForNative<mozilla::dom::PerformanceTiming>::Get,
1156
  GetProtoObjectHandle,
1157
  GetCCParticipant<mozilla::dom::PerformanceTiming>::Get()
1158
};
1159
static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
1160
              "Must have the right minimal number of reserved slots.");
1161
static_assert(1 >= 1,
1162
              "Must have enough reserved slots.");
1163
1164
const JSClass*
1165
GetJSClass()
1166
0
{
1167
0
  return sClass.ToJSClass();
1168
0
}
1169
1170
bool
1171
Wrap(JSContext* aCx, mozilla::dom::PerformanceTiming* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
1172
0
{
1173
0
  static_assert(!IsBaseOf<NonRefcountedDOMObject, mozilla::dom::PerformanceTiming>::value,
1174
0
                "Shouldn't have wrappercached things that are not refcounted.");
1175
0
  MOZ_ASSERT(static_cast<mozilla::dom::PerformanceTiming*>(aObject) ==
1176
0
             reinterpret_cast<mozilla::dom::PerformanceTiming*>(aObject),
1177
0
             "Multiple inheritance for mozilla::dom::PerformanceTiming is broken.");
1178
0
  MOZ_ASSERT(ToSupportsIsCorrect(aObject));
1179
0
  MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
1180
0
  MOZ_ASSERT(!aCache->GetWrapper(),
1181
0
             "You should probably not be using Wrap() directly; use "
1182
0
             "GetOrCreateDOMReflector instead");
1183
0
1184
0
  MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
1185
0
             "nsISupports must be on our primary inheritance chain");
1186
0
1187
0
  JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
1188
0
  if (!global) {
1189
0
    return false;
1190
0
  }
1191
0
  MOZ_ASSERT(JS_IsGlobalObject(global));
1192
0
  MOZ_ASSERT(JS::ObjectIsNotGray(global));
1193
0
1194
0
  // That might have ended up wrapping us already, due to the wonders
1195
0
  // of XBL.  Check for that, and bail out as needed.
1196
0
  aReflector.set(aCache->GetWrapper());
1197
0
  if (aReflector) {
1198
#ifdef DEBUG
1199
    AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
1200
#endif // DEBUG
1201
    return true;
1202
0
  }
1203
0
1204
0
  JSAutoRealm ar(aCx, global);
1205
0
  JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
1206
0
  if (!canonicalProto) {
1207
0
    return false;
1208
0
  }
1209
0
  JS::Rooted<JSObject*> proto(aCx);
1210
0
  if (aGivenProto) {
1211
0
    proto = aGivenProto;
1212
0
    // Unfortunately, while aGivenProto was in the compartment of aCx
1213
0
    // coming in, we changed compartments to that of "parent" so may need
1214
0
    // to wrap the proto here.
1215
0
    if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
1216
0
      if (!JS_WrapObject(aCx, &proto)) {
1217
0
        return false;
1218
0
      }
1219
0
    }
1220
0
  } else {
1221
0
    proto = canonicalProto;
1222
0
  }
1223
0
1224
0
  BindingJSObjectCreator<mozilla::dom::PerformanceTiming> creator(aCx);
1225
0
  creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
1226
0
  if (!aReflector) {
1227
0
    return false;
1228
0
  }
1229
0
1230
0
  aCache->SetWrapper(aReflector);
1231
0
  creator.InitializationSucceeded();
1232
0
1233
0
  MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
1234
0
             aCache->GetWrapperPreserveColor() == aReflector);
1235
0
  // If proto != canonicalProto, we have to preserve our wrapper;
1236
0
  // otherwise we won't be able to properly recreate it later, since
1237
0
  // we won't know what proto to use.  Note that we don't check
1238
0
  // aGivenProto here, since it's entirely possible (and even
1239
0
  // somewhat common) to have a non-null aGivenProto which is the
1240
0
  // same as canonicalProto.
1241
0
  if (proto != canonicalProto) {
1242
0
    PreserveWrapper(aObject);
1243
0
  }
1244
0
1245
0
  return true;
1246
0
}
1247
1248
const NativePropertyHooks sNativePropertyHooks[] = { {
1249
  nullptr,
1250
  nullptr,
1251
  nullptr,
1252
  { sNativeProperties.Upcast(), nullptr },
1253
  prototypes::id::PerformanceTiming,
1254
  constructors::id::PerformanceTiming,
1255
  nullptr,
1256
  &DefaultXrayExpandoObjectClass
1257
} };
1258
1259
void
1260
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
1261
0
{
1262
0
  JS::Rooted<JSObject*> parentProto(aCx, JS::GetRealmObjectPrototype(aCx));
1263
0
  if (!parentProto) {
1264
0
    return;
1265
0
  }
1266
0
1267
0
  JS::Rooted<JSObject*> constructorProto(aCx, JS::GetRealmFunctionPrototype(aCx));
1268
0
  if (!constructorProto) {
1269
0
    return;
1270
0
  }
1271
0
1272
0
  static bool sIdsInited = false;
1273
0
  if (!sIdsInited && NS_IsMainThread()) {
1274
0
    if (!InitIds(aCx, sNativeProperties.Upcast())) {
1275
0
      return;
1276
0
    }
1277
0
    sIdsInited = true;
1278
0
  }
1279
0
1280
0
  static bool sPrefCachesInited = false;
1281
0
  if (!sPrefCachesInited && NS_IsMainThread()) {
1282
0
    sPrefCachesInited = true;
1283
0
    Preferences::AddBoolVarCache(&sAttributes[1].disablers->enabled, "dom.performance.time_to_non_blank_paint.enabled");
1284
0
    Preferences::AddBoolVarCache(&sAttributes[2].disablers->enabled, "dom.performance.time_to_dom_content_flushed.enabled");
1285
0
  }
1286
0
1287
0
  JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::PerformanceTiming);
1288
0
  JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::PerformanceTiming);
1289
0
  dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
1290
0
                              &sPrototypeClass.mBase, protoCache,
1291
0
                              nullptr,
1292
0
                              constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
1293
0
                              interfaceCache,
1294
0
                              sNativeProperties.Upcast(),
1295
0
                              nullptr,
1296
0
                              "PerformanceTiming", aDefineOnGlobal,
1297
0
                              nullptr,
1298
0
                              false);
1299
0
}
1300
1301
JSObject*
1302
GetConstructorObject(JSContext* aCx)
1303
0
{
1304
0
  return GetConstructorObjectHandle(aCx);
1305
0
}
1306
1307
} // namespace PerformanceTiming_Binding
1308
1309
1310
1311
} // namespace dom
1312
} // namespace mozilla