void-packages/srcpkgs/firefox/patches/ppc64le-bug-1512162.patch

51 lines
1.4 KiB
Diff
Raw Normal View History

2019-07-09 19:03:02 +00:00
diff --git a/js/xpconnect/src/XPCWrappedNative.cpp b/js/xpconnect/src/XPCWrappedNative.cpp
--- js/xpconnect/src/XPCWrappedNative.cpp
+++ js/xpconnect/src/XPCWrappedNative.cpp
@@ -1152,16 +1152,20 @@ bool XPCWrappedNative::CallMethod(XPCCal
if (NS_FAILED(rv)) {
return Throw(rv, ccx);
}
JS::Rooted<CallMethodHelper> helper(ccx, /* init = */ ccx);
return helper.get().Call();
}
+#if (__GNUC__ && __linux__ && __PPC64__ && _LITTLE_ENDIAN)
+// Work around a compiler bug on ppc64le (bug 1512162).
+__attribute__ ((noinline,noclone))
+#endif
bool CallMethodHelper::Call() {
mCallContext.SetRetVal(JS::UndefinedValue());
mCallContext.GetContext()->SetPendingException(nullptr);
if (mVTableIndex == 0) {
return QueryInterfaceFastPath();
}
@@ -1310,16 +1314,20 @@ bool CallMethodHelper::GetOutParamSource
return false;
}
}
}
return true;
}
+#if (__GNUC__ && __linux__ && __PPC64__ && _LITTLE_ENDIAN)
+// Work around a compiler bug on ppc64le (bug 1512162).
+__attribute__ ((noinline,noclone))
+#endif
bool CallMethodHelper::GatherAndConvertResults() {
// now we iterate through the native params to gather and convert results
uint8_t paramCount = mMethodInfo->GetParamCount();
for (uint8_t i = 0; i < paramCount; i++) {
const nsXPTParamInfo& paramInfo = mMethodInfo->GetParam(i);
if (!paramInfo.IsOut()) {
continue;
}