mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 664647 - Work around MSVC 2005 PGO bug in GetJSObjectSlotsCallback and friends. r=khuey.
This commit is contained in:
parent
b64bc1fb04
commit
4cc5c61803
@ -1329,6 +1329,10 @@ struct PRInt64Data {
|
||||
PRInt64 n;
|
||||
};
|
||||
|
||||
// This function is miscompiled with MSVC 2005 when PGO is on. See bug 664647.
|
||||
#ifdef _MSC_VER
|
||||
#pragma optimize("", off)
|
||||
#endif
|
||||
void
|
||||
GetJSObjectSlotsCallback(JSContext *cx, void *v, size_t traceKind, void *thing)
|
||||
{
|
||||
@ -1339,6 +1343,9 @@ GetJSObjectSlotsCallback(JSContext *cx, void *v, size_t traceKind, void *thing)
|
||||
data->n += obj->numSlots() * sizeof(js::Value);
|
||||
}
|
||||
}
|
||||
#ifdef _MSC_VER
|
||||
#pragma optimize("", on)
|
||||
#endif
|
||||
|
||||
static PRInt64
|
||||
GetJSObjectSlots(void *dummy)
|
||||
@ -1359,6 +1366,10 @@ GetJSObjectSlots(void *dummy)
|
||||
return data.n;
|
||||
}
|
||||
|
||||
// This function is miscompiled with MSVC 2005 when PGO is on. See bug 664647.
|
||||
#ifdef _MSC_VER
|
||||
#pragma optimize("", off)
|
||||
#endif
|
||||
void
|
||||
GetJSStringCharsCallback(JSContext *cx, void *v, size_t traceKind, void *thing)
|
||||
{
|
||||
@ -1367,6 +1378,9 @@ GetJSStringCharsCallback(JSContext *cx, void *v, size_t traceKind, void *thing)
|
||||
PRInt64Data *data = (PRInt64Data *) v;
|
||||
data->n += str->charsHeapSize();
|
||||
}
|
||||
#ifdef _MSC_VER
|
||||
#pragma optimize("", on)
|
||||
#endif
|
||||
|
||||
static PRInt64
|
||||
GetJSStringChars(void *dummy)
|
||||
@ -1592,9 +1606,8 @@ XPCJSRuntime::XPCJSRuntime(nsXPConnect* aXPConnect)
|
||||
NS_RegisterMemoryReporter(new NS_MEMORY_REPORTER_NAME(XPConnectJSGCHeap));
|
||||
NS_RegisterMemoryReporter(new NS_MEMORY_REPORTER_NAME(XPConnectJSStack));
|
||||
NS_RegisterMemoryReporter(new NS_MEMORY_REPORTER_NAME(XPConnectJSScripts));
|
||||
// XXX: these two are disabled due to crashes. See bug 664647.
|
||||
//NS_RegisterMemoryReporter(new NS_MEMORY_REPORTER_NAME(XPConnectJSObjectSlots));
|
||||
//NS_RegisterMemoryReporter(new NS_MEMORY_REPORTER_NAME(XPConnectJSStringChars));
|
||||
NS_RegisterMemoryReporter(new NS_MEMORY_REPORTER_NAME(XPConnectJSObjectSlots));
|
||||
NS_RegisterMemoryReporter(new NS_MEMORY_REPORTER_NAME(XPConnectJSStringChars));
|
||||
#ifdef JS_METHODJIT
|
||||
NS_RegisterMemoryReporter(new NS_MEMORY_REPORTER_NAME(XPConnectJSMjitCode));
|
||||
NS_RegisterMemoryReporter(new NS_MEMORY_REPORTER_NAME(XPConnectJSMjitData));
|
||||
|
Loading…
Reference in New Issue
Block a user