From d2b3dc8b06b9bc02c91d37ef21305f21da04d2f2 Mon Sep 17 00:00:00 2001 From: Alexander Surkov Date: Tue, 12 Feb 2013 18:13:57 +0900 Subject: [PATCH 01/15] Bug 823927 - text is jammed with control's text in name computation, r=tbsaunde --- accessible/src/base/nsTextEquivUtils.cpp | 8 ++++++-- accessible/tests/mochitest/name/test_general.html | 13 +++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/accessible/src/base/nsTextEquivUtils.cpp b/accessible/src/base/nsTextEquivUtils.cpp index 1f150b033bc4..f325c0366202 100644 --- a/accessible/src/base/nsTextEquivUtils.cpp +++ b/accessible/src/base/nsTextEquivUtils.cpp @@ -329,14 +329,18 @@ bool nsTextEquivUtils::AppendString(nsAString *aString, const nsAString& aTextEquivalent) { - // Insert spaces to insure that words from controls aren't jammed together. if (aTextEquivalent.IsEmpty()) return false; - if (!aString->IsEmpty()) + // Insert spaces to insure that words from controls aren't jammed together. + if (!aString->IsEmpty() && !IsWhitespace(aString->Last())) aString->Append(PRUnichar(' ')); aString->Append(aTextEquivalent); + + if (!IsWhitespace(aString->Last())) + aString->Append(PRUnichar(' ')); + return true; } diff --git a/accessible/tests/mochitest/name/test_general.html b/accessible/tests/mochitest/name/test_general.html index 1827afbe5618..2c5ecc06d710 100644 --- a/accessible/tests/mochitest/name/test_general.html +++ b/accessible/tests/mochitest/name/test_general.html @@ -91,6 +91,9 @@ // Gets the name from html:input value, ignore @title attribute on input testName("from_input_ignoretitle", "Custom country"); + // Insert spaces around the control's value to not jamm sibling text nodes + testName("insert_spaces_around_control", "start value end"); + // Gets the name from @title, ignore whitespace content testName("from_label_ignore_ws_subtree", "about"); @@ -262,6 +265,11 @@ title="ARIA slider and spinbutton don't provide a value for name computation"> Bug 812041 + + Bug 823927 +

@@ -389,6 +397,11 @@
          value="Custom country"
          title="Input your country of origin"/ >
 
+  
+  
+
   
       
 

From 4966401b8d0db951d2c4e6e260a24adab0ef2e4b Mon Sep 17 00:00:00 2001
From: Mike Hommey 
Date: Tue, 12 Feb 2013 11:02:38 +0100
Subject: [PATCH 02/15] Bug 825968 - Adjust exception disabling in stlport for
 Android NDK r8d. r=ted

---
 build/stlport/stl/config/_android.h.in | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/build/stlport/stl/config/_android.h.in b/build/stlport/stl/config/_android.h.in
index f04984f8e4ca..bfe6b32ee39f 100644
--- a/build/stlport/stl/config/_android.h.in
+++ b/build/stlport/stl/config/_android.h.in
@@ -14,6 +14,10 @@
 // No throwing exceptions
 #undef _STLP_NO_EXCEPTIONS
 #define _STLP_NO_EXCEPTIONS 1
+#undef _STLP_NO_EXCEPTION_HEADER
+#define _STLP_NO_EXCEPTION_HEADER 1
+#undef _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT
+#define _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT 1
 
 #undef _STLP_NATIVE_CPP_C_HEADER
 #define _STLP_NATIVE_CPP_C_HEADER(header) <../../system/include/header>

From d9a1f5bf4a0675eec261b39ea3a1acea9006d1ab Mon Sep 17 00:00:00 2001
From: Mike Hommey 
Date: Tue, 12 Feb 2013 11:02:53 +0100
Subject: [PATCH 03/15] Bug 839824 - Fix build error with gcc 4.4 in MIR.h.
 r=dvander

---
 js/src/ion/MIR.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/js/src/ion/MIR.h b/js/src/ion/MIR.h
index 3fb58e31944b..3e867e8cb4a0 100644
--- a/js/src/ion/MIR.h
+++ b/js/src/ion/MIR.h
@@ -1218,7 +1218,7 @@ class MParBailout : public MAryControlInstruction<0, 0>
     INSTRUCTION_HEADER(ParBailout);
 
     MParBailout()
-      : MAryControlInstruction()
+      : MAryControlInstruction<0, 0>()
     {
         setResultType(MIRType_Undefined);
         setGuard();

From 09fed6b3390753fc0b04d09fba8fd65dc8d6012b Mon Sep 17 00:00:00 2001
From: Jon Coppeard 
Date: Fri, 8 Feb 2013 08:40:39 +0000
Subject: [PATCH 04/15] Bug 839471 - GC: Sweep type objects on the background
 thread r=billm

---
 js/src/jsgc.cpp      | 27 +++++++++++++--------------
 js/src/jsgc.h        | 12 ++++++++++--
 js/src/jsgcinlines.h | 11 ++++++++---
 3 files changed, 31 insertions(+), 19 deletions(-)

diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp
index e97fff18751e..d50299ccccba 100644
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -195,30 +195,23 @@ static const AllocKind FinalizePhaseIonCode[] = {
     FINALIZE_IONCODE
 };
 
-static const AllocKind FinalizePhaseShapes[] = {
-    FINALIZE_TYPE_OBJECT
-};
-
 static const AllocKind* FinalizePhases[] = {
     FinalizePhaseStrings,
     FinalizePhaseScripts,
-    FinalizePhaseIonCode,
-    FinalizePhaseShapes
+    FinalizePhaseIonCode
 };
 static const int FinalizePhaseCount = sizeof(FinalizePhases) / sizeof(AllocKind*);
 
 static const int FinalizePhaseLength[] = {
     sizeof(FinalizePhaseStrings) / sizeof(AllocKind),
     sizeof(FinalizePhaseScripts) / sizeof(AllocKind),
-    sizeof(FinalizePhaseIonCode) / sizeof(AllocKind),
-    sizeof(FinalizePhaseShapes) / sizeof(AllocKind)
+    sizeof(FinalizePhaseIonCode) / sizeof(AllocKind)
 };
 
 static const gcstats::Phase FinalizePhaseStatsPhase[] = {
     gcstats::PHASE_SWEEP_STRING,
     gcstats::PHASE_SWEEP_SCRIPT,
-    gcstats::PHASE_SWEEP_IONCODE,
-    gcstats::PHASE_SWEEP_SHAPE
+    gcstats::PHASE_SWEEP_IONCODE
 };
 
 /*
@@ -241,7 +234,8 @@ static const AllocKind BackgroundPhaseStrings[] = {
 
 static const AllocKind BackgroundPhaseShapes[] = {
     FINALIZE_SHAPE,
-    FINALIZE_BASE_SHAPE
+    FINALIZE_BASE_SHAPE,
+    FINALIZE_TYPE_OBJECT
 };
 
 static const AllocKind* BackgroundPhases[] = {
@@ -1480,10 +1474,9 @@ ArenaLists::queueShapesForSweep(FreeOp *fop)
 {
     gcstats::AutoPhase ap(fop->runtime()->gcStats, gcstats::PHASE_SWEEP_SHAPE);
 
-    queueForForegroundSweep(fop, FINALIZE_TYPE_OBJECT);
-
     queueForBackgroundSweep(fop, FINALIZE_SHAPE);
     queueForBackgroundSweep(fop, FINALIZE_BASE_SHAPE);
+    queueForBackgroundSweep(fop, FINALIZE_TYPE_OBJECT);
 }
 
 static void *
@@ -4588,6 +4581,12 @@ JS::ShrinkGCBuffers(JSRuntime *rt)
         rt->gcHelperThread.startBackgroundShrink();
 }
 
+void
+js::gc::FinishBackgroundFinalize(JSRuntime *rt)
+{
+    rt->gcHelperThread.waitBackgroundSweepEnd();
+}
+
 AutoFinishGC::AutoFinishGC(JSRuntime *rt)
 {
     if (IsIncrementalGCInProgress(rt)) {
@@ -4595,7 +4594,7 @@ AutoFinishGC::AutoFinishGC(JSRuntime *rt)
         FinishIncrementalGC(rt, gcreason::API);
     }
 
-    rt->gcHelperThread.waitBackgroundSweepEnd();
+    gc::FinishBackgroundFinalize(rt);
 }
 
 AutoPrepareForTracing::AutoPrepareForTracing(JSRuntime *rt)
diff --git a/js/src/jsgc.h b/js/src/jsgc.h
index ded7db545afb..38323c148d3c 100644
--- a/js/src/jsgc.h
+++ b/js/src/jsgc.h
@@ -168,8 +168,8 @@ IsBackgroundFinalized(AllocKind kind)
         true,      /* FINALIZE_OBJECT16_BACKGROUND */
         false,     /* FINALIZE_SCRIPT */
         true,      /* FINALIZE_SHAPE */
-        true,     /* FINALIZE_BASE_SHAPE */
-        false,     /* FINALIZE_TYPE_OBJECT */
+        true,      /* FINALIZE_BASE_SHAPE */
+        true,      /* FINALIZE_TYPE_OBJECT */
         true,      /* FINALIZE_SHORT_STRING */
         true,      /* FINALIZE_STRING */
         false,     /* FINALIZE_EXTERNAL_STRING */
@@ -334,6 +334,10 @@ struct ArenaLists {
                backgroundFinalizeState[kind] == BFS_JUST_FINISHED;
     }
 
+    bool needBackgroundFinalizeWait(AllocKind kind) const {
+        return backgroundFinalizeState[kind] != BFS_DONE;
+    }
+
     /*
      * Return the free list back to the arena so the GC finalization will not
      * run the finalizers over unitialized bytes from free things.
@@ -1185,6 +1189,10 @@ SetDeterministicGC(JSContext *cx, bool enabled);
 void
 SetValidateGC(JSContext *cx, bool enabled);
 
+/* Wait for the background thread to finish sweeping if it is running. */
+void
+FinishBackgroundFinalize(JSRuntime *rt);
+
 const int ZealPokeValue = 1;
 const int ZealAllocValue = 2;
 const int ZealFrameGCValue = 3;
diff --git a/js/src/jsgcinlines.h b/js/src/jsgcinlines.h
index 802ffea24f1b..dbaceacfe542 100644
--- a/js/src/jsgcinlines.h
+++ b/js/src/jsgcinlines.h
@@ -357,13 +357,18 @@ class CellIter : public CellIterImpl
       : lists(&comp->zone()->allocator.arenas),
         kind(kind)
     {
+
         /*
          * We have a single-threaded runtime, so there's no need to protect
          * against other threads iterating or allocating. However, we do have
-         * background finalization; make sure people aren't using CellIter to
-         * walk such allocation kinds.
+         * background finalization; we have to wait for this to finish if it's
+         * currently active.
          */
-        JS_ASSERT(!IsBackgroundFinalized(kind));
+        if (IsBackgroundFinalized(kind) &&
+            comp->zone()->allocator.arenas.needBackgroundFinalizeWait(kind))
+        {
+            gc::FinishBackgroundFinalize(comp->rt);
+        }
         if (lists->isSynchronizedFreeList(kind)) {
             lists = NULL;
         } else {

From e8a4e9dbf1ed6dad86ea48982dddb5e4f27dd1e6 Mon Sep 17 00:00:00 2001
From: Jan de Mooij 
Date: Tue, 12 Feb 2013 13:11:28 +0100
Subject: [PATCH 05/15] Bug 839982 part 6 - Create |this| before creating the
 resume point when inlining NEW. r=djvj

---
 js/src/ion/IonBuilder.cpp | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/js/src/ion/IonBuilder.cpp b/js/src/ion/IonBuilder.cpp
index 62bbb08663c3..910457821a6d 100644
--- a/js/src/ion/IonBuilder.cpp
+++ b/js/src/ion/IonBuilder.cpp
@@ -2867,6 +2867,14 @@ IonBuilder::inlineScriptedCall(HandleFunction target, CallInfo &callInfo)
             return false;
     }
 
+    // Create new |this| on the caller-side for inlined constructors.
+    if (callInfo.constructing()) {
+        MDefinition *thisDefn = createThis(target, callInfo.fun());
+        if (!thisDefn)
+            return false;
+        callInfo.setThis(thisDefn);
+    }
+
     // Push formals to capture in the resumepoint
     callInfo.pushFormals(current);
 
@@ -2898,14 +2906,6 @@ IonBuilder::inlineScriptedCall(HandleFunction target, CallInfo &callInfo)
     IonBuilder inlineBuilder(cx, &temp(), &graph(), &oracle,
                              info, inliningDepth + 1, loopDepth_);
 
-    // Create new |this| on the caller-side for inlined constructors.
-    if (callInfo.constructing()) {
-        MDefinition *thisDefn = createThis(target, callInfo.fun());
-        if (!thisDefn)
-            return false;
-        callInfo.setThis(thisDefn);
-    }
-
     // Build the graph.
     if (!inlineBuilder.buildInline(this, resumePoint, callInfo)) {
         JS_ASSERT(calleeScript->hasAnalysis());

From 619a7086fbb788c8cb494b6c7d303e29bee0f834 Mon Sep 17 00:00:00 2001
From: Joel Maher 
Date: Tue, 12 Feb 2013 07:28:02 -0500
Subject: [PATCH 06/15] Bug 840173 - test_screenPersistence.html fails when run
 on Ubuntu because the left hand launcher bar interferes. r=bz

---
 toolkit/content/tests/chrome/test_screenPersistence.xul | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/toolkit/content/tests/chrome/test_screenPersistence.xul b/toolkit/content/tests/chrome/test_screenPersistence.xul
index 8bb1ca08992e..7d63252939f9 100644
--- a/toolkit/content/tests/chrome/test_screenPersistence.xul
+++ b/toolkit/content/tests/chrome/test_screenPersistence.xul
@@ -14,16 +14,18 @@