mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 595975: diagnostic patch to collect Shape contents, r=billm, a=blocker
This commit is contained in:
parent
6ea548b208
commit
26b39ddcb7
@ -829,6 +829,14 @@ extern JS_FRIEND_DATA(JSScopeStats) js_scope_stats;
|
||||
|
||||
namespace js {
|
||||
|
||||
inline static volatile int *vcopy(volatile int *dst, int *src, size_t bytes)
|
||||
{
|
||||
int *end = src + bytes / sizeof(int);
|
||||
for (; src < end; ++src, ++dst)
|
||||
*dst = *src;
|
||||
return dst;
|
||||
}
|
||||
|
||||
JS_ALWAYS_INLINE js::Shape **
|
||||
Shape::search(js::Shape **startp, jsid id, bool adding)
|
||||
{
|
||||
@ -852,6 +860,13 @@ Shape::search(js::Shape **startp, jsid id, bool adding)
|
||||
METER(misses);
|
||||
return spp;
|
||||
}
|
||||
{
|
||||
char blackbox[sizeof(Shape) + 8];
|
||||
volatile int *p = (int *) blackbox;
|
||||
*p++ = 0xfcfcfcfc;
|
||||
p = vcopy(p, (int *) *startp, sizeof(Shape));
|
||||
*p = 0xfdfdfdfd;
|
||||
}
|
||||
return (*startp)->table->search(id, adding);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user