1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2
* vim: set ts=4 sw=4 et tw=99:
4
* This Source Code Form is subject to the terms of the Mozilla Public
5
* License, v. 2.0. If a copy of the MPL was not distributed with this
6
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8
#ifndef jscrashreport_h___
9
#define jscrashreport_h___
24
SaveCrashData(uint64_t tag, void *ptr, size_t size);
26
template<size_t size, unsigned char marker>
29
JS_DECL_USE_GUARD_OBJECT_NOTIFIER
30
volatile unsigned char buffer[size + 4];
33
StackBuffer(void *data JS_GUARD_OBJECT_NOTIFIER_PARAM) {
34
JS_GUARD_OBJECT_NOTIFIER_INIT;
39
for (size_t i = 0; i < size; i++) {
41
buffer[i + 2] = ((unsigned char *)data)[i];
46
buffer[size - 2] = ']';
47
buffer[size - 1] = marker;
51
} /* namespace crash */
54
#endif /* jscrashreport_h___ */