summaryrefslogtreecommitdiffstats
path: root/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes
diff options
context:
space:
mode:
Diffstat (limited to 'meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes')
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Allow-.js-preference-files-to-set-locked-prefs-with-.patch115
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Allow-webGL-with-mesa-assuming-users-will-have-updat.patch26
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Avoid-spurious-Run-items-in-application-handlers-con.patch57
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-515232-Try-getting-general.useragent.locale-as-a.patch41
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-691898-Use-YARR-interpreter-instead-of-PCRE-on-p.patch285
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-696636-Block-OpenGL-1-drivers-explicitly-to-stee.patch69
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-706724-Fix-for-error-ftruncate-was-not-declared-.patch26
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-709259-Try-creating-a-named-cursor-before-a-bitm.patch85
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-720682-Don-t-crash-an-app-using-libxul-because-o.patch23
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-722127-Bump-required-libvpx-version-to-1.0.0.-r-.patch47
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-725655-gcc-4.7-build-failures-missing-headers-.-.patch52
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-728229-Allow-to-build-with-system-python-ply-lib.patch82
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-729817-Allow-the-Nouveau-driver-with-Mesa-8.0.1-.patch24
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-729817-Block-the-Nouveau-3D-driver-as-it-s-insta.patch56
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-734490-fix-build-failures-with-Clang-and-GCC-4.7.patch76
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-747322-Fix-jemalloc-mmap-wrapper-for-s390x.patch25
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-761082-Only-export-TabMessageUtils.h-in-mozilla-.patch49
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Fix-some-tests-using-CurProcD-where-GreD-should-be-u.patch49
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Load-dependent-libraries-with-their-real-path-to-avo.patch23
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Properly-launch-applications-set-in-HOME-.mailcap.patch47
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/bug-693343-a11y-disabled-in-Gnome-3-when-GNOME_ACCES.patch351
21 files changed, 1608 insertions, 0 deletions
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Allow-.js-preference-files-to-set-locked-prefs-with-.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Allow-.js-preference-files-to-set-locked-prefs-with-.patch
new file mode 100644
index 0000000..78190c4
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Allow-.js-preference-files-to-set-locked-prefs-with-.patch
@@ -0,0 +1,115 @@
1From: Mike Hommey <glandium@debian.org>
2Date: Sat, 21 Jun 2008 02:48:46 +0200
3Subject: Allow .js preference files to set locked prefs with lockPref()
4
5---
6 modules/libpref/src/prefapi.cpp | 5 ++++-
7 modules/libpref/src/prefapi.h | 3 ++-
8 modules/libpref/src/prefread.cpp | 11 ++++++++---
9 modules/libpref/src/prefread.h | 6 ++++--
10 4 files changed, 18 insertions(+), 7 deletions(-)
11
12diff --git a/modules/libpref/src/prefapi.cpp b/modules/libpref/src/prefapi.cpp
13index 5ecc914..885bdf4 100644
14--- a/modules/libpref/src/prefapi.cpp
15+++ b/modules/libpref/src/prefapi.cpp
16@@ -976,7 +976,10 @@ void PREF_ReaderCallback(void *closure,
17 const char *pref,
18 PrefValue value,
19 PrefType type,
20- bool isDefault)
21+ bool isDefault,
22+ bool isLocked)
23 {
24 pref_HashPref(pref, value, type, isDefault);
25+ if (isLocked)
26+ PREF_LockPref(pref, true);
27 }
28diff --git a/modules/libpref/src/prefapi.h b/modules/libpref/src/prefapi.h
29index 22a88d3..2b20c4e 100644
30--- a/modules/libpref/src/prefapi.h
31+++ b/modules/libpref/src/prefapi.h
32@@ -208,7 +208,8 @@ void PREF_ReaderCallback( void *closure,
33 const char *pref,
34 PrefValue value,
35 PrefType type,
36- bool isDefault);
37+ bool isDefault,
38+ bool isLocked);
39
40 PR_END_EXTERN_C
41 #endif
42diff --git a/modules/libpref/src/prefread.cpp b/modules/libpref/src/prefread.cpp
43index 893d256..d4ef51a 100644
44--- a/modules/libpref/src/prefread.cpp
45+++ b/modules/libpref/src/prefread.cpp
46@@ -75,6 +75,7 @@ enum {
47 #define BITS_PER_HEX_DIGIT 4
48
49 static const char kUserPref[] = "user_pref";
50+static const char kLockPref[] = "lockPref";
51 static const char kPref[] = "pref";
52 static const char kTrue[] = "true";
53 static const char kFalse[] = "false";
54@@ -161,7 +162,7 @@ pref_DoCallback(PrefParseState *ps)
55 default:
56 break;
57 }
58- (*ps->reader)(ps->closure, ps->lb, value, ps->vtype, ps->fdefault);
59+ (*ps->reader)(ps->closure, ps->lb, value, ps->vtype, ps->fdefault, ps->flock);
60 return true;
61 }
62
63@@ -220,6 +221,7 @@ PREF_ParseBuf(PrefParseState *ps, const char *buf, int bufLen)
64 ps->vb = NULL;
65 ps->vtype = PREF_INVALID;
66 ps->fdefault = false;
67+ ps->flock = false;
68 }
69 switch (c) {
70 case '/': /* begin comment block or line? */
71@@ -230,7 +232,9 @@ PREF_ParseBuf(PrefParseState *ps, const char *buf, int bufLen)
72 break;
73 case 'u': /* indicating user_pref */
74 case 'p': /* indicating pref */
75- ps->smatch = (c == 'u' ? kUserPref : kPref);
76+ case 'l': /* indicating lockPref */
77+ ps->smatch = (c == 'u' ? kUserPref :
78+ (c == 'p' ? kPref : kLockPref));
79 ps->sindex = 1;
80 ps->nextstate = PREF_PARSE_UNTIL_OPEN_PAREN;
81 state = PREF_PARSE_MATCH_STRING;
82@@ -274,7 +278,8 @@ PREF_ParseBuf(PrefParseState *ps, const char *buf, int bufLen)
83 /* name parsing */
84 case PREF_PARSE_UNTIL_NAME:
85 if (c == '\"' || c == '\'') {
86- ps->fdefault = (ps->smatch == kPref);
87+ ps->fdefault = (ps->smatch != kUserPref);
88+ ps->flock = (ps->smatch == kLockPref);
89 ps->quotechar = c;
90 ps->nextstate = PREF_PARSE_UNTIL_COMMA; /* return here when done */
91 state = PREF_PARSE_QUOTED_STRING;
92diff --git a/modules/libpref/src/prefread.h b/modules/libpref/src/prefread.h
93index 50f4d54..93a1702 100644
94--- a/modules/libpref/src/prefread.h
95+++ b/modules/libpref/src/prefread.h
96@@ -62,7 +62,8 @@ typedef void (*PrefReader)(void *closure,
97 const char *pref,
98 PrefValue val,
99 PrefType type,
100- bool defPref);
101+ bool defPref,
102+ bool lockPref);
103
104 /* structure fields are private */
105 typedef struct PrefParseState {
106@@ -82,7 +83,8 @@ typedef struct PrefParseState {
107 char *lbend; /* line buffer end */
108 char *vb; /* value buffer (ptr into lb) */
109 PrefType vtype; /* PREF_STRING,INT,BOOL */
110- bool fdefault; /* true if (default) pref */
111+ bool fdefault; /* true if (default) pref */
112+ bool flock; /* true if pref to be locked */
113 } PrefParseState;
114
115 /**
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Allow-webGL-with-mesa-assuming-users-will-have-updat.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Allow-webGL-with-mesa-assuming-users-will-have-updat.patch
new file mode 100644
index 0000000..54ec57d
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Allow-webGL-with-mesa-assuming-users-will-have-updat.patch
@@ -0,0 +1,26 @@
1From: Mike Hommey <mh@glandium.org>
2Date: Fri, 31 Aug 2012 09:01:08 +0200
3Subject: Allow webGL with mesa, assuming users will have updated to 8.0.4-2
4 on wheezy
5
6The version in squeeze-backports is not affected by CVE-2012-2864, and the
7version in squeeze is blacklisted.
8---
9 widget/src/xpwidgets/GfxInfoX11.cpp | 4 ----
10 1 file changed, 4 deletions(-)
11
12diff --git a/widget/src/xpwidgets/GfxInfoX11.cpp b/widget/src/xpwidgets/GfxInfoX11.cpp
13index a2d5e0b..27a0fd0 100644
14--- a/widget/src/xpwidgets/GfxInfoX11.cpp
15+++ b/widget/src/xpwidgets/GfxInfoX11.cpp
16@@ -310,10 +310,6 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature,
17 }
18
19 if (mIsMesa) {
20- if (aFeature == nsIGfxInfo::FEATURE_WEBGL_OPENGL) {
21- *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
22- aSuggestedDriverVersion.AssignLiteral("Not Mesa");
23- }
24 if (mIsNouveau && version(mMajorVersion, mMinorVersion) < version(8,0)) {
25 *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
26 aSuggestedDriverVersion.AssignLiteral("Mesa 8.0");
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Avoid-spurious-Run-items-in-application-handlers-con.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Avoid-spurious-Run-items-in-application-handlers-con.patch
new file mode 100644
index 0000000..6225dad
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Avoid-spurious-Run-items-in-application-handlers-con.patch
@@ -0,0 +1,57 @@
1From: Mike Hommey <glandium@debian.org>
2Date: Thu, 10 Jul 2008 21:40:08 +0200
3Subject: Avoid spurious "Run" items in application handlers configuration
4 pane
5
6---
7 browser/components/preferences/applications.js | 1 +
8 uriloader/exthandler/nsHandlerService.js | 11 +++++------
9 2 files changed, 6 insertions(+), 6 deletions(-)
10
11diff --git a/browser/components/preferences/applications.js b/browser/components/preferences/applications.js
12index abfec20..40cd81a 100644
13--- a/browser/components/preferences/applications.js
14+++ b/browser/components/preferences/applications.js
15@@ -1345,6 +1345,7 @@ var gApplicationsPane = {
16 return aExecutable &&
17 aExecutable.exists() &&
18 aExecutable.isExecutable() &&
19+ aExecutable.isFile() &&
20 // XXXben - we need to compare this with the running instance executable
21 // just don't know how to do that via script...
22 // XXXmano TBD: can probably add this to nsIShellService
23diff --git a/uriloader/exthandler/nsHandlerService.js b/uriloader/exthandler/nsHandlerService.js
24index c4e62f6..589ba31 100644
25--- a/uriloader/exthandler/nsHandlerService.js
26+++ b/uriloader/exthandler/nsHandlerService.js
27@@ -658,25 +658,24 @@ HandlerService.prototype = {
28
29 try {
30 file.initWithPath(aPath);
31-
32- if (file.exists())
33- return file;
34 }
35 catch(ex) {
36 // Note: for historical reasons, we don't actually check to see
37 // if the exception is NS_ERROR_FILE_UNRECOGNIZED_PATH, which is what
38 // nsILocalFile::initWithPath throws when a path is relative.
39-
40 file = this._dirSvc.get("XCurProcD", Ci.nsIFile);
41
42 try {
43 file.append(aPath);
44- if (file.exists())
45- return file;
46 }
47 catch(ex) {}
48 }
49
50+ if (file && file.exists() &&
51+ file.isExecutable() &&
52+ file.isFile())
53+ return file;
54+
55 return null;
56 },
57
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-515232-Try-getting-general.useragent.locale-as-a.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-515232-Try-getting-general.useragent.locale-as-a.patch
new file mode 100644
index 0000000..87cf894
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-515232-Try-getting-general.useragent.locale-as-a.patch
@@ -0,0 +1,41 @@
1From: Mike Hommey <mh@glandium.org>
2Date: Sun, 26 Feb 2012 09:20:44 +0100
3Subject: Bug 515232 - Try getting general.useragent.locale as a complex value
4 first in DirectoryProvider.cpp
5
6---
7 browser/components/dirprovider/DirectoryProvider.cpp | 14 +++++++++++++-
8 1 file changed, 13 insertions(+), 1 deletion(-)
9
10diff --git a/browser/components/dirprovider/DirectoryProvider.cpp b/browser/components/dirprovider/DirectoryProvider.cpp
11index 1373adc..5df1419 100644
12--- a/browser/components/dirprovider/DirectoryProvider.cpp
13+++ b/browser/components/dirprovider/DirectoryProvider.cpp
14@@ -56,6 +56,7 @@
15 #include "nsServiceManagerUtils.h"
16 #include "nsStringAPI.h"
17 #include "nsXULAppAPI.h"
18+#include "nsIPrefLocalizedString.h"
19
20 namespace mozilla {
21 namespace browser {
22@@ -200,7 +201,18 @@ AppendDistroSearchDirs(nsIProperties* aDirSvc, nsCOMArray<nsIFile> &array)
23 localePlugins->AppendNative(NS_LITERAL_CSTRING("locale"));
24
25 nsCString locale;
26- rv = prefs->GetCharPref("general.useragent.locale", getter_Copies(locale));
27+ nsCOMPtr<nsIPrefLocalizedString> prefString;
28+ rv = prefs->GetComplexValue("general.useragent.locale",
29+ NS_GET_IID(nsIPrefLocalizedString),
30+ getter_AddRefs(prefString));
31+ if (NS_SUCCEEDED(rv)) {
32+ nsAutoString wLocale;
33+ prefString->GetData(getter_Copies(wLocale));
34+ CopyUTF16toUTF8(wLocale, locale);
35+ } else {
36+ rv = prefs->GetCharPref("general.useragent.locale", getter_Copies(locale));
37+ }
38+
39 if (NS_SUCCEEDED(rv)) {
40
41 nsCOMPtr<nsIFile> curLocalePlugins;
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-691898-Use-YARR-interpreter-instead-of-PCRE-on-p.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-691898-Use-YARR-interpreter-instead-of-PCRE-on-p.patch
new file mode 100644
index 0000000..dab2016
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-691898-Use-YARR-interpreter-instead-of-PCRE-on-p.patch
@@ -0,0 +1,285 @@
1From: Mike Hommey <mh@glandium.org>
2Date: Sat, 24 Dec 2011 09:56:58 +0100
3Subject: Bug 691898 - Use YARR interpreter instead of PCRE on platforms where
4 YARR JIT is not supported
5
6---
7 js/src/Makefile.in | 21 +++++++++++++--------
8 js/src/vm/RegExpObject-inl.h | 28 ++++++----------------------
9 js/src/vm/RegExpObject.cpp | 36 ------------------------------------
10 js/src/vm/RegExpObject.h | 27 ++++++---------------------
11 js/src/yarr/wtfbridge.h | 2 --
12 5 files changed, 25 insertions(+), 89 deletions(-)
13
14diff --git a/js/src/Makefile.in b/js/src/Makefile.in
15index fc48cbd..49f0bdc 100644
16--- a/js/src/Makefile.in
17+++ b/js/src/Makefile.in
18@@ -416,15 +416,20 @@ CPPSRCS += checks.cc \
19
20 ifeq (,$(filter arm% sparc %86 x86_64,$(TARGET_CPU)))
21
22-VPATH += $(srcdir)/yarr/pcre \
23+VPATH += $(srcdir)/assembler \
24+ $(srcdir)/assembler/wtf \
25+ $(srcdir)/yarr \
26 $(NULL)
27
28 CPPSRCS += \
29- pcre_compile.cpp \
30- pcre_exec.cpp \
31- pcre_tables.cpp \
32- pcre_xclass.cpp \
33- pcre_ucp_searchfuncs.cpp \
34+ Assertions.cpp \
35+ OSAllocatorOS2.cpp \
36+ OSAllocatorPosix.cpp \
37+ OSAllocatorWin.cpp \
38+ PageBlock.cpp \
39+ YarrInterpreter.cpp \
40+ YarrPattern.cpp \
41+ YarrSyntaxChecker.cpp \
42 $(NULL)
43 else
44
45@@ -1015,10 +1020,10 @@ endif
46 # Needed to "configure" it correctly. Unfortunately these
47 # flags wind up being applied to all code in js/src, not just
48 # the code in js/src/assembler.
49-CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1
50+CXXFLAGS += -DUSE_SYSTEM_MALLOC=1
51
52 ifneq (,$(ENABLE_YARR_JIT)$(ENABLE_TRACEJIT)$(ENABLE_METHODJIT))
53-CXXFLAGS += -DENABLE_JIT=1
54+CXXFLAGS += -DENABLE_JIT=1 -DENABLE_ASSEMBLER=1
55 endif
56
57 INCLUDES += -I$(srcdir)/assembler -I$(srcdir)/yarr
58diff --git a/js/src/vm/RegExpObject-inl.h b/js/src/vm/RegExpObject-inl.h
59index 5f7817d..91108a7 100644
60--- a/js/src/vm/RegExpObject-inl.h
61+++ b/js/src/vm/RegExpObject-inl.h
62@@ -327,6 +327,7 @@ RegExpPrivate::create(JSContext *cx, JSString *source, RegExpFlag flags, TokenSt
63 return RetType(self);
64 }
65
66+#if ENABLE_YARR_JIT
67 /* This function should be deleted once bad Android platforms phase out. See bug 604774. */
68 inline bool
69 RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx)
70@@ -337,12 +338,12 @@ RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx)
71 return true;
72 #endif
73 }
74+#endif
75
76 inline bool
77 RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts,
78 uintN *parenCount, RegExpFlag flags)
79 {
80-#if ENABLE_YARR_JIT
81 /* Parse the pattern. */
82 ErrorCode yarrError;
83 YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag),
84@@ -359,7 +360,7 @@ RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream *
85 * case we have to bytecode compile it.
86 */
87
88-#ifdef JS_METHODJIT
89+#if ENABLE_YARR_JIT && defined(JS_METHODJIT)
90 if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) {
91 if (!cx->compartment->ensureJaegerCompartmentExists(cx))
92 return false;
93@@ -371,21 +372,11 @@ RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream *
94 }
95 #endif
96
97+#if ENABLE_YARR_JIT
98 codeBlock.setFallBack(true);
99+#endif
100 byteCode = byteCompile(yarrPattern, cx->compartment->regExpAllocator).get();
101 return true;
102-#else /* !defined(ENABLE_YARR_JIT) */
103- int error = 0;
104- compiled = jsRegExpCompile(pattern.chars(), pattern.length(),
105- ignoreCase() ? JSRegExpIgnoreCase : JSRegExpDoNotIgnoreCase,
106- multiline() ? JSRegExpMultiline : JSRegExpSingleLine,
107- parenCount, &error);
108- if (error) {
109- reportPCREError(cx, error);
110- return false;
111- }
112- return true;
113-#endif
114 }
115
116 inline bool
117@@ -431,19 +422,12 @@ RegExpPrivateCode::execute(JSContext *cx, const jschar *chars, size_t start, siz
118 else
119 result = JSC::Yarr::execute(codeBlock, chars, start, length, output);
120 #else
121- result = jsRegExpExecute(cx, compiled, chars, length, start, output, outputCount);
122+ result = JSC::Yarr::interpret(byteCode, chars, start, length, output);
123 #endif
124
125 if (result == -1)
126 return Success_NotFound;
127
128-#if !ENABLE_YARR_JIT
129- if (result < 0) {
130- reportPCREError(cx, result);
131- return Error;
132- }
133-#endif
134-
135 JS_ASSERT(result >= 0);
136 return Success;
137 }
138diff --git a/js/src/vm/RegExpObject.cpp b/js/src/vm/RegExpObject.cpp
139index f75c6a5..7631dd5 100644
140--- a/js/src/vm/RegExpObject.cpp
141+++ b/js/src/vm/RegExpObject.cpp
142@@ -251,7 +251,6 @@ Class js::RegExpClass = {
143 NULL /* trace */
144 };
145
146-#if ENABLE_YARR_JIT
147 void
148 RegExpPrivateCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error)
149 {
150@@ -283,41 +282,6 @@ RegExpPrivateCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode err
151 }
152 }
153
154-#else /* !ENABLE_YARR_JIT */
155-
156-void
157-RegExpPrivateCode::reportPCREError(JSContext *cx, int error)
158-{
159-#define REPORT(msg_) \
160- JS_ReportErrorFlagsAndNumberUC(cx, JSREPORT_ERROR, js_GetErrorMessage, NULL, msg_); \
161- return
162- switch (error) {
163- case -2: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
164- case 0: JS_NOT_REACHED("Precondition violation: an error must have occurred.");
165- case 1: REPORT(JSMSG_TRAILING_SLASH);
166- case 2: REPORT(JSMSG_TRAILING_SLASH);
167- case 3: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
168- case 4: REPORT(JSMSG_BAD_QUANTIFIER);
169- case 5: REPORT(JSMSG_BAD_QUANTIFIER);
170- case 6: REPORT(JSMSG_BAD_CLASS_RANGE);
171- case 7: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
172- case 8: REPORT(JSMSG_BAD_CLASS_RANGE);
173- case 9: REPORT(JSMSG_BAD_QUANTIFIER);
174- case 10: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN);
175- case 11: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
176- case 12: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN);
177- case 13: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
178- case 14: REPORT(JSMSG_MISSING_PAREN);
179- case 15: REPORT(JSMSG_BAD_BACKREF);
180- case 16: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
181- case 17: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
182- default:
183- JS_NOT_REACHED("Precondition violation: unknown PCRE error code.");
184- }
185-#undef REPORT
186-}
187-#endif /* ENABLE_YARR_JIT */
188-
189 bool
190 js::ParseRegExpFlags(JSContext *cx, JSString *flagStr, RegExpFlag *flagsOut)
191 {
192diff --git a/js/src/vm/RegExpObject.h b/js/src/vm/RegExpObject.h
193index 1449d56..279f3c0 100644
194--- a/js/src/vm/RegExpObject.h
195+++ b/js/src/vm/RegExpObject.h
196@@ -49,8 +49,6 @@
197 #include "yarr/Yarr.h"
198 #if ENABLE_YARR_JIT
199 #include "yarr/YarrJIT.h"
200-#else
201-#include "yarr/pcre/pcre.h"
202 #endif
203
204 namespace js {
205@@ -153,48 +151,39 @@ ResetRegExpObject(JSContext *cx, AlreadyIncRefed<RegExpPrivate> rep);
206 /* Abstracts away the gross |RegExpPrivate| backend details. */
207 class RegExpPrivateCode
208 {
209-#if ENABLE_YARR_JIT
210 typedef JSC::Yarr::BytecodePattern BytecodePattern;
211 typedef JSC::Yarr::ErrorCode ErrorCode;
212+ typedef JSC::Yarr::YarrPattern YarrPattern;
213+#if ENABLE_YARR_JIT
214 typedef JSC::Yarr::JSGlobalData JSGlobalData;
215 typedef JSC::Yarr::YarrCodeBlock YarrCodeBlock;
216- typedef JSC::Yarr::YarrPattern YarrPattern;
217
218 /* Note: Native code is valid only if |codeBlock.isFallBack() == false|. */
219 YarrCodeBlock codeBlock;
220- BytecodePattern *byteCode;
221-#else
222- JSRegExp *compiled;
223 #endif
224+ BytecodePattern *byteCode;
225
226 public:
227 RegExpPrivateCode()
228 :
229 #if ENABLE_YARR_JIT
230 codeBlock(),
231- byteCode(NULL)
232-#else
233- compiled(NULL)
234 #endif
235+ byteCode(NULL)
236 { }
237
238 ~RegExpPrivateCode() {
239 #if ENABLE_YARR_JIT
240 codeBlock.release();
241+#endif
242 if (byteCode)
243 Foreground::delete_<BytecodePattern>(byteCode);
244-#else
245- if (compiled)
246- jsRegExpFree(compiled);
247-#endif
248 }
249
250 #if ENABLE_YARR_JIT
251 static inline bool isJITRuntimeEnabled(JSContext *cx);
252- void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error);
253-#else
254- void reportPCREError(JSContext *cx, int error);
255 #endif
256+ void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error);
257
258 inline bool compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts, uintN *parenCount,
259 RegExpFlag flags);
260@@ -205,11 +194,7 @@ class RegExpPrivateCode
261 int *output, size_t outputCount);
262
263 static size_t getOutputSize(size_t pairCount) {
264-#if ENABLE_YARR_JIT
265 return pairCount * 2;
266-#else
267- return pairCount * 3; /* Should be x2, but PCRE has... needs. */
268-#endif
269 }
270 };
271
272diff --git a/js/src/yarr/wtfbridge.h b/js/src/yarr/wtfbridge.h
273index ac41d08..fb8eb86 100644
274--- a/js/src/yarr/wtfbridge.h
275+++ b/js/src/yarr/wtfbridge.h
276@@ -49,9 +49,7 @@
277 #include "jsprvtd.h"
278 #include "vm/String.h"
279 #include "assembler/wtf/Platform.h"
280-#if ENABLE_YARR_JIT
281 #include "assembler/jit/ExecutableAllocator.h"
282-#endif
283
284 namespace JSC { namespace Yarr {
285
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-696636-Block-OpenGL-1-drivers-explicitly-to-stee.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-696636-Block-OpenGL-1-drivers-explicitly-to-stee.patch
new file mode 100644
index 0000000..4f0ffc9
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-696636-Block-OpenGL-1-drivers-explicitly-to-stee.patch
@@ -0,0 +1,69 @@
1From: Benoit Jacob <bjacob@mozilla.com>
2Date: Thu, 23 Feb 2012 17:21:30 -0500
3Subject: Bug 696636 - Block OpenGL 1 drivers explicitly to steer clear of
4 crashes - r=mattwoodrow
5
6---
7 widget/src/xpwidgets/GfxInfoX11.cpp | 14 +++++++++++++-
8 widget/src/xpwidgets/GfxInfoX11.h | 2 +-
9 2 files changed, 14 insertions(+), 2 deletions(-)
10
11diff --git a/widget/src/xpwidgets/GfxInfoX11.cpp b/widget/src/xpwidgets/GfxInfoX11.cpp
12index 018b8fa..4974c5f 100644
13--- a/widget/src/xpwidgets/GfxInfoX11.cpp
14+++ b/widget/src/xpwidgets/GfxInfoX11.cpp
15@@ -61,6 +61,7 @@ pid_t glxtest_pid = 0;
16 nsresult
17 GfxInfo::Init()
18 {
19+ mGLMajorVersion = 0;
20 mMajorVersion = 0;
21 mMinorVersion = 0;
22 mRevisionVersion = 0;
23@@ -195,6 +196,9 @@ GfxInfo::GetData()
24 CrashReporter::AppendAppNotesToCrashReport(note);
25 #endif
26
27+ // determine the major OpenGL version. That's the first integer in the version string.
28+ mGLMajorVersion = strtol(mVersion.get(), 0, 10);
29+
30 // determine driver type (vendor) and where in the version string
31 // the actual driver version numbers should be expected to be found (whereToReadVersionNumbers)
32 const char *whereToReadVersionNumbers = nsnull;
33@@ -219,7 +223,7 @@ GfxInfo::GetData()
34 whereToReadVersionNumbers = mVersion.get();
35 }
36
37- // read major.minor version numbers
38+ // read major.minor version numbers of the driver (not to be confused with the OpenGL version)
39 if (whereToReadVersionNumbers) {
40 // copy into writable buffer, for tokenization
41 strncpy(buf, whereToReadVersionNumbers, buf_size);
42@@ -275,6 +279,14 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature,
43
44 OperatingSystem os = DRIVER_OS_LINUX;
45
46+ if (mGLMajorVersion == 1) {
47+ // We're on OpenGL 1. In most cases that indicates really old hardware.
48+ // We better block them, rather than rely on them to fail gracefully, because they don't!
49+ // see bug 696636
50+ *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
51+ return NS_OK;
52+ }
53+
54 // Disable OpenGL layers when we don't have texture_from_pixmap because it regresses performance.
55 if (aFeature == nsIGfxInfo::FEATURE_OPENGL_LAYERS && !mHasTextureFromPixmap) {
56 *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
57diff --git a/widget/src/xpwidgets/GfxInfoX11.h b/widget/src/xpwidgets/GfxInfoX11.h
58index 2525db0..03878ff 100644
59--- a/widget/src/xpwidgets/GfxInfoX11.h
60+++ b/widget/src/xpwidgets/GfxInfoX11.h
61@@ -95,7 +95,7 @@ private:
62 nsCString mAdapterDescription;
63 bool mIsMesa, mIsNVIDIA, mIsFGLRX;
64 bool mHasTextureFromPixmap;
65- int mMajorVersion, mMinorVersion, mRevisionVersion;
66+ int mGLMajorVersion, mMajorVersion, mMinorVersion, mRevisionVersion;
67
68 void AddCrashReportAnnotations();
69 };
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-706724-Fix-for-error-ftruncate-was-not-declared-.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-706724-Fix-for-error-ftruncate-was-not-declared-.patch
new file mode 100644
index 0000000..0d3bd9f
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-706724-Fix-for-error-ftruncate-was-not-declared-.patch
@@ -0,0 +1,26 @@
1From: aceman <acelists@atlas.sk>
2Date: Wed, 11 Jan 2012 10:46:54 +0100
3Subject: =?UTF-8?q?Bug=20706724=20-=20Fix=20for=20error:=20=E2=80=98ftruncat?=
4 =?UTF-8?q?e=E2=80=99=20was=20not=20declared=20in=20this=20scope.=20r=3Dbenj?=
5 =?UTF-8?q?amin?=
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10---
11 ipc/chromium/src/base/file_util.cc | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/ipc/chromium/src/base/file_util.cc b/ipc/chromium/src/base/file_util.cc
15index 1154fed..6067a4a 100644
16--- a/ipc/chromium/src/base/file_util.cc
17+++ b/ipc/chromium/src/base/file_util.cc
18@@ -8,7 +8,7 @@
19 #include <io.h>
20 #endif
21 #include <stdio.h>
22-#if defined(ANDROID)
23+#if defined(ANDROID) || defined(OS_POSIX)
24 #include <unistd.h>
25 #endif
26
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-709259-Try-creating-a-named-cursor-before-a-bitm.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-709259-Try-creating-a-named-cursor-before-a-bitm.patch
new file mode 100644
index 0000000..23c90a2
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-709259-Try-creating-a-named-cursor-before-a-bitm.patch
@@ -0,0 +1,85 @@
1From: Chris Coulson <chrisccoulson@ubuntu.com>
2Date: Wed, 14 Dec 2011 11:34:31 +0100
3Subject: Bug 709259 - Try creating a named cursor before a bitmap cursor.
4 r=karlt
5
6---
7 widget/src/gtk2/nsGtkCursors.h | 31 +++++++++++++++++--------------
8 widget/src/gtk2/nsWindow.cpp | 14 +++++++++++---
9 2 files changed, 28 insertions(+), 17 deletions(-)
10
11diff --git a/widget/src/gtk2/nsGtkCursors.h b/widget/src/gtk2/nsGtkCursors.h
12index b8065eb..eff43ba 100644
13--- a/widget/src/gtk2/nsGtkCursors.h
14+++ b/widget/src/gtk2/nsGtkCursors.h
15@@ -46,6 +46,7 @@ typedef struct {
16 const unsigned char *mask_bits;
17 int hot_x;
18 int hot_y;
19+ const char *hash;
20 } nsGtkCursor;
21
22 /* MOZ_CURSOR_HAND_GRAB */
23@@ -415,21 +416,23 @@ enum {
24 MOZ_CURSOR_NONE
25 };
26
27-// create custom pixmap cursor
28+// create custom pixmap cursor. The hash values must stay in sync with the
29+// bitmap data above. To see the hash function, have a look at XcursorImageHash
30+// in libXcursor
31 static const nsGtkCursor GtkCursors[] = {
32- { moz_hand_grab_bits, moz_hand_grab_mask_bits, 10, 10 },
33- { moz_hand_grabbing_bits, moz_hand_grabbing_mask_bits, 10, 10 },
34- { moz_copy_bits, moz_copy_mask_bits, 2, 2 },
35- { moz_alias_bits, moz_alias_mask_bits, 2, 2 },
36- { moz_menu_bits, moz_menu_mask_bits, 2, 2 },
37- { moz_spinning_bits, moz_spinning_mask_bits, 2, 2 },
38- { moz_zoom_in_bits, moz_zoom_in_mask_bits, 6, 6 },
39- { moz_zoom_out_bits, moz_zoom_out_mask_bits, 6, 6 },
40- { moz_not_allowed_bits, moz_not_allowed_mask_bits, 9, 9 },
41- { moz_vertical_text_bits, moz_vertical_text_mask_bits, 8, 4 },
42- { moz_nesw_resize_bits, moz_nesw_resize_mask_bits, 8, 8 },
43- { moz_nwse_resize_bits, moz_nwse_resize_mask_bits, 8, 8 },
44- { moz_none_bits, moz_none_mask_bits, 0, 0 }
45+ { moz_hand_grab_bits, moz_hand_grab_mask_bits, 10, 10, "5aca4d189052212118709018842178c0" },
46+ { moz_hand_grabbing_bits, moz_hand_grabbing_mask_bits, 10, 10, "208530c400c041818281048008011002" },
47+ { moz_copy_bits, moz_copy_mask_bits, 2, 2, "08ffe1cb5fe6fc01f906f1c063814ccf" },
48+ { moz_alias_bits, moz_alias_mask_bits, 2, 2, "0876e1c15ff2fc01f906f1c363074c0f" },
49+ { moz_menu_bits, moz_menu_mask_bits, 2, 2, "08ffe1e65f80fcfdf9fff11263e74c48" },
50+ { moz_spinning_bits, moz_spinning_mask_bits, 2, 2, "08e8e1c95fe2fc01f976f1e063a24ccd" },
51+ { moz_zoom_in_bits, moz_zoom_in_mask_bits, 6, 6, "f41c0e382c94c0958e07017e42b00462" },
52+ { moz_zoom_out_bits, moz_zoom_out_mask_bits, 6, 6, "f41c0e382c97c0938e07017e42800402" },
53+ { moz_not_allowed_bits, moz_not_allowed_mask_bits, 9, 9, "03b6e0fcb3499374a867d041f52298f0" },
54+ { moz_vertical_text_bits, moz_vertical_text_mask_bits, 8, 4, "048008013003cff3c00c801001200000" },
55+ { moz_nesw_resize_bits, moz_nesw_resize_mask_bits, 8, 8, "50585d75b494802d0151028115016902" },
56+ { moz_nwse_resize_bits, moz_nwse_resize_mask_bits, 8, 8, "38c5dff7c7b8962045400281044508d2" },
57+ { moz_none_bits, moz_none_mask_bits, 0, 0, NULL }
58 };
59
60 #endif /* nsGtkCursors_h__ */
61diff --git a/widget/src/gtk2/nsWindow.cpp b/widget/src/gtk2/nsWindow.cpp
62index 2fd6f64..25f1c2a 100644
63--- a/widget/src/gtk2/nsWindow.cpp
64+++ b/widget/src/gtk2/nsWindow.cpp
65@@ -5602,9 +5602,17 @@ get_gtk_cursor(nsCursor aCursor)
66 break;
67 }
68
69- // if by now we don't have a xcursor, this means we have to make a
70- // custom one
71- if (newType != 0xff) {
72+ // If by now we don't have a xcursor, this means we have to make a custom
73+ // one. First, we try creating a named cursor based on the hash of our
74+ // custom bitmap, as libXcursor has some magic to convert bitmapped cursors
75+ // to themed cursors
76+ if (newType != 0xFF && GtkCursors[newType].hash) {
77+ gdkcursor = gdk_cursor_new_from_name(gdk_display_get_default(),
78+ GtkCursors[newType].hash);
79+ }
80+
81+ // If we still don't have a xcursor, we now really create a bitmap cursor
82+ if (newType != 0xff && !gdkcursor) {
83 GdkPixbuf * cursor_pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, 32, 32);
84 if (!cursor_pixbuf)
85 return NULL;
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-720682-Don-t-crash-an-app-using-libxul-because-o.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-720682-Don-t-crash-an-app-using-libxul-because-o.patch
new file mode 100644
index 0000000..7bc22a6
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-720682-Don-t-crash-an-app-using-libxul-because-o.patch
@@ -0,0 +1,23 @@
1From: Mike Hommey <mh@glandium.org>
2Date: Sat, 25 Feb 2012 10:34:52 +0100
3Subject: Bug 720682 - Don't crash an app using libxul because of the lack of
4 je_malloc_usable_size_in_advance
5
6---
7 storage/src/mozStorageService.cpp | 3 ++-
8 1 file changed, 2 insertions(+), 1 deletion(-)
9
10diff --git a/storage/src/mozStorageService.cpp b/storage/src/mozStorageService.cpp
11index 7c0a7a0..8a1aa65 100644
12--- a/storage/src/mozStorageService.cpp
13+++ b/storage/src/mozStorageService.cpp
14@@ -367,7 +367,8 @@ static int sqliteMemSize(void* p)
15
16 static int sqliteMemRoundup(int n)
17 {
18- n = je_malloc_usable_size_in_advance(n);
19+ if (je_malloc_usable_size_in_advance)
20+ n = je_malloc_usable_size_in_advance(n);
21
22 // jemalloc can return blocks of size 2 and 4, but SQLite requires that all
23 // allocations be 8-aligned. So we round up sub-8 requests to 8. This
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-722127-Bump-required-libvpx-version-to-1.0.0.-r-.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-722127-Bump-required-libvpx-version-to-1.0.0.-r-.patch
new file mode 100644
index 0000000..cef3817
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-722127-Bump-required-libvpx-version-to-1.0.0.-r-.patch
@@ -0,0 +1,47 @@
1From: ojab <ojab@ojab.ru>
2Date: Mon, 30 Jan 2012 15:53:21 +0100
3Subject: Bug 722127 - Bump required libvpx version to 1.0.0. r=tterribe
4
5---
6 configure.in | 12 ++++++------
7 1 file changed, 6 insertions(+), 6 deletions(-)
8
9diff --git a/configure.in b/configure.in
10index 6b155e0..d83926e 100644
11--- a/configure.in
12+++ b/configure.in
13@@ -5616,20 +5616,20 @@ if test -n "$MOZ_WEBM"; then
14 [MOZ_NATIVE_LIBVPX_DEC_TEST=1],
15 ([--with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found]))
16 if test -n "$MOZ_NATIVE_LIBVPX_DEC_TEST" ; then
17- AC_MSG_CHECKING([for libvpx version >= v0.9.7])
18+ AC_MSG_CHECKING([for libvpx version >= v1.0.0])
19 dnl We need at least v0.9.7 to fix several crash bugs (for which we
20- dnl had local patches prior to v0.9.7).
21+ dnl had local patches prior to v1.0.0).
22 dnl
23 dnl This is a terrible test for the library version, but we don't
24 dnl have a good one. There is no version number in a public header,
25 dnl and testing the headers still doesn't guarantee we link against
26 dnl the right version. While we could call vpx_codec_version() at
27 dnl run-time, that would break cross-compiling. There are no
28- dnl additional exported symbols between the v0.9.7 release and the
29- dnl v0.9.6 one to check for.
30+ dnl additional exported decoder symbols between the v1.0.0 release
31+ dnl and the v0.9.7 one to check for.
32 AC_TRY_COMPILE([
33 #include <vpx/vpx_decoder.h>
34- #if !defined(VPX_CODEC_USE_INPUT_PARTITION)
35+ #if !defined(VPX_CODEC_USE_INPUT_FRAGMENTS)
36 #error "test failed."
37 #endif
38 ],
39@@ -5639,7 +5639,7 @@ if test -n "$MOZ_WEBM"; then
40 MOZ_LIBVPX_INCLUDES="-I${LIBVPX_DIR}/include"
41 MOZ_LIBVPX_LIBS="-L${LIBVPX_DIR}/lib -lvpx"],
42 [AC_MSG_RESULT([no])
43- AC_MSG_ERROR([--with-system-libvpx requested but it is not v0.9.7 or later])])
44+ AC_MSG_ERROR([--with-system-libvpx requested but it is not v1.0.0 or later])])
45 fi
46 CFLAGS=$_SAVE_CFLAGS
47 LDFLAGS=$_SAVE_LDFLAGS
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-725655-gcc-4.7-build-failures-missing-headers-.-.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-725655-gcc-4.7-build-failures-missing-headers-.-.patch
new file mode 100644
index 0000000..1db1a28
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-725655-gcc-4.7-build-failures-missing-headers-.-.patch
@@ -0,0 +1,52 @@
1From: =?UTF-8?q?Martin=20Str=C3=A1nsk=C3=BD?= <stransky@redhat.com>
2Date: Fri, 10 Feb 2012 16:07:41 +0100
3Subject: Bug 725655 - gcc 4.7 build failures (missing headers). r=benjamin
4
5---
6 ipc/chromium/src/base/file_util_linux.cc | 3 +++
7 ipc/chromium/src/base/message_pump_libevent.cc | 3 +++
8 ipc/chromium/src/base/time_posix.cc | 3 +++
9 3 files changed, 9 insertions(+)
10
11diff --git a/ipc/chromium/src/base/file_util_linux.cc b/ipc/chromium/src/base/file_util_linux.cc
12index cca706f..171e44f 100644
13--- a/ipc/chromium/src/base/file_util_linux.cc
14+++ b/ipc/chromium/src/base/file_util_linux.cc
15@@ -5,6 +5,9 @@
16 #include "base/file_util.h"
17
18 #include <fcntl.h>
19+#if defined(ANDROID) || defined(OS_POSIX)
20+#include <unistd.h>
21+#endif
22
23 #include <string>
24 #include <vector>
25diff --git a/ipc/chromium/src/base/message_pump_libevent.cc b/ipc/chromium/src/base/message_pump_libevent.cc
26index 6194f79..9f31dbb 100644
27--- a/ipc/chromium/src/base/message_pump_libevent.cc
28+++ b/ipc/chromium/src/base/message_pump_libevent.cc
29@@ -6,6 +6,9 @@
30
31 #include <errno.h>
32 #include <fcntl.h>
33+#if defined(ANDROID) || defined(OS_POSIX)
34+#include <unistd.h>
35+#endif
36
37 #include "eintr_wrapper.h"
38 #include "base/logging.h"
39diff --git a/ipc/chromium/src/base/time_posix.cc b/ipc/chromium/src/base/time_posix.cc
40index 8d1a1d5..abf2a56 100644
41--- a/ipc/chromium/src/base/time_posix.cc
42+++ b/ipc/chromium/src/base/time_posix.cc
43@@ -13,6 +13,9 @@
44 #else
45 #include <time.h>
46 #endif
47+#if defined(ANDROID) || defined(OS_POSIX)
48+#include <unistd.h>
49+#endif
50
51 #include <limits>
52
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-728229-Allow-to-build-with-system-python-ply-lib.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-728229-Allow-to-build-with-system-python-ply-lib.patch
new file mode 100644
index 0000000..b3e4c52
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-728229-Allow-to-build-with-system-python-ply-lib.patch
@@ -0,0 +1,82 @@
1From: Mike Hommey <mh@glandium.org>
2Date: Fri, 17 Feb 2012 16:53:34 +0100
3Subject: Bug 728229 - Allow to build with system python ply library
4
5---
6 config/autoconf.mk.in | 2 ++
7 configure.in | 10 ++++++++++
8 xpcom/idl-parser/Makefile.in | 2 ++
9 xpcom/typelib/xpidl/Makefile.in | 2 ++
10 4 files changed, 16 insertions(+)
11
12diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in
13index fccb1a9..e13dce4 100644
14--- a/config/autoconf.mk.in
15+++ b/config/autoconf.mk.in
16@@ -685,6 +685,8 @@ JS_SHARED_LIBRARY = @JS_SHARED_LIBRARY@
17
18 MOZ_INSTRUMENT_EVENT_LOOP = @MOZ_INSTRUMENT_EVENT_LOOP@
19
20+MOZ_SYSTEM_PLY = @MOZ_SYSTEM_PLY@
21+
22 # We only want to do the pymake sanity on Windows, other os's can cope
23 ifeq ($(HOST_OS_ARCH),WINNT)
24 # Ensure invariants between GNU Make and pymake
25diff --git a/configure.in b/configure.in
26index d83926e..3c32ae8 100644
27--- a/configure.in
28+++ b/configure.in
29@@ -1021,6 +1021,16 @@ if test -z "$PYTHON"; then
30 AC_MSG_ERROR([python was not found in \$PATH])
31 fi
32
33+MOZ_ARG_WITH_BOOL(system-ply,
34+[ --with-system-ply Use system installed python ply library],
35+ [if $PYTHON -c 'import ply' 2>&5; then
36+ MOZ_SYSTEM_PLY=1
37+ else
38+ AC_MSG_ERROR([python ply library is not found but --with-system-ply was requested])
39+ fi])
40+
41+AC_SUBST(MOZ_SYSTEM_PLY)
42+
43 if test -z "$COMPILE_ENVIRONMENT"; then
44 NSINSTALL_BIN='$(PYTHON) $(topsrcdir)/config/nsinstall.py'
45 fi
46diff --git a/xpcom/idl-parser/Makefile.in b/xpcom/idl-parser/Makefile.in
47index 20ca148..f5ff178 100644
48--- a/xpcom/idl-parser/Makefile.in
49+++ b/xpcom/idl-parser/Makefile.in
50@@ -47,10 +47,12 @@ PARSER_SRCS = \
51 xpidl.py \
52 $(NULL)
53
54+ifndef MOZ_SYSTEM_PLY
55 PLY_PROGS = \
56 $(topsrcdir)/other-licenses/ply/ply/lex.py \
57 $(topsrcdir)/other-licenses/ply/ply/yacc.py \
58 $(NULL)
59+endif
60
61 include $(topsrcdir)/config/rules.mk
62
63diff --git a/xpcom/typelib/xpidl/Makefile.in b/xpcom/typelib/xpidl/Makefile.in
64index 30f1a66..bcae13a 100644
65--- a/xpcom/typelib/xpidl/Makefile.in
66+++ b/xpcom/typelib/xpidl/Makefile.in
67@@ -52,6 +52,7 @@ SDK_BINARY = \
68 $(DEPTH)/xpcom/idl-parser/xpidlyacc.py \
69 $(NULL)
70
71+ifndef MOZ_SYSTEM_PLY
72 $(SDK_BIN_DIR)/ply::
73 $(NSINSTALL) -D $@
74
75@@ -63,6 +64,7 @@ PLY_SRCS = \
76
77 export:: $(PLY_SRCS) $(SDK_BIN_DIR)/ply
78 $(INSTALL) $(IFLAGS2) $^
79+endif
80
81 include $(topsrcdir)/config/rules.mk
82
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-729817-Allow-the-Nouveau-driver-with-Mesa-8.0.1-.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-729817-Allow-the-Nouveau-driver-with-Mesa-8.0.1-.patch
new file mode 100644
index 0000000..40b010d
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-729817-Allow-the-Nouveau-driver-with-Mesa-8.0.1-.patch
@@ -0,0 +1,24 @@
1From: Zack Weinberg <zackw@panix.com>
2Date: Fri, 9 Mar 2012 11:07:16 +0100
3Subject: Bug 729817 - Allow the Nouveau driver with Mesa >= 8.0.1 - r=bjacob
4
5---
6 widget/src/xpwidgets/GfxInfoX11.cpp | 4 ++--
7 1 file changed, 2 insertions(+), 2 deletions(-)
8
9diff --git a/widget/src/xpwidgets/GfxInfoX11.cpp b/widget/src/xpwidgets/GfxInfoX11.cpp
10index c6b2ad3..a2d5e0b 100644
11--- a/widget/src/xpwidgets/GfxInfoX11.cpp
12+++ b/widget/src/xpwidgets/GfxInfoX11.cpp
13@@ -314,9 +314,9 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature,
14 *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
15 aSuggestedDriverVersion.AssignLiteral("Not Mesa");
16 }
17- if (mIsNouveau) {
18+ if (mIsNouveau && version(mMajorVersion, mMinorVersion) < version(8,0)) {
19 *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
20- aSuggestedDriverVersion.AssignLiteral("<Not the Nouveau driver>");
21+ aSuggestedDriverVersion.AssignLiteral("Mesa 8.0");
22 } else if (version(mMajorVersion, mMinorVersion, mRevisionVersion) < version(7,10,3)) {
23 *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
24 aSuggestedDriverVersion.AssignLiteral("Mesa 7.10.3");
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-729817-Block-the-Nouveau-3D-driver-as-it-s-insta.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-729817-Block-the-Nouveau-3D-driver-as-it-s-insta.patch
new file mode 100644
index 0000000..7e2f3a6
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-729817-Block-the-Nouveau-3D-driver-as-it-s-insta.patch
@@ -0,0 +1,56 @@
1From: Benoit Jacob <bjacob@mozilla.com>
2Date: Thu, 23 Feb 2012 17:23:29 -0500
3Subject: Bug 729817 - Block the Nouveau 3D driver as it's installed by
4 default on OpenSuse 12.1 and crashes - r=mattwoodrow
5
6---
7 widget/src/xpwidgets/GfxInfoX11.cpp | 8 +++++++-
8 widget/src/xpwidgets/GfxInfoX11.h | 2 +-
9 2 files changed, 8 insertions(+), 2 deletions(-)
10
11diff --git a/widget/src/xpwidgets/GfxInfoX11.cpp b/widget/src/xpwidgets/GfxInfoX11.cpp
12index 4974c5f..c6b2ad3 100644
13--- a/widget/src/xpwidgets/GfxInfoX11.cpp
14+++ b/widget/src/xpwidgets/GfxInfoX11.cpp
15@@ -68,6 +68,7 @@ GfxInfo::Init()
16 mIsMesa = false;
17 mIsNVIDIA = false;
18 mIsFGLRX = false;
19+ mIsNouveau = false;
20 mHasTextureFromPixmap = false;
21 return GfxInfoBase::Init();
22 }
23@@ -208,6 +209,8 @@ GfxInfo::GetData()
24 // with Mesa, the version string contains "Mesa major.minor" and that's all the version information we get:
25 // there is no actual driver version info.
26 whereToReadVersionNumbers = Mesa_in_version_string + strlen("Mesa");
27+ if (strcasestr(mVendor.get(), "nouveau"))
28+ mIsNouveau = true;
29 } else if (strstr(mVendor.get(), "NVIDIA Corporation")) {
30 mIsNVIDIA = true;
31 // with the NVIDIA driver, the version string contains "NVIDIA major.minor"
32@@ -311,7 +314,10 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature,
33 *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
34 aSuggestedDriverVersion.AssignLiteral("Not Mesa");
35 }
36- if (version(mMajorVersion, mMinorVersion, mRevisionVersion) < version(7,10,3)) {
37+ if (mIsNouveau) {
38+ *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
39+ aSuggestedDriverVersion.AssignLiteral("<Not the Nouveau driver>");
40+ } else if (version(mMajorVersion, mMinorVersion, mRevisionVersion) < version(7,10,3)) {
41 *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
42 aSuggestedDriverVersion.AssignLiteral("Mesa 7.10.3");
43 }
44diff --git a/widget/src/xpwidgets/GfxInfoX11.h b/widget/src/xpwidgets/GfxInfoX11.h
45index 03878ff..68bf976 100644
46--- a/widget/src/xpwidgets/GfxInfoX11.h
47+++ b/widget/src/xpwidgets/GfxInfoX11.h
48@@ -93,7 +93,7 @@ private:
49 nsCString mRenderer;
50 nsCString mVersion;
51 nsCString mAdapterDescription;
52- bool mIsMesa, mIsNVIDIA, mIsFGLRX;
53+ bool mIsMesa, mIsNVIDIA, mIsFGLRX, mIsNouveau;
54 bool mHasTextureFromPixmap;
55 int mGLMajorVersion, mMajorVersion, mMinorVersion, mRevisionVersion;
56
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-734490-fix-build-failures-with-Clang-and-GCC-4.7.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-734490-fix-build-failures-with-Clang-and-GCC-4.7.patch
new file mode 100644
index 0000000..a2ee22e
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-734490-fix-build-failures-with-Clang-and-GCC-4.7.patch
@@ -0,0 +1,76 @@
1From: Stefan <kdevel@vogtner.de>
2Date: Thu, 15 Mar 2012 11:01:08 -0700
3Subject: Bug 734490: fix build failures with Clang and GCC 4.7 in
4 TestPoisonArea.cpp. r=zwol
5
6---
7 layout/base/tests/TestPoisonArea.cpp | 14 +++++++-------
8 1 file changed, 7 insertions(+), 7 deletions(-)
9
10diff --git a/layout/base/tests/TestPoisonArea.cpp b/layout/base/tests/TestPoisonArea.cpp
11index f81ce1b..6cf4afd 100644
12--- a/layout/base/tests/TestPoisonArea.cpp
13+++ b/layout/base/tests/TestPoisonArea.cpp
14@@ -397,7 +397,7 @@ ReservePoisonArea()
15 uintptr_t result = (((uintptr_t(0x7FFFFFFFu) << 31) << 1 |
16 uintptr_t(0xF0DEAFFFu)) &
17 ~uintptr_t(PAGESIZE-1));
18- printf("INFO | poison area assumed at 0x%.*"PRIxPTR"\n", SIZxPTR, result);
19+ printf("INFO | poison area assumed at 0x%.*" PRIxPTR "\n", SIZxPTR, result);
20 return result;
21 } else {
22 // First see if we can allocate the preferred poison address from the OS.
23@@ -405,7 +405,7 @@ ReservePoisonArea()
24 void *result = ReserveRegion(candidate, false);
25 if (result == (void *)candidate) {
26 // success - inaccessible page allocated
27- printf("INFO | poison area allocated at 0x%.*"PRIxPTR
28+ printf("INFO | poison area allocated at 0x%.*" PRIxPTR
29 " (preferred addr)\n", SIZxPTR, (uintptr_t)result);
30 return candidate;
31 }
32@@ -416,7 +416,7 @@ ReservePoisonArea()
33 // success - selected page cannot be usable memory
34 if (result != MAP_FAILED)
35 ReleaseRegion(result);
36- printf("INFO | poison area assumed at 0x%.*"PRIxPTR
37+ printf("INFO | poison area assumed at 0x%.*" PRIxPTR
38 " (preferred addr)\n", SIZxPTR, candidate);
39 return candidate;
40 }
41@@ -424,7 +424,7 @@ ReservePoisonArea()
42 // The preferred address is already in use. Did the OS give us a
43 // consolation prize?
44 if (result != MAP_FAILED) {
45- printf("INFO | poison area allocated at 0x%.*"PRIxPTR
46+ printf("INFO | poison area allocated at 0x%.*" PRIxPTR
47 " (consolation prize)\n", SIZxPTR, (uintptr_t)result);
48 return (uintptr_t)result;
49 }
50@@ -433,7 +433,7 @@ ReservePoisonArea()
51 // the address.
52 result = ReserveRegion(0, false);
53 if (result != MAP_FAILED) {
54- printf("INFO | poison area allocated at 0x%.*"PRIxPTR
55+ printf("INFO | poison area allocated at 0x%.*" PRIxPTR
56 " (fallback)\n", SIZxPTR, (uintptr_t)result);
57 return (uintptr_t)result;
58 }
59@@ -455,7 +455,7 @@ ReservePositiveControl()
60 printf("ERROR | allocating positive control | %s\n", LastErrMsg());
61 return 0;
62 }
63- printf("INFO | positive control allocated at 0x%.*"PRIxPTR"\n",
64+ printf("INFO | positive control allocated at 0x%.*" PRIxPTR "\n",
65 SIZxPTR, (uintptr_t)result);
66 return (uintptr_t)result;
67 }
68@@ -486,7 +486,7 @@ ReserveNegativeControl()
69 return 0;
70 }
71
72- printf("INFO | negative control allocated at 0x%.*"PRIxPTR"\n",
73+ printf("INFO | negative control allocated at 0x%.*" PRIxPTR "\n",
74 SIZxPTR, (uintptr_t)result);
75 return (uintptr_t)result;
76 }
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-747322-Fix-jemalloc-mmap-wrapper-for-s390x.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-747322-Fix-jemalloc-mmap-wrapper-for-s390x.patch
new file mode 100644
index 0000000..17b6678
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-747322-Fix-jemalloc-mmap-wrapper-for-s390x.patch
@@ -0,0 +1,25 @@
1From: Mike Hommey <mh@glandium.org>
2Date: Fri, 20 Apr 2012 11:26:22 +0200
3Subject: Bug 747322 - Fix jemalloc mmap wrapper for s390x
4
5---
6 memory/jemalloc/jemalloc.c | 6 +++---
7 1 file changed, 3 insertions(+), 3 deletions(-)
8
9diff --git a/memory/jemalloc/jemalloc.c b/memory/jemalloc/jemalloc.c
10index d792728..147e18f 100644
11--- a/memory/jemalloc/jemalloc.c
12+++ b/memory/jemalloc/jemalloc.c
13@@ -403,9 +403,9 @@ void *_mmap(void *addr, size_t length, int prot, int flags,
14 struct {
15 void *addr;
16 size_t length;
17- int prot;
18- int flags;
19- int fd;
20+ long prot;
21+ long flags;
22+ long fd;
23 off_t offset;
24 } args = { addr, length, prot, flags, fd, offset };
25 return (void *) syscall(SYS_mmap, &args);
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-761082-Only-export-TabMessageUtils.h-in-mozilla-.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-761082-Only-export-TabMessageUtils.h-in-mozilla-.patch
new file mode 100644
index 0000000..ac855b2
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Bug-761082-Only-export-TabMessageUtils.h-in-mozilla-.patch
@@ -0,0 +1,49 @@
1From: Mike Hommey <mh+mozilla@glandium.org>
2Date: Thu, 7 Jun 2012 10:41:59 +0200
3Subject: Bug 761082 - Only export TabMessageUtils.h in mozilla/dom. r=cjones
4
5---
6 dom/ipc/Makefile.in | 2 +-
7 dom/ipc/PBrowser.ipdl | 2 +-
8 dom/ipc/TabMessageUtils.cpp | 2 +-
9 3 files changed, 3 insertions(+), 3 deletions(-)
10
11diff --git a/dom/ipc/Makefile.in b/dom/ipc/Makefile.in
12index 8d02e8b..ea37fad 100644
13--- a/dom/ipc/Makefile.in
14+++ b/dom/ipc/Makefile.in
15@@ -53,7 +53,7 @@ DIRS += tests
16 endif
17 endif
18
19-EXPORTS = TabMessageUtils.h PCOMContentPermissionRequestChild.h
20+EXPORTS = PCOMContentPermissionRequestChild.h
21
22 EXPORTS_NAMESPACES = mozilla/dom
23
24diff --git a/dom/ipc/PBrowser.ipdl b/dom/ipc/PBrowser.ipdl
25index f9a25fc..10a8592 100644
26--- a/dom/ipc/PBrowser.ipdl
27+++ b/dom/ipc/PBrowser.ipdl
28@@ -44,7 +44,7 @@ include protocol PContentPermissionRequest;
29 include protocol PRenderFrame;
30 include protocol POfflineCacheUpdate;
31
32-include "TabMessageUtils.h";
33+include "mozilla/dom/TabMessageUtils.h";
34 include "gfxMatrix.h";
35 include "mozilla/net/NeckoMessageUtils.h";
36 include "IPC/nsGUIEventIPC.h";
37diff --git a/dom/ipc/TabMessageUtils.cpp b/dom/ipc/TabMessageUtils.cpp
38index 201d7d4..44b7e44 100644
39--- a/dom/ipc/TabMessageUtils.cpp
40+++ b/dom/ipc/TabMessageUtils.cpp
41@@ -36,7 +36,7 @@
42 *
43 * ***** END LICENSE BLOCK ***** */
44
45-#include "TabMessageUtils.h"
46+#include "mozilla/dom/TabMessageUtils.h"
47 #include "nsCOMPtr.h"
48 #include "nsIDOMEvent.h"
49
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Fix-some-tests-using-CurProcD-where-GreD-should-be-u.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Fix-some-tests-using-CurProcD-where-GreD-should-be-u.patch
new file mode 100644
index 0000000..c1002a9
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Fix-some-tests-using-CurProcD-where-GreD-should-be-u.patch
@@ -0,0 +1,49 @@
1From: Mike Hommey <mh@glandium.org>
2Date: Thu, 14 Jul 2011 17:18:56 +0200
3Subject: Fix some tests using CurProcD where GreD should be used
4
5---
6 dom/plugins/test/unit/head_plugins.js | 2 +-
7 netwerk/test/unit/test_socks.js | 2 +-
8 toolkit/mozapps/extensions/test/xpcshell/test_plugins.js | 2 +-
9 3 files changed, 3 insertions(+), 3 deletions(-)
10
11diff --git a/dom/plugins/test/unit/head_plugins.js b/dom/plugins/test/unit/head_plugins.js
12index ddb78f5..ca32106 100644
13--- a/dom/plugins/test/unit/head_plugins.js
14+++ b/dom/plugins/test/unit/head_plugins.js
15@@ -38,7 +38,7 @@
16
17 // Finds the test plugin library
18 function get_test_plugin() {
19- var plugins = gDirSvc.get("CurProcD", Ci.nsILocalFile);
20+ var plugins = gDirSvc.get("GreD", Ci.nsILocalFile);
21 plugins.append("plugins");
22 do_check_true(plugins.exists());
23 var plugin = plugins.clone();
24diff --git a/netwerk/test/unit/test_socks.js b/netwerk/test/unit/test_socks.js
25index bbaeffa..f692d97 100644
26--- a/netwerk/test/unit/test_socks.js
27+++ b/netwerk/test/unit/test_socks.js
28@@ -36,7 +36,7 @@ function runScriptSubprocess(script, args)
29 {
30 // logic copied from ted's crashreporter unit test
31 var ds = new DirectoryService();
32- var bin = ds.get("CurProcD", Ci.nsILocalFile);
33+ var bin = ds.get("GreD", Ci.nsILocalFile);
34
35 bin.append("xpcshell");
36 if (!bin.exists()) {
37diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_plugins.js b/toolkit/mozapps/extensions/test/xpcshell/test_plugins.js
38index 71e9ac1..0bde3e2 100644
39--- a/toolkit/mozapps/extensions/test/xpcshell/test_plugins.js
40+++ b/toolkit/mozapps/extensions/test/xpcshell/test_plugins.js
41@@ -18,7 +18,7 @@ function run_test() {
42
43 // Finds the test plugin library
44 function get_test_plugin() {
45- var plugins = Services.dirsvc.get("CurProcD", AM_Ci.nsILocalFile);
46+ var plugins = Services.dirsvc.get("GreD", AM_Ci.nsILocalFile);
47 plugins.append("plugins");
48 do_check_true(plugins.exists());
49
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Load-dependent-libraries-with-their-real-path-to-avo.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Load-dependent-libraries-with-their-real-path-to-avo.patch
new file mode 100644
index 0000000..216792f
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Load-dependent-libraries-with-their-real-path-to-avo.patch
@@ -0,0 +1,23 @@
1From: Mike Hommey <mh@glandium.org>
2Date: Sat, 25 Feb 2012 12:03:56 +0100
3Subject: Load dependent libraries with their real path to avoid confusing gdb
4 when they are symlinks
5
6---
7 xpcom/glue/standalone/nsGlueLinkingDlopen.cpp | 3 +++
8 1 file changed, 3 insertions(+)
9
10diff --git a/xpcom/glue/standalone/nsGlueLinkingDlopen.cpp b/xpcom/glue/standalone/nsGlueLinkingDlopen.cpp
11index 959bd69..61b18f8 100644
12--- a/xpcom/glue/standalone/nsGlueLinkingDlopen.cpp
13+++ b/xpcom/glue/standalone/nsGlueLinkingDlopen.cpp
14@@ -206,6 +206,9 @@ preload(const char *file)
15 static void
16 ReadDependentCB(const char *aDependentLib, bool do_preload)
17 {
18+ char lib[MAXPATHLEN];
19+ if (realpath(aDependentLib, lib))
20+ aDependentLib = lib;
21 #if defined(LINUX) && !defined(ANDROID)
22 if (do_preload)
23 preload(aDependentLib);
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Properly-launch-applications-set-in-HOME-.mailcap.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Properly-launch-applications-set-in-HOME-.mailcap.patch
new file mode 100644
index 0000000..8ed4881
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Properly-launch-applications-set-in-HOME-.mailcap.patch
@@ -0,0 +1,47 @@
1From: Mike Hommey <glandium@debian.org>
2Date: Sat, 22 Nov 2008 09:35:23 +0100
3Subject: Properly launch applications set in $HOME/.mailcap
4
5Replaces the previous patch in a much simpler way.
6---
7 uriloader/exthandler/unix/nsMIMEInfoUnix.cpp | 15 +++++++++++++--
8 1 file changed, 13 insertions(+), 2 deletions(-)
9
10diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
11index 5d7f758..81b8efb 100644
12--- a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
13+++ b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
14@@ -99,6 +99,12 @@ nsMIMEInfoUnix::LoadUriInternal(nsIURI * aURI)
15 NS_IMETHODIMP
16 nsMIMEInfoUnix::GetHasDefaultHandler(bool *_retval)
17 {
18+ // if mDefaultApplication is set, it means the application has been set from
19+ // either /etc/mailcap or ${HOME}/.mailcap, in which case we don't want to
20+ // give the GNOME answer.
21+ if (mDefaultApplication)
22+ return nsMIMEInfoImpl::GetHasDefaultHandler(_retval);
23+
24 *_retval = false;
25 nsRefPtr<nsMIMEInfoBase> mimeInfo = nsGNOMERegistry::GetFromType(mSchemeOrType);
26 if (!mimeInfo) {
27@@ -132,13 +138,18 @@ nsMIMEInfoUnix::GetHasDefaultHandler(bool *_retval)
28 }
29 #endif
30
31- // If we didn't find a VFS handler, fallback.
32- return nsMIMEInfoImpl::GetHasDefaultHandler(_retval);
33+ return NS_OK;
34 }
35
36 nsresult
37 nsMIMEInfoUnix::LaunchDefaultWithFile(nsIFile *aFile)
38 {
39+ // if mDefaultApplication is set, it means the application has been set from
40+ // either /etc/mailcap or ${HOME}/.mailcap, in which case we don't want to
41+ // give the GNOME answer.
42+ if (mDefaultApplication)
43+ return nsMIMEInfoImpl::LaunchDefaultWithFile(aFile);
44+
45 nsCAutoString nativePath;
46 aFile->GetNativePath(nativePath);
47
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/bug-693343-a11y-disabled-in-Gnome-3-when-GNOME_ACCES.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/bug-693343-a11y-disabled-in-Gnome-3-when-GNOME_ACCES.patch
new file mode 100644
index 0000000..2fdc6ae
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/bug-693343-a11y-disabled-in-Gnome-3-when-GNOME_ACCES.patch
@@ -0,0 +1,351 @@
1From: Trevor Saunders <trev.saunders@gmail.com>
2Date: Wed, 4 Jan 2012 20:54:17 -0500
3Subject: bug 693343 - a11y disabled in Gnome 3 when GNOME_ACCESSIBILITY is
4 unset patch=mgorse, tbsaunde r=tbsaunde, karlt
5
6---
7 accessible/src/atk/Makefile.in | 4 +
8 accessible/src/atk/nsApplicationAccessibleWrap.cpp | 156 ++++++++++++++++----
9 accessible/src/base/nsAccessibilityService.h | 15 ++
10 widget/src/gtk2/nsWindow.cpp | 48 +-----
11 widget/src/gtk2/nsWindow.h | 3 -
12 5 files changed, 157 insertions(+), 69 deletions(-)
13
14diff --git a/accessible/src/atk/Makefile.in b/accessible/src/atk/Makefile.in
15index 4934fd1..9fe1f48 100644
16--- a/accessible/src/atk/Makefile.in
17+++ b/accessible/src/atk/Makefile.in
18@@ -92,6 +92,10 @@ include $(topsrcdir)/config/rules.mk
19 CFLAGS += $(MOZ_GTK2_CFLAGS)
20 CXXFLAGS += $(MOZ_GTK2_CFLAGS)
21
22+ifdef MOZ_ENABLE_DBUS
23+CXXFLAGS += $(MOZ_DBUS_CFLAGS)
24+endif
25+
26 LOCAL_INCLUDES += \
27 -I$(srcdir) \
28 -I$(srcdir)/../base \
29diff --git a/accessible/src/atk/nsApplicationAccessibleWrap.cpp b/accessible/src/atk/nsApplicationAccessibleWrap.cpp
30index c8ee40c..5937883 100644
31--- a/accessible/src/atk/nsApplicationAccessibleWrap.cpp
32+++ b/accessible/src/atk/nsApplicationAccessibleWrap.cpp
33@@ -44,7 +44,7 @@
34 #include "nsMai.h"
35 #include "prlink.h"
36 #include "prenv.h"
37-#include "nsIPrefBranch.h"
38+#include "nsIGConfService.h"
39 #include "nsIServiceManager.h"
40 #include "nsAutoPtr.h"
41 #include "nsAccessibilityService.h"
42@@ -52,6 +52,11 @@
43
44 #include <gtk/gtk.h>
45 #include <atk/atk.h>
46+#ifdef MOZ_ENABLE_DBUS
47+#include <dbus/dbus.h>
48+#endif
49+
50+using namespace mozilla::a11y;
51
52 typedef GType (* AtkGetTypeType) (void);
53 GType g_atk_hyperlink_impl_type = G_TYPE_INVALID;
54@@ -60,11 +65,6 @@ static PRLibrary *sATKLib = nsnull;
55 static const char sATKLibName[] = "libatk-1.0.so.0";
56 static const char sATKHyperlinkImplGetTypeSymbol[] =
57 "atk_hyperlink_impl_get_type";
58-static const char sAccEnv [] = "GNOME_ACCESSIBILITY";
59-static const char sSysPrefService [] =
60- "@mozilla.org/system-preference-service;1";
61-static const char sAccessibilityKey [] =
62- "config.use_system_prefs.accessibility";
63
64 /* gail function pointer */
65 static guint (* gail_add_global_event_listener) (GSignalEmissionHook listener,
66@@ -614,26 +614,7 @@ toplevel_event_watcher(GSignalInvocationHint* ihint,
67 bool
68 nsApplicationAccessibleWrap::Init()
69 {
70- // XXX following code is copied from widget/src/gtk2/nsWindow.cpp
71- // we should put it to somewhere that can be used from both modules
72- // see bug 390761
73-
74- // check if accessibility enabled/disabled by environment variable
75- bool isGnomeATEnabled = false;
76- const char *envValue = PR_GetEnv(sAccEnv);
77- if (envValue) {
78- isGnomeATEnabled = !!atoi(envValue);
79- } else {
80- //check gconf-2 setting
81- nsresult rv;
82- nsCOMPtr<nsIPrefBranch> sysPrefService =
83- do_GetService(sSysPrefService, &rv);
84- if (NS_SUCCEEDED(rv) && sysPrefService) {
85- sysPrefService->GetBoolPref(sAccessibilityKey, &isGnomeATEnabled);
86- }
87- }
88-
89- if (isGnomeATEnabled) {
90+ if (ShouldA11yBeEnabled()) {
91 // load and initialize gail library
92 nsresult rv = LoadGtkModule(sGail);
93 if (NS_SUCCEEDED(rv)) {
94@@ -882,3 +863,126 @@ LoadGtkModule(GnomeAccessibilityModule& aModule)
95 }
96 return NS_OK;
97 }
98+
99+namespace mozilla {
100+namespace a11y {
101+
102+ static const char sAccEnv [] = "GNOME_ACCESSIBILITY";
103+#ifdef MOZ_ENABLE_DBUS
104+static DBusPendingCall *sPendingCall = nsnull;
105+#endif
106+
107+void
108+PreInit()
109+{
110+#ifdef MOZ_ENABLE_DBUS
111+ static bool sChecked = FALSE;
112+ if (sChecked)
113+ return;
114+
115+ sChecked = TRUE;
116+
117+ // dbus is only checked if GNOME_ACCESSIBILITY is unset
118+ if (PR_GetEnv(sAccEnv) || !PR_GetEnv("DBUS_SESSION_BUS_ADDRESS"))
119+ return;
120+
121+ DBusConnection* bus = dbus_bus_get(DBUS_BUS_SESSION, nsnull);
122+ if (!bus)
123+ return;
124+
125+ dbus_connection_set_exit_on_disconnect(bus, FALSE);
126+
127+ DBusMessage *message;
128+ message = dbus_message_new_method_call("org.a11y.Bus", "/org/a11y/bus",
129+ "org.freedesktop.DBus.Properties",
130+ "Get");
131+ if (!message)
132+ goto dbus_done;
133+
134+ static const char* iface = "org.a11y.Status";
135+ static const char* member = "IsEnabled";
136+ dbus_message_append_args(message, DBUS_TYPE_STRING, &iface,
137+ DBUS_TYPE_STRING, &member, DBUS_TYPE_INVALID);
138+ dbus_connection_send_with_reply(bus, message, &sPendingCall, 1000);
139+ dbus_message_unref(message);
140+
141+dbus_done:
142+ dbus_connection_unref(bus);
143+#endif
144+}
145+
146+bool
147+ShouldA11yBeEnabled()
148+{
149+ static bool sChecked = false, sShouldEnable = false;
150+ if (sChecked)
151+ return sShouldEnable;
152+
153+ sChecked = true;
154+
155+ // check if accessibility enabled/disabled by environment variable
156+ const char* envValue = PR_GetEnv(sAccEnv);
157+ if (envValue)
158+ return sShouldEnable = !!atoi(envValue);
159+
160+#ifdef MOZ_ENABLE_DBUS
161+ PreInit();
162+ bool dbusSuccess = false;
163+ DBusMessage *reply = nsnull;
164+ if (!sPendingCall)
165+ goto dbus_done;
166+
167+ dbus_pending_call_block(sPendingCall);
168+ reply = dbus_pending_call_steal_reply(sPendingCall);
169+ dbus_pending_call_unref(sPendingCall);
170+ sPendingCall = nsnull;
171+ if (!reply ||
172+ dbus_message_get_type(reply) != DBUS_MESSAGE_TYPE_METHOD_RETURN ||
173+ strcmp(dbus_message_get_signature (reply), DBUS_TYPE_VARIANT_AS_STRING))
174+ goto dbus_done;
175+
176+ DBusMessageIter iter, iter_variant, iter_struct;
177+ dbus_bool_t dResult;
178+ dbus_message_iter_init(reply, &iter);
179+ dbus_message_iter_recurse (&iter, &iter_variant);
180+ switch (dbus_message_iter_get_arg_type(&iter_variant)) {
181+ case DBUS_TYPE_STRUCT:
182+ // at-spi2-core 2.2.0-2.2.1 had a bug where it returned a struct
183+ dbus_message_iter_recurse(&iter_variant, &iter_struct);
184+ if (dbus_message_iter_get_arg_type(&iter_struct) == DBUS_TYPE_BOOLEAN) {
185+ dbus_message_iter_get_basic(&iter_struct, &dResult);
186+ sShouldEnable = dResult;
187+ dbusSuccess = true;
188+ }
189+
190+ break;
191+ case DBUS_TYPE_BOOLEAN:
192+ dbus_message_iter_get_basic(&iter_variant, &dResult);
193+ sShouldEnable = dResult;
194+ dbusSuccess = true;
195+ break;
196+ default:
197+ break;
198+ }
199+
200+dbus_done:
201+ if (reply)
202+ dbus_message_unref(reply);
203+
204+ if (dbusSuccess)
205+ return sShouldEnable;
206+#endif
207+
208+ //check gconf-2 setting
209+static const char sGconfAccessibilityKey[] =
210+ "/desktop/gnome/interface/accessibility";
211+ nsresult rv = NS_OK;
212+ nsCOMPtr<nsIGConfService> gconf =
213+ do_GetService(NS_GCONFSERVICE_CONTRACTID, &rv);
214+ if (NS_SUCCEEDED(rv) && gconf)
215+ gconf->GetBool(NS_LITERAL_CSTRING(sGconfAccessibilityKey), &sShouldEnable);
216+
217+ return sShouldEnable;
218+}
219+} // namespace a11y
220+} // namespace mozilla
221diff --git a/accessible/src/base/nsAccessibilityService.h b/accessible/src/base/nsAccessibilityService.h
222index 841814a..4284c80 100644
223--- a/accessible/src/base/nsAccessibilityService.h
224+++ b/accessible/src/base/nsAccessibilityService.h
225@@ -56,6 +56,21 @@ namespace a11y {
226 */
227 FocusManager* FocusMgr();
228
229+#ifdef MOZ_ACCESSIBILITY_ATK
230+/**
231+ * Perform initialization that should be done as soon as possible, in order
232+ * to minimize startup time.
233+ * XXX: this function and the next defined in nsApplicationAccessibleWrap.cpp
234+ */
235+void PreInit();
236+
237+/**
238+ * Is platform accessibility enabled.
239+ * Only used on linux with atk for now.
240+ */
241+bool ShouldA11yBeEnabled();
242+#endif
243+
244 } // namespace a11y
245 } // namespace mozilla
246
247diff --git a/widget/src/gtk2/nsWindow.cpp b/widget/src/gtk2/nsWindow.cpp
248index 25f1c2a..8f8cd40 100644
249--- a/widget/src/gtk2/nsWindow.cpp
250+++ b/widget/src/gtk2/nsWindow.cpp
251@@ -110,19 +110,10 @@
252 #include "nsIPropertyBag2.h"
253
254 #ifdef ACCESSIBILITY
255-#include "nsIAccessibilityService.h"
256+#include "nsAccessibilityService.h"
257 #include "nsIAccessibleDocument.h"
258-#include "prenv.h"
259-#include "stdlib.h"
260
261 using namespace mozilla;
262-
263-static bool sAccessibilityChecked = false;
264-/* static */
265-bool nsWindow::sAccessibilityEnabled = false;
266-static const char sSysPrefService [] = "@mozilla.org/system-preference-service;1";
267-static const char sAccEnv [] = "GNOME_ACCESSIBILITY";
268-static const char sAccessibilityKey [] = "config.use_system_prefs.accessibility";
269 #endif
270
271 /* For SetIcon */
272@@ -1116,9 +1107,8 @@ nsWindow::Show(bool aState)
273 }
274
275 #ifdef ACCESSIBILITY
276- if (aState && sAccessibilityEnabled) {
277+ if (aState && a11y::ShouldA11yBeEnabled())
278 CreateRootAccessible();
279- }
280 #endif
281
282 NativeShow(aState);
283@@ -3890,6 +3880,11 @@ nsWindow::Create(nsIWidget *aParent,
284
285 NS_ASSERTION(!mWindowGroup, "already have window group (leaking it)");
286
287+#ifdef ACCESSIBILITY
288+ // Send a DBus message to check whether a11y is enabled
289+ a11y::PreInit();
290+#endif
291+
292 // Ensure that the toolkit is created.
293 nsGTKToolkit::GetToolkit();
294
295@@ -4283,33 +4278,6 @@ nsWindow::Create(nsIWidget *aParent,
296 if (!mIsTopLevel)
297 Resize(mBounds.x, mBounds.y, mBounds.width, mBounds.height, false);
298
299-#ifdef ACCESSIBILITY
300- nsresult rv;
301- if (!sAccessibilityChecked) {
302- sAccessibilityChecked = true;
303-
304- //check if accessibility enabled/disabled by environment variable
305- const char *envValue = PR_GetEnv(sAccEnv);
306- if (envValue) {
307- sAccessibilityEnabled = atoi(envValue) != 0;
308- LOG(("Accessibility Env %s=%s\n", sAccEnv, envValue));
309- }
310- //check gconf-2 setting
311- else {
312- nsCOMPtr<nsIPrefBranch> sysPrefService =
313- do_GetService(sSysPrefService, &rv);
314- if (NS_SUCCEEDED(rv) && sysPrefService) {
315-
316- // do the work to get gconf setting.
317- // will be done soon later.
318- sysPrefService->GetBoolPref(sAccessibilityKey,
319- &sAccessibilityEnabled);
320- }
321-
322- }
323- }
324-#endif
325-
326 #ifdef MOZ_DFB
327 if (!mDFB) {
328 DirectFBCreate( &mDFB );
329@@ -6517,7 +6485,7 @@ nsWindow::DispatchAccessibleEvent()
330 void
331 nsWindow::DispatchEventToRootAccessible(PRUint32 aEventType)
332 {
333- if (!sAccessibilityEnabled) {
334+ if (!a11y::ShouldA11yBeEnabled()) {
335 return;
336 }
337
338diff --git a/widget/src/gtk2/nsWindow.h b/widget/src/gtk2/nsWindow.h
339index a72eca7..577acbf 100644
340--- a/widget/src/gtk2/nsWindow.h
341+++ b/widget/src/gtk2/nsWindow.h
342@@ -345,9 +345,6 @@ public:
343 #endif
344 NS_IMETHOD ReparentNativeWidget(nsIWidget* aNewParent);
345
346-#ifdef ACCESSIBILITY
347- static bool sAccessibilityEnabled;
348-#endif
349 protected:
350 // Helper for SetParent and ReparentNativeWidget.
351 void ReparentNativeWidgetInternal(nsIWidget* aNewParent,