Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/toolkit/crashreporter/nsDummyExceptionHandler.cpp
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
3
/* This Source Code Form is subject to the terms of the Mozilla Public
4
 * License, v. 2.0. If a copy of the MPL was not distributed with this
5
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7
#include <functional>
8
9
#include "nsExceptionHandler.h"
10
#include "nsExceptionHandlerUtils.h"
11
12
namespace CrashReporter {
13
14
void
15
AnnotateOOMAllocationSize(size_t size)
16
0
{
17
0
}
18
19
void
20
AnnotateTexturesSize(size_t size)
21
0
{
22
0
}
23
24
void
25
AnnotatePendingIPC(size_t aNumOfPendingIPC,
26
                   uint32_t aTopPendingIPCCount,
27
                   const char* aTopPendingIPCName,
28
                   uint32_t aTopPendingIPCType)
29
0
{
30
0
}
31
32
nsresult
33
SetExceptionHandler(nsIFile* aXREDirectory,
34
                    bool force/*=false*/)
35
0
{
36
0
  return NS_ERROR_NOT_IMPLEMENTED;
37
0
}
38
39
bool
40
GetEnabled()
41
0
{
42
0
  return false;
43
0
}
44
45
bool
46
GetMinidumpPath(nsAString& aPath)
47
0
{
48
0
  return false;
49
0
}
50
51
nsresult
52
SetMinidumpPath(const nsAString& aPath)
53
0
{
54
0
  return NS_ERROR_NOT_IMPLEMENTED;
55
0
}
56
57
nsresult
58
SetupExtraData(nsIFile* aAppDataDirectory,
59
               const nsACString& aBuildID)
60
0
{
61
0
  return NS_ERROR_NOT_IMPLEMENTED;
62
0
}
63
64
nsresult
65
UnsetExceptionHandler()
66
0
{
67
0
  return NS_ERROR_NOT_IMPLEMENTED;
68
0
}
69
70
void
71
NotifyCrashReporterClientCreated()
72
0
{
73
0
}
74
75
nsresult
76
AnnotateCrashReport(Annotation key, bool data)
77
3
{
78
3
  return NS_ERROR_NOT_IMPLEMENTED;
79
3
}
80
81
nsresult
82
AnnotateCrashReport(Annotation key, int data)
83
0
{
84
0
  return NS_ERROR_NOT_IMPLEMENTED;
85
0
}
86
87
nsresult
88
AnnotateCrashReport(Annotation key, unsigned int data)
89
0
{
90
0
  return NS_ERROR_NOT_IMPLEMENTED;
91
0
}
92
93
nsresult
94
AnnotateCrashReport(Annotation key, const nsACString& data)
95
0
{
96
0
  return NS_ERROR_NOT_IMPLEMENTED;
97
0
}
98
99
nsresult
100
RemoveCrashReportAnnotation(Annotation key)
101
0
{
102
0
  return NS_ERROR_NOT_IMPLEMENTED;
103
0
}
104
105
nsresult
106
SetGarbageCollecting(bool collecting)
107
236
{
108
236
  return NS_ERROR_NOT_IMPLEMENTED;
109
236
}
110
111
void
112
SetEventloopNestingLevel(uint32_t level)
113
0
{
114
0
}
115
116
void
117
SetMinidumpAnalysisAllThreads()
118
0
{
119
0
}
120
121
nsresult
122
AppendAppNotesToCrashReport(const nsACString& data)
123
0
{
124
0
  return NS_ERROR_NOT_IMPLEMENTED;
125
0
}
126
127
bool
128
GetAnnotation(const nsACString& key, nsACString& data)
129
0
{
130
0
  return false;
131
0
}
132
133
nsresult
134
RegisterAppMemory(void* ptr, size_t length)
135
0
{
136
0
  return NS_ERROR_NOT_IMPLEMENTED;
137
0
}
138
139
nsresult
140
UnregisterAppMemory(void* ptr)
141
0
{
142
0
  return NS_ERROR_NOT_IMPLEMENTED;
143
0
}
144
145
void
146
SetIncludeContextHeap(bool aValue)
147
0
{
148
0
}
149
150
bool
151
GetServerURL(nsACString& aServerURL)
152
0
{
153
0
  return false;
154
0
}
155
156
nsresult
157
SetServerURL(const nsACString& aServerURL)
158
0
{
159
0
  return NS_ERROR_NOT_IMPLEMENTED;
160
0
}
161
162
nsresult
163
SetRestartArgs(int argc, char** argv)
164
0
{
165
0
  return NS_ERROR_NOT_IMPLEMENTED;
166
0
}
167
168
#if !defined(XP_WIN)
169
int
170
GetAnnotationTimeCrashFd()
171
0
{
172
0
  return 7;
173
0
}
174
#endif
175
176
void
177
RegisterChildCrashAnnotationFileDescriptor(ProcessId aProcess, PRFileDesc* aFd)
178
0
{
179
0
}
180
181
void
182
DeregisterChildCrashAnnotationFileDescriptor(ProcessId aProcess)
183
0
{
184
0
}
185
186
#ifdef XP_WIN32
187
nsresult
188
WriteMinidumpForException(EXCEPTION_POINTERS* aExceptionInfo)
189
{
190
  return NS_ERROR_NOT_IMPLEMENTED;
191
}
192
#endif
193
194
#ifdef XP_LINUX
195
bool
196
WriteMinidumpForSigInfo(int signo,
197
                        siginfo_t* info,
198
                        void* uc)
199
0
{
200
0
  return false;
201
0
}
202
#endif
203
204
#ifdef XP_MACOSX
205
nsresult
206
AppendObjCExceptionInfoToAppNotes(void *inException)
207
{
208
  return NS_ERROR_NOT_IMPLEMENTED;
209
}
210
#endif
211
212
nsresult
213
GetSubmitReports(bool* aSubmitReports)
214
0
{
215
0
  return NS_ERROR_NOT_IMPLEMENTED;
216
0
}
217
218
nsresult
219
SetSubmitReports(bool aSubmitReports)
220
0
{
221
0
  return NS_ERROR_NOT_IMPLEMENTED;
222
0
}
223
224
void
225
SetProfileDirectory(nsIFile* aDir)
226
0
{
227
0
}
228
229
void
230
SetUserAppDataDirectory(nsIFile* aDir)
231
0
{
232
0
}
233
234
void
235
UpdateCrashEventsDir()
236
0
{
237
0
}
238
239
bool
240
GetCrashEventsDir(nsAString& aPath)
241
0
{
242
0
  return false;
243
0
}
244
245
void
246
SetMemoryReportFile(nsIFile* aFile)
247
0
{
248
0
}
249
250
nsresult
251
GetDefaultMemoryReportFile(nsIFile** aFile)
252
0
{
253
0
  return NS_ERROR_NOT_IMPLEMENTED;
254
0
}
255
256
void
257
SetTelemetrySessionId(const nsACString& id)
258
0
{
259
0
}
260
261
void
262
DeleteMinidumpFilesForID(const nsAString& id)
263
0
{
264
0
}
265
266
bool
267
GetMinidumpForID(const nsAString& id, nsIFile** minidump)
268
0
{
269
0
  return false;
270
0
}
271
272
bool
273
GetIDFromMinidump(nsIFile* minidump, nsAString& id)
274
0
{
275
0
  return false;
276
0
}
277
278
bool
279
GetExtraFileForID(const nsAString& id,
280
                  nsIFile** extraFile)
281
0
{
282
0
  return false;
283
0
}
284
285
bool
286
GetExtraFileForMinidump(nsIFile* minidump,
287
                        nsIFile** extraFile)
288
0
{
289
0
  return false;
290
0
}
291
292
bool
293
AppendExtraData(const nsAString& id,
294
                const AnnotationTable& data)
295
0
{
296
0
  return false;
297
0
}
298
299
bool
300
AppendExtraData(nsIFile* extraFile,
301
                const AnnotationTable& data)
302
0
{
303
0
  return false;
304
0
}
305
306
void
307
OOPInit()
308
0
{
309
0
}
310
311
void
312
GetChildProcessTmpDir(nsIFile** aOutTmpDir)
313
0
{
314
0
}
315
316
#if defined(XP_WIN) || defined(XP_MACOSX)
317
const char*
318
GetChildNotificationPipe()
319
{
320
  return nullptr;
321
}
322
#endif
323
324
#ifdef MOZ_CRASHREPORTER_INJECTOR
325
void
326
InjectCrashReporterIntoProcess(DWORD processID, InjectorCrashCallback* cb)
327
{
328
}
329
330
void
331
UnregisterInjectorCallback(DWORD processID)
332
{
333
}
334
335
#endif // MOZ_CRASHREPORTER_INJECTOR
336
337
bool
338
GetLastRunCrashID(nsAString& id)
339
0
{
340
0
  return false;
341
0
}
342
343
#if defined(XP_WIN)
344
bool
345
SetRemoteExceptionHandler(const nsACString& crashPipe,
346
                          uintptr_t aCrashTimeAnnotationFile)
347
{
348
  return false;
349
}
350
351
#elif defined(XP_MACOSX)
352
353
bool
354
SetRemoteExceptionHandler(const nsACString& crashPipe)
355
{
356
  return false;
357
}
358
359
#else
360
361
bool
362
CreateNotificationPipeForChild(int* childCrashFd, int* childCrashRemapFd)
363
0
{
364
0
  return false;
365
0
}
366
367
bool
368
SetRemoteExceptionHandler()
369
0
{
370
0
  return false;
371
0
}
372
#endif  // XP_WIN
373
374
bool
375
TakeMinidumpForChild(uint32_t childPid, nsIFile** dump, uint32_t* aSequence)
376
0
{
377
0
  return false;
378
0
}
379
380
void
381
RenameAdditionalHangMinidump(nsIFile* minidump, nsIFile* childMinidump,
382
                             const nsACString& name)
383
0
{
384
0
}
385
386
ThreadId
387
CurrentThreadId()
388
0
{
389
0
  return -1;
390
0
}
391
392
bool
393
TakeMinidump(nsIFile** aResult, bool aMoveToPending)
394
0
{
395
0
  return false;
396
0
}
397
398
bool
399
CreateMinidumpsAndPair(ProcessHandle aTargetPid,
400
                       ThreadId aTargetBlamedThread,
401
                       const nsACString& aIncomingPairName,
402
                       nsIFile* aIncomingDumpToPair,
403
                       nsIFile** aTargetDumpOut)
404
0
{
405
0
  return false;
406
0
}
407
408
bool
409
CreateAdditionalChildMinidump(ProcessHandle childPid,
410
                              ThreadId childBlamedThread,
411
                              nsIFile* parentMinidump,
412
                              const nsACString& name)
413
0
{
414
0
  return false;
415
0
}
416
417
bool
418
UnsetRemoteExceptionHandler()
419
0
{
420
0
  return false;
421
0
}
422
423
#if defined(MOZ_WIDGET_ANDROID)
424
void
425
SetNotificationPipeForChild(int childCrashFd)
426
{
427
}
428
429
void
430
SetCrashAnnotationPipeForChild(int childCrashAnnotationFd)
431
{
432
}
433
434
void
435
AddLibraryMapping(const char* library_name,
436
                  uintptr_t   start_address,
437
                  size_t      mapping_length,
438
                  size_t      file_offset)
439
{
440
}
441
#endif
442
443
// From ThreadAnnotation.cpp
444
445
void
446
InitThreadAnnotation()
447
0
{
448
0
}
449
450
void
451
SetCurrentThreadName(const char* aName)
452
72
{
453
72
}
454
455
void
456
GetFlatThreadAnnotation(const std::function<void(const char*)>& aCallback)
457
0
{
458
0
}
459
460
void
461
ShutdownThreadAnnotation()
462
0
{
463
0
}
464
465
} // namespace CrashReporter