mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 974045 - don't store JS_CRASH_DIAGNOSTICS variables when we don't need to; r=luke
This commit is contained in:
parent
2e9c02b047
commit
8d0ed43cfe
@ -216,31 +216,39 @@ Ring::copyBytes(void *data, size_t size)
|
||||
} /* namespace crash */
|
||||
} /* namespace js */
|
||||
|
||||
#ifdef JS_CRASH_DIAGNOSTICS
|
||||
static bool gInitialized;
|
||||
|
||||
static Stack gGCStack(JS_CRASH_STACK_GC);
|
||||
static Stack gErrorStack(JS_CRASH_STACK_ERROR);
|
||||
static Ring gRingBuffer(JS_CRASH_RING);
|
||||
#endif
|
||||
|
||||
void
|
||||
js::crash::SnapshotGCStack()
|
||||
{
|
||||
#ifdef JS_CRASH_DIAGNOSTICS
|
||||
if (gInitialized)
|
||||
gGCStack.snapshot();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
js::crash::SnapshotErrorStack()
|
||||
{
|
||||
#ifdef JS_CRASH_DIAGNOSTICS
|
||||
if (gInitialized)
|
||||
gErrorStack.snapshot();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
js::crash::SaveCrashData(uint64_t tag, void *ptr, size_t size)
|
||||
{
|
||||
#ifdef JS_CRASH_DIAGNOSTICS
|
||||
if (gInitialized)
|
||||
gRingBuffer.push(tag, ptr, size);
|
||||
#endif
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
|
Loading…
Reference in New Issue
Block a user