From c6fe02a4b9b82063eaf895cb3c26c2ad55d18689c9521b548f983aa61f6f049f Mon Sep 17 00:00:00 2001 From: Wolfgang Rosenauer Date: Fri, 29 May 2015 06:59:35 +0000 Subject: [PATCH] Accepting request 309059 from home:dirkmueller:branches:mozilla:Factory - add mozilla-bug1024492.patch: * Fixes build against GCC 5.x OBS-URL: https://build.opensuse.org/request/show/309059 OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaThunderbird?expand=0&rev=284 --- MozillaThunderbird.changes | 6 + MozillaThunderbird.spec | 2 + mozilla-bug1024492.patch | 239 +++++++++++++++++++++++++++++++++++++ 3 files changed, 247 insertions(+) create mode 100644 mozilla-bug1024492.patch diff --git a/MozillaThunderbird.changes b/MozillaThunderbird.changes index be1ebca..728454e 100644 --- a/MozillaThunderbird.changes +++ b/MozillaThunderbird.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu May 28 10:28:13 UTC 2015 - dmueller@suse.com + +- add mozilla-bug1024492.patch: + * Fixes build against GCC 5.x + ------------------------------------------------------------------- Sat May 9 07:22:49 UTC 2015 - wr@rosenauer.org diff --git a/MozillaThunderbird.spec b/MozillaThunderbird.spec index a2f3d22..aa83223 100644 --- a/MozillaThunderbird.spec +++ b/MozillaThunderbird.spec @@ -103,6 +103,7 @@ Patch5: mozilla-arm-disable-edsp.patch Patch6: mozilla-ppc.patch Patch7: mozilla-nullptr-gcc45.patch Patch8: mozilla-icu-strncat.patch +Patch9: mozilla-bug1024492.patch # Thunderbird/mail Patch20: tb-ssldap.patch Patch21: tb-develdirs.patch @@ -203,6 +204,7 @@ pushd mozilla %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p3 popd # comm-central patches %patch20 -p1 diff --git a/mozilla-bug1024492.patch b/mozilla-bug1024492.patch new file mode 100644 index 0000000..a102fac --- /dev/null +++ b/mozilla-bug1024492.patch @@ -0,0 +1,239 @@ +Fixes build with GCC 5.x + +https://bug1024492.bugzilla.mozilla.org/attachment.cgi?id=8439834&action=diff&context=patch&format=raw&headers=1 + +diff -ur a/thunderbird/mozilla/js/src/builtin/TypedObject.cpp b/thunderbird/mozilla/js/src/builtin/TypedObject.cpp +--- a/thunderbird/mozilla/js/src/builtin/TypedObject.cpp 2015-05-09 08:50:17.567803110 +0200 ++++ b/thunderbird/mozilla/js/src/builtin/TypedObject.cpp 2015-05-28 11:25:07.771027783 +0200 +@@ -710,12 +710,12 @@ + contents.append(")"); + RootedAtom stringRepr(cx, contents.finishAtom()); + if (!stringRepr) +- return nullptr; ++ return false; + + // Extract ArrayType.prototype + RootedObject arrayTypePrototype(cx, GetPrototype(cx, arrayTypeGlobal)); + if (!arrayTypePrototype) +- return nullptr; ++ return false; + + // Create the instance of ArrayType + Rooted obj(cx); +@@ -728,7 +728,7 @@ + if (!JSObject::defineProperty(cx, obj, cx->names().length, + UndefinedHandleValue, nullptr, nullptr, + JSPROP_READONLY | JSPROP_PERMANENT)) +- return nullptr; ++ return false; + + args.rval().setObject(*obj); + return true; +@@ -762,7 +762,7 @@ + if (!size.isValid()) { + JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr, + JSMSG_TYPEDOBJECT_TOO_BIG); +- return nullptr; ++ return false; + } + + // Construct a canonical string `new ArrayType().dimension(N)`: +@@ -775,7 +775,7 @@ + contents.append(")"); + RootedAtom stringRepr(cx, contents.finishAtom()); + if (!stringRepr) +- return nullptr; ++ return false; + + // Create the sized type object. + Rooted obj(cx); +@@ -793,7 +793,7 @@ + if (!JSObject::defineProperty(cx, obj, cx->names().length, + lengthVal, nullptr, nullptr, + JSPROP_READONLY | JSPROP_PERMANENT)) +- return nullptr; ++ return false; + + // Add `unsized` property, which is a link from the sized + // array to the unsized array. +@@ -801,7 +801,7 @@ + if (!JSObject::defineProperty(cx, obj, cx->names().unsized, + unsizedTypeDescrValue, nullptr, nullptr, + JSPROP_READONLY | JSPROP_PERMANENT)) +- return nullptr; ++ return false; + + args.rval().setObject(*obj); + return true; +@@ -1253,7 +1253,7 @@ + Rooted proto(cx); + proto = NewObjectWithProto(cx, objProto, nullptr, TenuredObject); + if (!proto) +- return nullptr; ++ return false; + proto->initTypeDescrSlot(*descr); + descr->initReservedSlot(JS_DESCR_SLOT_TYPROTO, ObjectValue(*proto)); + +@@ -1358,14 +1358,14 @@ + #define BINARYDATA_SCALAR_DEFINE(constant_, type_, name_) \ + if (!DefineSimpleTypeDescr(cx, global, module, constant_, \ + cx->names().name_)) \ +- return nullptr; ++ return false; + JS_FOR_EACH_SCALAR_TYPE_REPR(BINARYDATA_SCALAR_DEFINE) + #undef BINARYDATA_SCALAR_DEFINE + + #define BINARYDATA_REFERENCE_DEFINE(constant_, type_, name_) \ + if (!DefineSimpleTypeDescr(cx, global, module, constant_, \ + cx->names().name_)) \ +- return nullptr; ++ return false; + JS_FOR_EACH_REFERENCE_TYPE_REPR(BINARYDATA_REFERENCE_DEFINE) + #undef BINARYDATA_REFERENCE_DEFINE + +@@ -1375,14 +1375,14 @@ + arrayType = DefineMetaTypeDescr( + cx, global, module, TypedObjectModuleObject::ArrayTypePrototype); + if (!arrayType) +- return nullptr; ++ return false; + + RootedValue arrayTypeValue(cx, ObjectValue(*arrayType)); + if (!JSObject::defineProperty(cx, module, cx->names().ArrayType, + arrayTypeValue, + nullptr, nullptr, + JSPROP_READONLY | JSPROP_PERMANENT)) +- return nullptr; ++ return false; + + // StructType. + +@@ -1390,14 +1390,14 @@ + structType = DefineMetaTypeDescr( + cx, global, module, TypedObjectModuleObject::StructTypePrototype); + if (!structType) +- return nullptr; ++ return false; + + RootedValue structTypeValue(cx, ObjectValue(*structType)); + if (!JSObject::defineProperty(cx, module, cx->names().StructType, + structTypeValue, + nullptr, nullptr, + JSPROP_READONLY | JSPROP_PERMANENT)) +- return nullptr; ++ return false; + + // Everything is setup, install module on the global object: + RootedValue moduleValue(cx, ObjectValue(*module)); +@@ -1407,7 +1407,7 @@ + nullptr, nullptr, + 0)) + { +- return nullptr; ++ return false; + } + + return module; +@@ -2466,7 +2466,7 @@ + if (length < 0) { + JS_ReportErrorNumber(cx, js_GetErrorMessage, + nullptr, JSMSG_TYPEDOBJECT_BAD_ARGS); +- return nullptr; ++ return false; + } + Rooted obj(cx, createZeroed(cx, callee, length)); + if (!obj) +diff -ur a/thunderbird/mozilla/js/src/frontend/BytecodeCompiler.cpp b/thunderbird/mozilla/js/src/frontend/BytecodeCompiler.cpp +--- a/thunderbird/mozilla/js/src/frontend/BytecodeCompiler.cpp 2015-05-09 08:50:17.666800504 +0200 ++++ b/thunderbird/mozilla/js/src/frontend/BytecodeCompiler.cpp 2015-05-28 11:25:07.771027783 +0200 +@@ -544,7 +544,7 @@ + + RootedScriptSource sourceObject(cx, CreateScriptSourceObject(cx, options)); + if (!sourceObject) +- return nullptr; ++ return false; + ScriptSource* ss = sourceObject->source(); + + SourceCompressionTask sct(cx); +diff -ur a/thunderbird/mozilla/js/src/vm/ScopeObject.h b/thunderbird/mozilla/js/src/vm/ScopeObject.h +--- a/thunderbird/mozilla/js/src/vm/ScopeObject.h 2015-05-09 08:50:19.900741697 +0200 ++++ b/thunderbird/mozilla/js/src/vm/ScopeObject.h 2015-05-28 11:25:07.771027783 +0200 +@@ -63,21 +63,9 @@ + bool onNamedLambda; + + public: +- StaticScopeIter(ExclusiveContext* cx, JSObject* obj) +- : obj(cx, obj), onNamedLambda(false) +- { +- JS_STATIC_ASSERT(allowGC == CanGC); +- JS_ASSERT_IF(obj, obj->is() || obj->is() || +- obj->is()); +- } ++ StaticScopeIter(ExclusiveContext *cx, JSObject *obj); + +- StaticScopeIter(JSObject* obj) +- : obj((ExclusiveContext*) nullptr, obj), onNamedLambda(false) +- { +- JS_STATIC_ASSERT(allowGC == NoGC); +- JS_ASSERT_IF(obj, obj->is() || obj->is() || +- obj->is()); +- } ++ explicit StaticScopeIter(JSObject *obj); + + bool done() const; + void operator++(int); +diff -ur a/thunderbird/mozilla/js/src/vm/ScopeObject-inl.h b/thunderbird/mozilla/js/src/vm/ScopeObject-inl.h +--- a/thunderbird/mozilla/js/src/vm/ScopeObject-inl.h 2015-05-09 08:50:19.898741750 +0200 ++++ b/thunderbird/mozilla/js/src/vm/ScopeObject-inl.h 2015-05-28 11:25:07.771027783 +0200 +@@ -13,6 +13,26 @@ + + namespace js { + ++template ++inline ++StaticScopeIter::StaticScopeIter(ExclusiveContext *cx, JSObject *obj) ++ : obj(cx, obj), onNamedLambda(false) ++{ ++ JS_STATIC_ASSERT(allowGC == CanGC); ++ JS_ASSERT_IF(obj, obj->is() || obj->is() || ++ obj->is()); ++} ++ ++template ++inline ++StaticScopeIter::StaticScopeIter(JSObject *obj) ++ : obj((ExclusiveContext *) nullptr, obj), onNamedLambda(false) ++{ ++ JS_STATIC_ASSERT(allowGC == NoGC); ++ JS_ASSERT_IF(obj, obj->is() || obj->is() || ++ obj->is()); ++} ++ + inline void + ScopeObject::setAliasedVar(JSContext* cx, ScopeCoordinate sc, PropertyName* name, const Value& v) + { +diff -ur a/thunderbird/mozilla/js/xpconnect/wrappers/XrayWrapper.cpp b/thunderbird/mozilla/js/xpconnect/wrappers/XrayWrapper.cpp +--- a/thunderbird/mozilla/js/xpconnect/wrappers/XrayWrapper.cpp 2015-05-09 08:50:15.061869076 +0200 ++++ b/thunderbird/mozilla/js/xpconnect/wrappers/XrayWrapper.cpp 2015-05-28 11:25:07.775027837 +0200 +@@ -351,7 +351,7 @@ + { + JSAutoCompartment ac(cx, target); + if (!JS_GetClassPrototype(cx, key, protop)) +- return nullptr; ++ return false; + } + return JS_WrapObject(cx, protop); + } +Only in b/thunderbird/mozilla/js/xpconnect/wrappers: XrayWrapper.cpp.orig +diff -ur a/thunderbird/mozilla/netwerk/ipc/NeckoParent.cpp b/thunderbird/mozilla/netwerk/ipc/NeckoParent.cpp +--- a/thunderbird/mozilla/netwerk/ipc/NeckoParent.cpp 2015-05-09 08:50:16.383834276 +0200 ++++ b/thunderbird/mozilla/netwerk/ipc/NeckoParent.cpp 2015-05-28 11:25:07.775027837 +0200 +@@ -359,7 +359,7 @@ + RtspChannelParent* p = static_cast(aActor); + return p->Init(aConnectArgs); + #else +- return nullptr; ++ return false; + #endif + } +