Merge m-c to f-t
authorPhil Ringnalda <philringnalda@gmail.com>
Fri, 25 Oct 2013 19:53:31 -0700
changeset 167096 1daa57b0fe372c184911a0bbb77ed19c569395c4
parent 167095 8f84fb609a5e4df4b2791ed0a4d638080ecb9dad (current diff)
parent 167059 ef3f5669b53e4b3e85ca33622108ede08d5a608a (diff)
child 167097 60c2fea83c0f7979db6460a1f860a8b6fc863c91
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge m-c to f-t
mobile/android/base/android-services-files.mk
other-licenses/android/Makefile.in
--- a/CLOBBER
+++ b/CLOBBER
@@ -13,9 +13,9 @@
 #          |               |
 #          O <-- Clobber   O  <-- Clobber
 #
 # Note: The description below will be part of the error message shown to users.
 #
 # Modifying this file will now automatically clobber the buildbot machines \o/
 #
 
-Bug 922160 needs a clobber due to WebIDL binding dependency issues (bug 928195).
+Bug 914270 needs a clobber since moving variables to moz.build always requires a clobber (bug 852814)
--- a/accessible/public/nsIAccessibleRelation.idl
+++ b/accessible/public/nsIAccessibleRelation.idl
@@ -6,17 +6,17 @@
 #include "nsISupports.idl"
 #include "nsIArray.idl"
 
 interface nsIAccessible;
 
 /**
  * This interface gives access to an accessible's set of relations.
  */
-[scriptable, uuid(9f85fc0d-2969-48e6-b822-68140f7e5770)]
+[scriptable, uuid(55b308c4-2ae4-46bc-b4cd-4d4370e0a660)]
 interface nsIAccessibleRelation : nsISupports
 {
   /**
    * This object is labelled by a target object.
    */
   const unsigned long RELATION_LABELLED_BY = 0x00;
 
   /**
@@ -105,16 +105,31 @@ interface nsIAccessibleRelation : nsISup
 
   /**
    * Part of a form/dialog with a related default button. It is used for
    * MSAA/XPCOM, it isn't for IA2 or ATK.
    */
   const unsigned long RELATION_DEFAULT_BUTTON = 0x10;
 
   /**
+   * The target object is the containing document object.
+   */
+  const unsigned long RELATION_CONTAINING_DOCUMENT = 0x11;
+
+  /**
+   * The target object is the topmost containing document object in the tab pane.
+   */
+  const unsigned long RELATION_CONTAINING_TAB_PANE = 0x12;
+
+  /**
+   * The target object is the containing application object.
+   */
+  const unsigned long RELATION_CONTAINING_APPLICATION = 0x14;
+
+  /**
    * Returns the type of the relation.
    */
   readonly attribute unsigned long relationType;
 
   /**
    * Returns the number of targets for this relation.
    */
   readonly attribute unsigned long targetsCount;
--- a/accessible/src/base/RelationType.h
+++ b/accessible/src/base/RelationType.h
@@ -104,16 +104,36 @@ MOZ_BEGIN_ENUM_CLASS(RelationType)
   PARENT_WINDOW_OF = 0x0f,
 
   /**
    * Part of a form/dialog with a related default button. It is used for
    * MSAA/XPCOM, it isn't for IA2 or ATK.
    */
   DEFAULT_BUTTON = 0x10,
 
-  LAST = DEFAULT_BUTTON
+  /**
+   * The target object is the containing document object.
+   */
+  CONTAINING_DOCUMENT = 0x11,
+
+  /**
+   * The target object is the topmost containing document object in the tab pane.
+   */
+  CONTAINING_TAB_PANE = 0x12,
+
+  /**
+   * The target object is the containing window object.
+   */
+  CONTAINING_WINDOW = 0x13,
+
+  /**
+   * The target object is the containing application object.
+   */
+  CONTAINING_APPLICATION = 0x14,
+
+  LAST = CONTAINING_APPLICATION
 
 MOZ_END_ENUM_CLASS(RelationType)
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif
--- a/accessible/src/base/RelationTypeMap.h
+++ b/accessible/src/base/RelationTypeMap.h
@@ -105,8 +105,26 @@ RELATIONTYPE(PARENT_WINDOW_OF,
              NAVRELATION_PARENT_WINDOW_OF,
              IA2_RELATION_PARENT_WINDOW_OF)
 
 RELATIONTYPE(DEFAULT_BUTTON,
              "default button",
              ATK_RELATION_NULL,
              NAVRELATION_DEFAULT_BUTTON,
              IA2_RELATION_NULL)
+
+RELATIONTYPE(CONTAINING_DOCUMENT,
+             "containing document",
+             ATK_RELATION_NULL,
+             NAVRELATION_CONTAINING_DOCUMENT,
+             IA2_RELATION_CONTAINING_DOCUMENT)
+
+RELATIONTYPE(CONTAINING_TAB_PANE,
+             "containing tab pane",
+             ATK_RELATION_NULL,
+             NAVRELATION_CONTAINING_TAB_PANE,
+             IA2_RELATION_CONTAINING_TAB_PANE)
+
+RELATIONTYPE(CONTAINING_APPLICATION,
+             "containing application",
+             ATK_RELATION_NULL,
+             NAVRELATION_CONTAINING_APPLICATION,
+             IA2_RELATION_CONTAINING_APPLICATION)
--- a/accessible/src/generic/Accessible.cpp
+++ b/accessible/src/generic/Accessible.cpp
@@ -8,16 +8,18 @@
 #include "nsIXBLAccessible.h"
 
 #include "AccCollector.h"
 #include "AccGroupInfo.h"
 #include "AccIterator.h"
 #include "nsAccUtils.h"
 #include "nsAccessibleRelation.h"
 #include "nsAccessibilityService.h"
+#include "ApplicationAccessible.h"
+#include "nsCoreUtils.h"
 #include "nsIAccessibleRelation.h"
 #include "nsIAccessibleRole.h"
 #include "nsEventShell.h"
 #include "nsTextEquivUtils.h"
 #include "Relation.h"
 #include "Role.h"
 #include "RootAccessible.h"
 #include "States.h"
@@ -2175,16 +2177,43 @@ Accessible::RelationByType(RelationType 
           }
           nsCOMPtr<nsIContent> relatedContent(do_QueryInterface(buttonEl));
           return Relation(mDoc, relatedContent);
         }
       }
       return Relation();
     }
 
+    case RelationType::CONTAINING_DOCUMENT:
+      return Relation(mDoc);
+
+    case RelationType::CONTAINING_TAB_PANE: {
+      nsCOMPtr<nsIDocShell> docShell =
+        nsCoreUtils::GetDocShellFor(GetNode());
+      if (docShell) {
+        // Walk up the parent chain without crossing the boundary at which item
+        // types change, preventing us from walking up out of tab content.
+        nsCOMPtr<nsIDocShellTreeItem> root;
+        docShell->GetSameTypeRootTreeItem(getter_AddRefs(root));
+        if (root) {
+          // If the item type is typeContent, we assume we are in browser tab
+          // content. Note, this includes content such as about:addons,
+          // for consistency.
+          int32_t itemType = 0;
+          root->GetItemType(&itemType);
+          if (itemType == nsIDocShellTreeItem::typeContent)
+            return Relation(nsAccUtils::GetDocAccessibleFor(root));
+        }
+      }
+      return  Relation();
+    }
+
+    case RelationType::CONTAINING_APPLICATION:
+      return Relation(ApplicationAcc());
+
     default:
       return Relation();
   }
 }
 
 NS_IMETHODIMP
 Accessible::GetRelations(nsIArray **aRelations)
 {
@@ -2209,17 +2238,20 @@ Accessible::GetRelations(nsIArray **aRel
     nsIAccessibleRelation::RELATION_FLOWS_TO,
     nsIAccessibleRelation::RELATION_FLOWS_FROM,
     nsIAccessibleRelation::RELATION_MEMBER_OF,
     nsIAccessibleRelation::RELATION_SUBWINDOW_OF,
     nsIAccessibleRelation::RELATION_EMBEDS,
     nsIAccessibleRelation::RELATION_EMBEDDED_BY,
     nsIAccessibleRelation::RELATION_POPUP_FOR,
     nsIAccessibleRelation::RELATION_PARENT_WINDOW_OF,
-    nsIAccessibleRelation::RELATION_DEFAULT_BUTTON
+    nsIAccessibleRelation::RELATION_DEFAULT_BUTTON,
+    nsIAccessibleRelation::RELATION_CONTAINING_DOCUMENT,
+    nsIAccessibleRelation::RELATION_CONTAINING_TAB_PANE,
+    nsIAccessibleRelation::RELATION_CONTAINING_APPLICATION
   };
 
   for (uint32_t idx = 0; idx < ArrayLength(relationTypes); idx++) {
     nsCOMPtr<nsIAccessibleRelation> relation;
     nsresult rv = GetRelationByType(relationTypes[idx], getter_AddRefs(relation));
 
     if (NS_SUCCEEDED(rv) && relation) {
       uint32_t targets = 0;
--- a/accessible/src/windows/msaa/AccessibleWrap.h
+++ b/accessible/src/windows/msaa/AccessibleWrap.h
@@ -197,16 +197,19 @@ protected:
     NAVRELATION_SUBWINDOW_OF = 0x1008,
     NAVRELATION_EMBEDS = 0x1009,
     NAVRELATION_EMBEDDED_BY = 0x100a,
     NAVRELATION_POPUP_FOR = 0x100b,
     NAVRELATION_PARENT_WINDOW_OF = 0x100c,
     NAVRELATION_DEFAULT_BUTTON = 0x100d,
     NAVRELATION_DESCRIBED_BY = 0x100e,
     NAVRELATION_DESCRIPTION_FOR = 0x100f,
-    NAVRELATION_NODE_PARENT_OF = 0x1010
+    NAVRELATION_NODE_PARENT_OF = 0x1010,
+    NAVRELATION_CONTAINING_DOCUMENT = 0x1011,
+    NAVRELATION_CONTAINING_TAB_PANE = 0x1012,
+    NAVRELATION_CONTAINING_APPLICATION = 0x1014
   };
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif
--- a/accessible/src/windows/msaa/ServiceProvider.cpp
+++ b/accessible/src/windows/msaa/ServiceProvider.cpp
@@ -6,16 +6,17 @@
 
 #include "ServiceProvider.h"
 
 #include "ApplicationAccessibleWrap.h"
 #include "Compatibility.h"
 #include "DocAccessible.h"
 #include "nsAccUtils.h"
 #include "nsCoreUtils.h"
+#include "Relation.h"
 #include "uiaRawElmProvider.h"
 
 #include "mozilla/Preferences.h"
 #include "nsIDocShell.h"
 
 #include "ISimpleDOMNode_i.c"
 
 namespace mozilla {
@@ -55,43 +56,22 @@ ServiceProvider::QueryService(REFGUID aG
   // A use case for this is for screen readers that need to switch context or
   // 'virtual buffer' when focus moves from one browser tab area to another.
   static const GUID SID_IAccessibleContentDocument =
     { 0xa5d8e1f3,0x3571,0x4d8f,{0x95,0x21,0x07,0xed,0x28,0xfb,0x07,0x2e} };
   if (aGuidService == SID_IAccessibleContentDocument) {
     if (aIID != IID_IAccessible)
       return E_NOINTERFACE;
 
-    nsCOMPtr<nsIDocShell> docShell =
-      nsCoreUtils::GetDocShellFor(mAccessible->GetNode());
-    if (!docShell)
-      return E_UNEXPECTED;
-
-    // Walk up the parent chain without crossing the boundary at which item
-    // types change, preventing us from walking up out of tab content.
-    nsCOMPtr<nsIDocShellTreeItem> root;
-    docShell->GetSameTypeRootTreeItem(getter_AddRefs(root));
-    if (!root)
-      return E_UNEXPECTED;
-
-
-    // If the item type is typeContent, we assume we are in browser tab content.
-    // Note this includes content such as about:addons, for consistency.
-    int32_t itemType;
-    root->GetItemType(&itemType);
-    if (itemType != nsIDocShellTreeItem::typeContent)
+    Relation rel = mAccessible->RelationByType(RelationType::CONTAINING_TAB_PANE);
+    AccessibleWrap* tabDoc = static_cast<AccessibleWrap*>(rel.Next());
+    if (!tabDoc)
       return E_NOINTERFACE;
 
-    // Make sure this is a document.
-    DocAccessible* docAcc = nsAccUtils::GetDocAccessibleFor(root);
-    if (!docAcc)
-      return E_UNEXPECTED;
-
-    *aInstancePtr = static_cast<IAccessible*>(docAcc);
-
+    *aInstancePtr = static_cast<IAccessible*>(tabDoc);
     (reinterpret_cast<IUnknown*>(*aInstancePtr))->AddRef();
     return S_OK;
   }
 
   // Can get to IAccessibleApplication from any node via QS
   if (aGuidService == IID_IAccessibleApplication ||
       (Compatibility::IsJAWS() && aIID == IID_IAccessibleApplication)) {
     ApplicationAccessibleWrap* applicationAcc =
--- a/accessible/tests/mochitest/relations.js
+++ b/accessible/tests/mochitest/relations.js
@@ -13,16 +13,19 @@ const RELATION_FLOWS_TO = nsIAccessibleR
 const RELATION_LABEL_FOR = nsIAccessibleRelation.RELATION_LABEL_FOR;
 const RELATION_LABELLED_BY = nsIAccessibleRelation.RELATION_LABELLED_BY;
 const RELATION_MEMBER_OF = nsIAccessibleRelation.RELATION_MEMBER_OF;
 const RELATION_NODE_CHILD_OF = nsIAccessibleRelation.RELATION_NODE_CHILD_OF;
 const RELATION_NODE_PARENT_OF = nsIAccessibleRelation.RELATION_NODE_PARENT_OF;
 const RELATION_PARENT_WINDOW_OF = nsIAccessibleRelation.RELATION_PARENT_WINDOW_OF;
 const RELATION_POPUP_FOR = nsIAccessibleRelation.RELATION_POPUP_FOR;
 const RELATION_SUBWINDOW_OF = nsIAccessibleRelation.RELATION_SUBWINDOW_OF;
+const RELATION_CONTAINING_DOCUMENT = nsIAccessibleRelation.RELATION_CONTAINING_DOCUMENT;
+const RELATION_CONTAINING_TAB_PANE = nsIAccessibleRelation.RELATION_CONTAINING_TAB_PANE;
+const RELATION_CONTAINING_APPLICATION = nsIAccessibleRelation.RELATION_CONTAINING_APPLICATION;
 
 ////////////////////////////////////////////////////////////////////////////////
 // General
 
 /**
  * Test the accessible relation.
  *
  * @param aIdentifier          [in] identifier to get an accessible, may be ID
--- a/accessible/tests/mochitest/relations/test_general.html
+++ b/accessible/tests/mochitest/relations/test_general.html
@@ -162,16 +162,21 @@
       testRelation("caption", RELATION_LABEL_FOR, "table");
       testRelation("table", RELATION_LABELLED_BY, "caption");
 
       // 'labelled by'/'label for' relation for html:fieldset and
       // html:legend
       testRelation("legend", RELATION_LABEL_FOR, "fieldset");
       testRelation("fieldset", RELATION_LABELLED_BY, "legend");
 
+      // containing relations
+      testRelation("control1_1", RELATION_CONTAINING_DOCUMENT, document);
+      testRelation("control1_1", RELATION_CONTAINING_TAB_PANE, getTabDocAccessible("control1_1"));
+      testRelation("control1_1", RELATION_CONTAINING_APPLICATION, getApplicationAccessible());
+
       // finish test
       SimpleTest.finish();
     }
 
     disableLogging(); // from test_embeds.xul
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   </script>
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -1,4 +1,4 @@
 {
-    "revision": "f6bdd9d219b832b059ecc42df53a3882479db9de", 
+    "revision": "7824a49ab738f1f070e746474f5f225a831b1d45", 
     "repo_path": "/integration/gaia-central"
 }
--- a/browser/base/content/test/general/browser.ini
+++ b/browser/base/content/test/general/browser.ini
@@ -73,16 +73,22 @@ support-files =
   test_bug435035.html
   test_bug462673.html
   test_bug628179.html
   test_bug839103.html
   test_wyciwyg_copying.html
   title_test.svg
   video.ogg
   zoom_test.html
+  test_no_mcb_on_http_site_img.html
+  test_no_mcb_on_http_site_img.css
+  test_no_mcb_on_http_site_font.html
+  test_no_mcb_on_http_site_font.css
+  test_no_mcb_on_http_site_font2.html
+  test_no_mcb_on_http_site_font2.css
 
 [browser_CTP_data_urls.js]
 [browser_CTP_drag_drop.js]
 [browser_CTP_iframe.js]
 [browser_CTP_nonplugins.js]
 [browser_CTP_resize.js]
 [browser_URLBarSetURI.js]
 [browser_aboutHealthReport.js]
@@ -283,8 +289,9 @@ support-files =
 [browser_visibleTabs_bookmarkAllPages.js]
 [browser_visibleTabs_bookmarkAllTabs.js]
 [browser_visibleTabs_contextMenu.js]
 [browser_visibleTabs_tabPreview.js]
 [browser_wyciwyg_urlbarCopying.js]
 [browser_zbug569342.js]
 [browser_registerProtocolHandler_notification.js]
 [browser_registerProtocolHandler_notification.html]
+[browser_no_mcb_on_http_site.js]
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/general/browser_no_mcb_on_http_site.js
@@ -0,0 +1,138 @@
+/*
+ * Description of the Tests for
+ *  - Bug 909920 - Mixed content warning should not show on a HTTP site
+ *
+ * Description of the tests:
+ *   Test 1:
+ *     1) Load an http page
+ *     2) The page includes a css file using https
+ *     3) The css file loads an |IMAGE| << over http
+ *
+ *   Test 2:
+ *     1) Load an http page
+ *     2) The page includes a css file using https
+ *     3) The css file loads a |FONT| over http
+ *
+ *   Test 3:
+ *     1) Load an http page
+ *     2) The page includes a css file using https
+ *     3) The css file imports (@import) another css file using http
+ *     3) The imported css file loads a |FONT| over http
+*
+ * Since the top-domain is >> NOT << served using https, the MCB
+ * should >> NOT << trigger a warning.
+ */
+
+const PREF_ACTIVE = "security.mixed_content.block_active_content";
+const PREF_DISPLAY = "security.mixed_content.block_display_content";
+
+const gHttpTestRoot = "http://example.com/browser/browser/base/content/test/general/";
+
+var origBlockActive, origBlockDisplay;
+var gTestBrowser = null;
+
+registerCleanupFunction(function() {
+  // Set preferences back to their original values
+  Services.prefs.setBoolPref(PREF_ACTIVE, origBlockActive);
+  Services.prefs.setBoolPref(PREF_DISPLAY, origBlockDisplay);
+});
+
+function cleanUpAfterTests() {
+  gBrowser.removeCurrentTab();
+  window.focus();
+  finish();
+}
+
+function waitForCondition(condition, nextTest, errorMsg, okMsg) {
+  var tries = 0;
+  var interval = setInterval(function() {
+    if (tries >= 30) {
+      ok(false, errorMsg);
+      moveOn();
+    }
+    if (condition()) {
+      ok(true, okMsg)
+      moveOn();
+    }
+    tries++;
+  }, 100);
+  var moveOn = function() {
+    clearInterval(interval); nextTest();
+  };
+}
+
+//------------- TEST 1 -----------------------------------------
+
+function test1A() {
+  gTestBrowser.removeEventListener("load", test1A, true);
+
+  var expected = "Verifying MCB does not trigger warning/error for an http page ";
+  expected += "with https css that includes http image";
+  waitForCondition(
+    function() content.document.getElementById('testDiv').innerHTML == expected,
+    test1B, "Error: Waited too long for status in Test 1!",
+    "OK: Expected result in innerHTML!");
+}
+
+function test1B() {
+  // set up test 2
+  gTestBrowser.addEventListener("load", test2A, true);
+  var url = gHttpTestRoot + "test_no_mcb_on_http_site_font.html";
+  gTestBrowser.contentWindow.location = url;
+}
+
+//------------- TEST 2 -----------------------------------------
+
+function test2A() {
+  gTestBrowser.removeEventListener("load", test2A, true);
+
+  var expected = "Verifying MCB does not trigger warning/error for an http page ";
+  expected += "with https css that includes http font";
+  waitForCondition(
+    function() content.document.getElementById('testDiv').innerHTML == expected,
+    test2B, "Error: Waited too long for status in Test 2!",
+    "OK: Expected result in innerHTML!");
+}
+
+function test2B() {
+  // set up test 3
+  gTestBrowser.addEventListener("load", test3, true);
+  var url = gHttpTestRoot + "test_no_mcb_on_http_site_font2.html";
+  gTestBrowser.contentWindow.location = url;
+}
+
+//------------- TEST 3 -----------------------------------------
+
+function test3() {
+  gTestBrowser.removeEventListener("load", test3, true);
+
+  var expected = "Verifying MCB does not trigger warning/error for an http page "
+  expected += "with https css that imports another http css which includes http font";
+  waitForCondition(
+    function() content.document.getElementById('testDiv').innerHTML == expected,
+    cleanUpAfterTests, "Error: Waited too long for status in Test 3!",
+    "OK: Expected result in innerHTML!");
+}
+
+//------------------------------------------------------
+
+function test() {
+  // Performing async calls, e.g. 'onload', we have to wait till all of them finished
+  waitForExplicitFinish();
+
+  // Store original preferences so we can restore settings after testing
+  origBlockActive = Services.prefs.getBoolPref(PREF_ACTIVE);
+  origBlockDisplay = Services.prefs.getBoolPref(PREF_DISPLAY);
+
+  Services.prefs.setBoolPref(PREF_ACTIVE, true);
+  Services.prefs.setBoolPref(PREF_DISPLAY, true);
+
+  var newTab = gBrowser.addTab();
+  gBrowser.selectedTab = newTab;
+  gTestBrowser = gBrowser.selectedBrowser;
+  newTab.linkedBrowser.stop();
+
+  gTestBrowser.addEventListener("load", test1A, true);
+  var url = gHttpTestRoot + "test_no_mcb_on_http_site_img.html";
+  gTestBrowser.contentWindow.location = url;
+}
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/general/test_no_mcb_on_http_site_font.css
@@ -0,0 +1,10 @@
+@font-face {
+  font-family: testFont;
+  src: url(http://example.com/browser/browser/devtools/fontinspector/test/browser_font.woff);
+}
+body {
+  font-family: Arial;
+}
+div {
+  font-family: testFont;
+}
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/general/test_no_mcb_on_http_site_font.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+  Test 2 for Bug 909920 - See file browser_no_mcb_on_http_site.js for description.
+  https://bugzilla.mozilla.org/show_bug.cgi?id=909920
+-->
+<head>
+  <meta charset="utf-8">
+  <title>Test 2 for Bug 909920</title>
+  <link rel="stylesheet" type="text/css" href="https://example.com/browser/browser/base/content/test/general/test_no_mcb_on_http_site_font.css" />
+<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+
+<script type="text/javascript">
+  function checkLoadStates() {
+   var ui = SpecialPowers.wrap(window)
+            .QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor)
+             .getInterface(SpecialPowers.Ci.nsIWebNavigation)
+             .QueryInterface(SpecialPowers.Ci.nsIDocShell)
+             .securityUI;
+
+   var loadedMixedActive = ui &&
+     (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_LOADED_MIXED_ACTIVE_CONTENT);
+   is(loadedMixedActive, false, "OK: Should not load mixed active content!");
+
+   var blockedMixedActive = ui &&
+       (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_BLOCKED_MIXED_ACTIVE_CONTENT);
+   is(blockedMixedActive, false, "OK: Should not block mixed active content!");
+
+   var loadedMixedDisplay = ui &&
+     (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_LOADED_MIXED_DISPLAY_CONTENT);
+   is(loadedMixedDisplay, false, "OK: Should not load mixed display content!");
+
+   var blockedMixedDisplay = ui &&
+     (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_BLOCKED_MIXED_DISPLAY_CONTENT);
+   is(blockedMixedDisplay, false, "OK: Should not block mixed display content!");
+
+   var newValue = "Verifying MCB does not trigger warning/error for an http page with https css that includes http font";
+   document.getElementById("testDiv").innerHTML = newValue;
+  }
+</script>
+</head>
+<body onload="checkLoadStates()">
+  <div class="testDiv" id="testDiv">
+    Testing MCB does not trigger warning/error for an http page with https css that includes http font
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/general/test_no_mcb_on_http_site_font2.css
@@ -0,0 +1,1 @@
+@import url(http://example.com/browser/browser/base/content/test/general/test_no_mcb_on_http_site_font.css);
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/general/test_no_mcb_on_http_site_font2.html
@@ -0,0 +1,48 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+  Test 3 for Bug 909920 - See file browser_no_mcb_on_http_site.js for description.
+  https://bugzilla.mozilla.org/show_bug.cgi?id=909920
+-->
+<head>
+  <meta charset="utf-8">
+  <title>Test 3 for Bug 909920</title>
+  <link rel="stylesheet" type="text/css" href="https://example.com/browser/browser/base/content/test/general/test_no_mcb_on_http_site_font2.css" />
+<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+
+<script type="text/javascript">
+  function checkLoadStates() {
+   var ui = SpecialPowers.wrap(window)
+        .QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor)
+             .getInterface(SpecialPowers.Ci.nsIWebNavigation)
+             .QueryInterface(SpecialPowers.Ci.nsIDocShell)
+             .securityUI;
+
+   var loadedMixedActive = ui &&
+     (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_LOADED_MIXED_ACTIVE_CONTENT);
+   is(loadedMixedActive, false, "OK: Should not load mixed active content!");
+
+   var blockedMixedActive = ui &&
+       (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_BLOCKED_MIXED_ACTIVE_CONTENT);
+   is(blockedMixedActive, false, "OK: Should not block mixed active content!");
+
+   var loadedMixedDisplay = ui &&
+     (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_LOADED_MIXED_DISPLAY_CONTENT);
+   is(loadedMixedDisplay, false, "OK: Should not load mixed display content!");
+
+   var blockedMixedDisplay = ui &&
+     (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_BLOCKED_MIXED_DISPLAY_CONTENT);
+   is(blockedMixedDisplay, false, "OK: Should not block mixed display content!");
+
+   var newValue = "Verifying MCB does not trigger warning/error for an http page ";
+    newValue += "with https css that imports another http css which includes http font";
+   document.getElementById("testDiv").innerHTML = newValue;
+  }
+</script>
+</head>
+<body onload="checkLoadStates()">
+  <div class="testDiv" id="testDiv">
+    Testing MCB does not trigger warning/error for an http page with https css that imports another http css which includes http font
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/general/test_no_mcb_on_http_site_img.css
@@ -0,0 +1,3 @@
+#testDiv {
+  background: url(http://example.com/tests/image/test/mochitest/blue.png)
+}
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/general/test_no_mcb_on_http_site_img.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+  Test 1 for Bug 909920 - See file browser_no_mcb_on_http_site.js for description.
+  https://bugzilla.mozilla.org/show_bug.cgi?id=909920
+-->
+<head>
+  <meta charset="utf-8">
+  <title>Test 1 for Bug 909920</title>
+  <link rel="stylesheet" type="text/css" href="https://example.com/browser/browser/base/content/test/general/test_no_mcb_on_http_site_img.css" />
+<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+
+<script type="text/javascript">
+  function checkLoadStates() {
+   var ui = SpecialPowers.wrap(window)
+            .QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor)
+             .getInterface(SpecialPowers.Ci.nsIWebNavigation)
+             .QueryInterface(SpecialPowers.Ci.nsIDocShell)
+             .securityUI;
+
+   var loadedMixedActive = ui &&
+     (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_LOADED_MIXED_ACTIVE_CONTENT);
+   is(loadedMixedActive, false, "OK: Should not load mixed active content!");
+
+   var blockedMixedActive = ui &&
+       (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_BLOCKED_MIXED_ACTIVE_CONTENT);
+   is(blockedMixedActive, false, "OK: Should not block mixed active content!");
+
+   var loadedMixedDisplay = ui &&
+     (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_LOADED_MIXED_DISPLAY_CONTENT);
+   is(loadedMixedDisplay, false, "OK: Should not load mixed display content!");
+
+   var blockedMixedDisplay = ui &&
+     (ui.state & SpecialPowers.Ci.nsIWebProgressListener.STATE_BLOCKED_MIXED_DISPLAY_CONTENT);
+   is(blockedMixedDisplay, false, "OK: Should not block mixed display content!");
+
+   var newValue = "Verifying MCB does not trigger warning/error for an http page with https css that includes http image";
+   document.getElementById("testDiv").innerHTML = newValue;
+  }
+</script>
+</head>
+<body onload="checkLoadStates()">
+  <div class="testDiv" id="testDiv">
+    Testing MCB does not trigger warning/error for an http page with https css that includes http image
+  </div>
+</body>
+</html>
--- a/browser/components/about/Makefile.in
+++ b/browser/components/about/Makefile.in
@@ -1,8 +1,7 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 USE_STATIC_LIBS = 1
 
 LOCAL_INCLUDES = -I$(srcdir)/../build
--- a/browser/components/about/moz.build
+++ b/browser/components/about/moz.build
@@ -11,8 +11,9 @@ EXPORTS.mozilla.browser += [
 ]
 
 SOURCES += [
     'AboutRedirector.cpp',
 ]
 
 LIBRARY_NAME = 'browserabout_s'
 
+FORCE_STATIC_LIB = True
--- a/browser/components/dirprovider/Makefile.in
+++ b/browser/components/dirprovider/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 USE_STATIC_LIBS = 1
 
 LOCAL_INCLUDES = -I$(srcdir)/../build
 
 EXTRA_DSO_LDOPTS = \
 	$(XPCOM_GLUE_LDOPTS) \
 	$(NSPR_LIBS) \
 	$(NULL)
--- a/browser/components/dirprovider/moz.build
+++ b/browser/components/dirprovider/moz.build
@@ -14,8 +14,10 @@ SOURCES += [
     'DirectoryProvider.cpp',
 ]
 
 LIBRARY_NAME = 'browserdir_s'
 
 XPCSHELL_TESTS_MANIFESTS += [
     'tests/unit/xpcshell.ini',
 ]
+
+FORCE_STATIC_LIB = True
--- a/browser/components/feeds/src/Makefile.in
+++ b/browser/components/feeds/src/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 USE_STATIC_LIBS = 1
 
 DEFINES += \
 	-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
 	-DMOZ_MACBUNDLE_NAME=$(MOZ_MACBUNDLE_NAME) \
 	$(NULL)
 
 
--- a/browser/components/feeds/src/moz.build
+++ b/browser/components/feeds/src/moz.build
@@ -17,8 +17,9 @@ EXTRA_COMPONENTS += [
 ]
 
 EXTRA_PP_COMPONENTS += [
     'FeedWriter.js',
 ]
 
 LIBRARY_NAME = 'browser_feeds_s'
 
+FORCE_STATIC_LIB = True
--- a/browser/components/migration/src/Makefile.in
+++ b/browser/components/migration/src/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 USE_STATIC_LIBS = 1
 
 
 ifeq ($(OS_ARCH),WINNT)
 
 DEFINES += -DHAS_IE_MIGRATOR -DHAS_SAFARI_MIGRATOR
 endif
 
--- a/browser/components/migration/src/moz.build
+++ b/browser/components/migration/src/moz.build
@@ -37,8 +37,9 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
     ]
 
 LIBRARY_NAME = 'migration_s'
 
 EXTRA_PP_JS_MODULES += [
     'MigrationUtils.jsm',
 ]
 
+FORCE_STATIC_LIB = True
--- a/browser/components/shell/src/Makefile.in
+++ b/browser/components/shell/src/Makefile.in
@@ -1,14 +1,13 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 USE_STATIC_LIBS = 1
 
 
 include $(topsrcdir)/config/rules.mk
 
 DEFINES += -DMOZ_APP_NAME=\"$(MOZ_APP_NAME)\" \
   -DMOZ_APP_VERSION=\"$(MOZ_APP_VERSION)\"
 
--- a/browser/components/shell/src/moz.build
+++ b/browser/components/shell/src/moz.build
@@ -21,8 +21,10 @@ elif CONFIG['MOZ_WIDGET_GTK']:
 
 if SOURCES:
     LIBRARY_NAME = 'shellservice_s'
 
 EXTRA_COMPONENTS += [
     'nsSetDefaultBrowser.js',
     'nsSetDefaultBrowser.manifest',
 ]
+
+FORCE_STATIC_LIB = True
--- a/build/annotationProcessors/Makefile.in
+++ b/build/annotationProcessors/Makefile.in
@@ -1,25 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-JAVA_JAR_TARGETS += annotationProcessors
-annotationProcessors_DEST := annotationProcessors.jar
-annotationProcessors_JAVAFILES := \
-  AnnotationProcessor.java \
-  CodeGenerator.java \
-  MethodWithAnnotationInfo.java \
-  classloader/IterableJarLoadingURLClassLoader.java \
-  classloader/JarClassIterator.java \
-  utils/AlphabeticMethodComparator.java \
-  utils/GeneratableEntryPointIterator.java \
-  utils/Utils.java \
-  $(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 JAVA_CLASSPATH := $(ANDROID_SDK)/android.jar
 
 # Include Android specific java flags, instead of what's in rules.mk.
 include $(topsrcdir)/config/android-common.mk
 
 libs:: annotationProcessors.jar
--- a/build/annotationProcessors/moz.build
+++ b/build/annotationProcessors/moz.build
@@ -1,5 +1,17 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+jar = add_java_jar('annotationProcessors')
+jar.sources += [
+    'AnnotationProcessor.java',
+    'CodeGenerator.java',
+    'MethodWithAnnotationInfo.java',
+    'classloader/IterableJarLoadingURLClassLoader.java',
+    'classloader/JarClassIterator.java',
+    'utils/AlphabeticMethodComparator.java',
+    'utils/GeneratableEntryPointIterator.java',
+    'utils/Utils.java',
+]
--- a/build/stlport/Makefile.in
+++ b/build/stlport/Makefile.in
@@ -1,14 +1,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULES = stlport
-FORCE_STATIC_LIB = 1
 STL_FLAGS =
 
 # Force to build a static library, instead of a fake library, without
 # installing it in dist/lib.
 LIBRARY = $(LIB_PREFIX)$(LIBRARY_NAME).$(LIB_SUFFIX)
 
 VPATH += $(srcdir)/src
 
--- a/build/stlport/moz.build
+++ b/build/stlport/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LIBRARY_NAME = 'stlport_static'
 
+FORCE_STATIC_LIB = True
--- a/build/unix/stdc++compat/Makefile.in
+++ b/build/unix/stdc++compat/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB= 1
 STL_FLAGS =
 NO_EXPAND_LIBS = 1
 NO_PROFILE_GUIDED_OPTIMIZE = 1
 
 include $(topsrcdir)/config/rules.mk
 
 CXXFLAGS += -DMOZ_LIBSTDCXX_VERSION=$(MOZ_LIBSTDCXX_TARGET_VERSION)
 HOST_CXXFLAGS += -DMOZ_LIBSTDCXX_VERSION=$(MOZ_LIBSTDCXX_HOST_VERSION)
--- a/build/unix/stdc++compat/moz.build
+++ b/build/unix/stdc++compat/moz.build
@@ -11,8 +11,9 @@ if CONFIG['MOZ_LIBSTDCXX_TARGET_VERSION'
     SOURCES += ['stdc++compat.cpp']
 
 if CONFIG['MOZ_LIBSTDCXX_HOST_VERSION']:
     HOST_LIBRARY_NAME = 'host_stdc++compat'
     HOST_SOURCES += [
         'stdc++compat.cpp',
     ]
 
+FORCE_STATIC_LIB = True
--- a/config/config.mk
+++ b/config/config.mk
@@ -36,22 +36,24 @@ endif
 _MOZBUILD_EXTERNAL_VARIABLES := \
   ANDROID_GENERATED_RESFILES \
   ANDROID_RESFILES \
   CMMSRCS \
   CPP_UNIT_TESTS \
   DIRS \
   EXTRA_PP_COMPONENTS \
   EXTRA_PP_JS_MODULES \
+  FORCE_STATIC_LIB \
   GTEST_CMMSRCS \
   GTEST_CPPSRCS \
   GTEST_CSRCS \
   HOST_CSRCS \
   HOST_LIBRARY_NAME \
   IS_COMPONENT \
+  JAVA_JAR_TARGETS \
   JS_MODULES_PATH \
   LIBRARY_NAME \
   LIBXUL_LIBRARY \
   MODULE \
   MSVC_ENABLE_PGO \
   NO_DIST_INSTALL \
   PARALLEL_DIRS \
   SDK_HEADERS \
--- a/configure.in
+++ b/configure.in
@@ -229,18 +229,17 @@ if test -n "$gonkdir" ; then
         MOZ_RTSP=1
         ;;
     17|18)
         GONK_INCLUDES="-I$gonkdir/frameworks/native/include -I$gonkdir/frameworks/av/include -I$gonkdir/frameworks/av/include/media -I$gonkdir/frameworks/av/include/camera -I$gonkdir/frameworks/native/include/media/openmax -I$gonkdir/frameworks/av/media/libstagefright/include"
         if test -d "$gonkdir/external/bluetooth/bluez"; then
           GONK_INCLUDES="$GONK_INCLUDES -I$gonkdir/external/dbus -I$gonkdir/external/bluetooth/bluez/lib"
             MOZ_B2G_BT=1
             MOZ_B2G_BT_BLUEZ=1
-        fi
-        if test -d "$gonkdir/external/bluetooth/bluedroid"; then
+        elif test -d "$gonkdir/external/bluetooth/bluedroid"; then
             MOZ_B2G_BT=1
             MOZ_B2G_BT_BLUEDROID=1
         fi
 
         MOZ_B2G_CAMERA=1
         MOZ_OMX_DECODER=1
         AC_SUBST(MOZ_OMX_DECODER)
         ;;
--- a/content/base/src/CSPUtils.jsm
+++ b/content/base/src/CSPUtils.jsm
@@ -981,17 +981,16 @@ CSPSourceList.fromString = function(aStr
 
     // if a source allows unsafe-eval, set our flag to indicate this.
     if (src._allowUnsafeEval)
       slObj._allowUnsafeEval = true;
 
     // if a source is a *, then we can permit all sources
     if (src.permitAll) {
       slObj._permitAllSources = true;
-      return slObj;
     } else {
       slObj._sources.push(src);
     }
   }
 
   return slObj;
 };
 
--- a/content/base/src/nsMixedContentBlocker.cpp
+++ b/content/base/src/nsMixedContentBlocker.cpp
@@ -338,64 +338,95 @@ nsMixedContentBlocker::ShouldLoad(uint32
       NS_FAILED(NS_URIChainHasFlags(aContentLocation, nsIProtocolHandler::URI_SAFE_TO_LOAD_IN_SECURE_CONTEXT, &schemeSecure))) {
     return NS_ERROR_FAILURE;
   }
 
   if (schemeLocal || schemeNoReturnData || schemeInherits || schemeSecure) {
      return NS_OK;
   }
 
-  // We need aRequestingLocation to pull out the scheme. If it isn't passed
-  // in, get it from the aRequestingPricipal
-  if (!aRequestingLocation) {
-    if (!aRequestPrincipal) {
-      // If we don't have aRequestPrincipal, try getting it from the
-      // DOM node using aRequestingContext
-      nsCOMPtr<nsINode> node = do_QueryInterface(aRequestingContext);
-      if (node) {
-        aRequestPrincipal = node->NodePrincipal();
-      } else {
-        // Try using the window's script object principal if it's not a node.
-        nsCOMPtr<nsIScriptObjectPrincipal> scriptObjPrin = do_QueryInterface(aRequestingContext);
-        if (scriptObjPrin) {
-          aRequestPrincipal = scriptObjPrin->GetPrincipal();
-        }
-      }
+  // Since there are cases where aRequestingLocation and aRequestPrincipal are
+  // definitely not the owning document, we try to ignore them by extracting the
+  // requestingLocation in the following order:
+  // 1) from the aRequestingContext, either extracting
+  //    a) the node's principal, or the
+  //    b) script object's principal.
+  // 2) if aRequestingContext yields a principal but no location, we check
+  //    if its the system principal. If it is, allow the load.
+  // 3) Special case handling for:
+  //    a) speculative loads, where shouldLoad is called twice (bug 839235)
+  //       and the first speculative load does not include a context.
+  //       In this case we use aRequestingLocation to set requestingLocation.
+  //    b) TYPE_CSP_REPORT which does not provide a context. In this case we
+  //       use aRequestingLocation to set requestingLocation.
+  //    c) content scripts from addon code that do not provide aRequestingContext
+  //       or aRequestingLocation, but do provide aRequestPrincipal.
+  //       If aRequestPrincipal is an expanded principal, we allow the load.
+  // 4) If we still end up not having a requestingLocation, we reject the load.
+
+  nsCOMPtr<nsIPrincipal> principal;
+  // 1a) Try to get the principal if aRequestingContext is a node.
+  nsCOMPtr<nsINode> node = do_QueryInterface(aRequestingContext);
+  if (node) {
+    principal = node->NodePrincipal();
+  }
+
+  // 1b) Try using the window's script object principal if it's not a node.
+  if (!principal) {
+    nsCOMPtr<nsIScriptObjectPrincipal> scriptObjPrin = do_QueryInterface(aRequestingContext);
+    if (scriptObjPrin) {
+      principal = scriptObjPrin->GetPrincipal();
     }
-    if (aRequestPrincipal) {
-      nsCOMPtr<nsIURI> principalUri;
-      nsresult rvalue = aRequestPrincipal->GetURI(getter_AddRefs(principalUri));
-      if (NS_SUCCEEDED(rvalue)) {
-        aRequestingLocation = principalUri;
-      }
+  }
+
+  nsCOMPtr<nsIURI> requestingLocation;
+  if (principal) {
+    principal->GetURI(getter_AddRefs(requestingLocation));
+  }
+
+  // 2) if aRequestingContext yields a principal but no location, we check if its a system principal.
+  if (principal && !requestingLocation) {
+    if (nsContentUtils::IsSystemPrincipal(principal)) {
+      *aDecision = ACCEPT;
+      return NS_OK;
     }
+  }
 
-    if (!aRequestingLocation) {
-      // If content scripts from an addon are causing this load, they have an
-      // ExpandedPrincipal instead of a Principal. This is pseudo-privileged code, so allow
-      // the load. Or if this is system principal, allow the load.
-      nsCOMPtr<nsIExpandedPrincipal> expanded = do_QueryInterface(aRequestPrincipal);
-      if (expanded || (aRequestPrincipal && nsContentUtils::IsSystemPrincipal(aRequestPrincipal))) {
-        *aDecision = ACCEPT;
-        return NS_OK;
-      } else {
-        // We still don't have a requesting location and there is no Expanded Principal.
-        // We can't tell if this is a mixed content load.  Deny to be safe.
-        *aDecision = REJECT_REQUEST;
-        return NS_OK;
-      }
+  // 3a,b) Special case handling for speculative loads and TYPE_CSP_REPORT. In
+  // such cases, aRequestingContext doesn't exist, so we use aRequestingLocation.
+  // Unfortunately we can not distinguish between speculative and normal loads here,
+  // otherwise we could special case this assignment.
+  if (!requestingLocation) {
+    requestingLocation = aRequestingLocation;
+  }
+
+  // 3c) Special case handling for content scripts from addons code, which only
+  // provide a aRequestPrincipal; aRequestingContext and aRequestingLocation are
+  // both null; if the aRequestPrincipal is an expandedPrincipal, we allow the load.
+  if (!principal && !requestingLocation && aRequestPrincipal) {
+    nsCOMPtr<nsIExpandedPrincipal> expanded = do_QueryInterface(aRequestPrincipal);
+    if (expanded) {
+      *aDecision = ACCEPT;
+      return NS_OK;
     }
   }
 
+  // 4) Giving up. We still don't have a requesting location, therefore we can't tell
+  //    if this is a mixed content load. Deny to be safe.
+  if (!requestingLocation) {
+    *aDecision = REJECT_REQUEST;
+    return NS_OK;
+  }
+
   // Check the parent scheme. If it is not an HTTPS page then mixed content
   // restrictions do not apply.
   bool parentIsHttps;
-  nsresult rv = aRequestingLocation->SchemeIs("https", &parentIsHttps);
+  nsresult rv = requestingLocation->SchemeIs("https", &parentIsHttps);
   if (NS_FAILED(rv)) {
-    NS_ERROR("aRequestingLocation->SchemeIs failed");
+    NS_ERROR("requestingLocation->SchemeIs failed");
     *aDecision = REJECT_REQUEST;
     return NS_OK;
   }
   if (!parentIsHttps) {
     *aDecision = ACCEPT;
     return NS_OK;
   }
 
new file mode 100644
--- /dev/null
+++ b/content/base/test/csp/file_CSP_bug909029_none.html
@@ -0,0 +1,20 @@
+<!doctype html>
+<html>
+  <head>
+    <!-- file_CSP.sjs mocks a resource load -->
+    <link rel='stylesheet' type='text/css'
+          href='file_CSP.sjs?testid=noneExternalStylesBlocked&type=text/css' />
+  </head>
+  <body>
+    <p id="inline-style">This should be green</p>
+    <p id="inline-script">This should be black</p>
+    <style>
+      p#inline-style { color:rgb(0, 128, 0); }
+    </style>
+    <script>
+      // Use inline script to set a style attribute
+      document.getElementById("inline-script").style.color = "rgb(0, 128, 0)";
+    </script>
+    <img src="file_CSP.sjs?testid=noneExternalImgLoaded&type=img/png" />
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/content/base/test/csp/file_CSP_bug909029_none.html^headers^
@@ -0,0 +1,1 @@
+Content-Security-Policy: default-src * ; style-src 'none' 'unsafe-inline';
new file mode 100644
--- /dev/null
+++ b/content/base/test/csp/file_CSP_bug909029_star.html
@@ -0,0 +1,19 @@
+<!doctype html>
+<html>
+  <head>
+    <link rel='stylesheet' type='text/css'
+          href='file_CSP.sjs?testid=starExternalStylesLoaded&type=text/css' />
+  </head>
+  <body>
+    <p id="inline-style">This should be green</p>
+    <p id="inline-script">This should be black</p>
+    <style>
+      p#inline-style { color:rgb(0, 128, 0); }
+    </style>
+    <script>
+      // Use inline script to set a style attribute
+      document.getElementById("inline-script").style.color = "rgb(0, 128, 0)";
+    </script>
+    <img src="file_CSP.sjs?testid=starExternalImgLoaded&type=img/png" />
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/content/base/test/csp/file_CSP_bug909029_star.html^headers^
@@ -0,0 +1,1 @@
+Content-Security-Policy: default-src *; style-src * 'unsafe-inline';
--- a/content/base/test/csp/mochitest.ini
+++ b/content/base/test/csp/mochitest.ini
@@ -73,24 +73,29 @@ support-files =
   file_csp_bug773891.html
   file_csp_bug773891.sjs
   file_csp_redirects_main.html
   file_csp_redirects_page.sjs
   file_csp_redirects_resource.sjs
   file_CSP_bug910139.sjs
   file_CSP_bug910139.xml
   file_CSP_bug910139.xsl
+  file_CSP_bug909029_star.html
+  file_CSP_bug909029_star.html^headers^
+  file_CSP_bug909029_none.html
+  file_CSP_bug909029_none.html^headers^
 
 [test_CSP.html]
 [test_CSP_bug663567.html]
 [test_CSP_bug802872.html]
 [test_CSP_bug885433.html]
 [test_CSP_bug888172.html]
 [test_CSP_bug916446.html]
 [test_CSP_evalscript.html]
 [test_CSP_evalscript_getCRMFRequest.html]
 [test_CSP_frameancestors.html]
 [test_CSP_inlinescript.html]
 [test_CSP_inlinestyle.html]
 [test_bothCSPheaders.html]
 [test_bug836922_npolicies.html]
 [test_csp_redirects.html]
 [test_CSP_bug910139.html]
+[test_CSP_bug909029.html]
new file mode 100644
--- /dev/null
+++ b/content/base/test/csp/test_CSP_bug909029.html
@@ -0,0 +1,140 @@
+<!doctype html>
+<html>
+  <head>
+    <title>Bug 909029 - CSP source-lists ignore some source expressions like 'unsafe-inline' when * or 'none' are used (e.g., style-src, script-src)</title>
+    <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+    <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+  </head>
+  <body>
+    <div id=content style="visibility:hidden">
+      <iframe id=testframe1></iframe>
+      <iframe id=testframe2></iframe>
+    </div>
+    <script class="testbody" type="text/javascript">
+SimpleTest.waitForExplicitFinish();
+
+window.tests = {
+  starExternalStylesLoaded: -1,
+  starExternalImgLoaded: -1,
+  noneExternalStylesBlocked: -1,
+  noneExternalImgLoaded: -1,
+  starInlineStyleAllowed: -1,
+  starInlineScriptBlocked: -1,
+  noneInlineStyleAllowed: -1,
+  noneInlineScriptBlocked: -1
+}
+
+function examiner() {
+  SpecialPowers.addObserver(this, "csp-on-violate-policy", false);
+  SpecialPowers.addObserver(this, "http-on-modify-request", false);
+}
+examiner.prototype  = {
+  observe: function(subject, topic, data) {
+    // subject should be an nsURI, and should be either allowed or blocked.
+    if (!SpecialPowers.can_QI(subject))
+      return;
+
+    var testpat = new RegExp("testid=([a-zA-Z]+)");
+
+    if (topic === "http-on-modify-request") {
+      //these things were allowed by CSP
+      var asciiSpec = SpecialPowers.getPrivilegedProps(SpecialPowers.do_QueryInterface(subject, "nsIHttpChannel"), "URI.asciiSpec");
+      if (!testpat.test(asciiSpec))
+        return;
+      var testid = testpat.exec(asciiSpec)[1];
+      window.testResult(testid,
+                        /Loaded/.test(testid),
+                        "resource loaded");
+    }
+
+    if(topic === "csp-on-violate-policy") {
+      // these were blocked... record that they were blocked
+      // try because the subject could be an nsIURI or an nsISupportsCString
+      try {
+        var asciiSpec = SpecialPowers.getPrivilegedProps(SpecialPowers.do_QueryInterface(subject, "nsIURI"), "asciiSpec");
+        if (!testpat.test(asciiSpec)) return;
+        var testid = testpat.exec(asciiSpec)[1];
+        window.testResult(testid,
+                          /Blocked/.test(testid),
+                          "resource blocked by CSP");
+      } catch(e) {
+        // if that fails, the subject is probably a string. Strings are only
+        // reported for inline and eval violations. Since we are testing those
+        // via the observed effects of script on CSSOM, we can simply ignore
+        // these subjects.
+      }
+    }
+  },
+
+  // must eventually call this to remove the listener,
+  // or mochitests might get borked.
+  remove: function() {
+    SpecialPowers.removeObserver(this, "csp-on-violate-policy");
+    SpecialPowers.removeObserver(this, "http-on-modify-request");
+  }
+}
+
+window.examiner = new examiner();
+
+window.testResult = function(testname, result, msg) {
+  //dump("in testResult: testname = " + testname + "\n");
+
+  //test already complete.... forget it... remember the first result.
+  if (window.tests[testname] != -1)
+    return;
+
+  window.tests[testname] = result;
+  is(result, true, testname + ' test: ' + msg);
+
+  // if any test is incomplete, keep waiting
+  for (var v in window.tests)
+    if(tests[v] == -1)
+      return;
+
+  // ... otherwise, finish
+  window.examiner.remove();
+  SimpleTest.finish();
+}
+
+// Helpers for inline script/style checks
+var black = 'rgb(0, 0, 0)';
+var green = 'rgb(0, 128, 0)';
+function getElementColorById(doc, id) {
+  return window.getComputedStyle(doc.contentDocument.getElementById(id)).color;
+}
+
+function checkInlineWithStar() {
+  var testframe = document.getElementById('testframe1');
+  window.testResult("starInlineStyleAllowed",
+                    getElementColorById(testframe, 'inline-style') === green,
+                    "Inline styles should be allowed (style-src 'unsafe-inline' with star)");
+  window.testResult("starInlineScriptBlocked",
+                    getElementColorById(testframe, 'inline-script') === black,
+                    "Inline scripts should be blocked (style-src 'unsafe-inline' with star)");
+}
+
+function checkInlineWithNone() {
+  // If a directive has 'none' in addition to other sources, 'none' is ignored
+  // and the other sources are used. 'none' is only a valid source if it is
+  // used by itself.
+  var testframe = document.getElementById('testframe2');
+  window.testResult("noneInlineStyleAllowed",
+                    getElementColorById(testframe, 'inline-style') === green,
+                    "Inline styles should be allowed (style-src 'unsafe-inline' with none)");
+  window.testResult("noneInlineScriptBlocked",
+                    getElementColorById(testframe, 'inline-script') === black,
+                    "Inline scripts should be blocked (style-src 'unsafe-inline' with none)");
+}
+
+SpecialPowers.pushPrefEnv(
+  {'set':[["security.csp.speccompliant", true]]},
+  function () {
+    document.getElementById('testframe1').src = 'file_CSP_bug909029_star.html';
+    document.getElementById('testframe1').addEventListener('load', checkInlineWithStar, false);
+    document.getElementById('testframe2').src = 'file_CSP_bug909029_none.html';
+    document.getElementById('testframe2').addEventListener('load', checkInlineWithNone, false);
+  }
+);
+    </script>
+  </body>
+</html>
--- a/content/media/omx/mediaresourcemanager/Makefile.in
+++ b/content/media/omx/mediaresourcemanager/Makefile.in
@@ -1,14 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 INCLUDES	+= \
 	        -I$(srcdir)/ \
 		-I$(ANDROID_SOURCE)/frameworks/base/include/ \
 		-I$(ANDROID_SOURCE)/frameworks/base/include/binder/ \
 		-I$(ANDROID_SOURCE)/frameworks/base/include/utils/ \
 		-I$(ANDROID_SOURCE)/frameworks/base/include/media/ \
--- a/content/media/omx/mediaresourcemanager/moz.build
+++ b/content/media/omx/mediaresourcemanager/moz.build
@@ -13,8 +13,9 @@ SOURCES += [
     'MediaResourceManagerClient.cpp',
     'MediaResourceManagerService.cpp',
 ]
 
 LIBRARY_NAME = 'mediaresourcemanager'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+FORCE_STATIC_LIB = True
--- a/db/sqlite3/src/Makefile.in
+++ b/db/sqlite3/src/Makefile.in
@@ -1,17 +1,15 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SHORT_LIBNAME    = mozsqlt3
-ifdef MOZ_FOLD_LIBS
-FORCE_STATIC_LIB = 1
-else
+ifndef MOZ_FOLD_LIBS
 FORCE_SHARED_LIB = 1
 endif
 VISIBILITY_FLAGS =
 LIB_IS_C_ONLY    = 1
 
 ifeq ($(OS_ARCH),WINNT)
 DEFFILE = $(CURDIR)/sqlite-processed.def
 RCFILE  = sqlite.rc
--- a/db/sqlite3/src/moz.build
+++ b/db/sqlite3/src/moz.build
@@ -11,8 +11,10 @@ EXPORTS += [
 ]
 
 LIBRARY_NAME = 'mozsqlite3'
 
 SOURCES += [
     'sqlite3.c',
 ]
 
+if CONFIG['MOZ_FOLD_LIBS']:
+    FORCE_STATIC_LIB = True
--- a/gfx/cairo/cairo/src/cairo-win32-printing-surface.c
+++ b/gfx/cairo/cairo/src/cairo-win32-printing-surface.c
@@ -712,16 +712,17 @@ static cairo_status_t
     bi.bmiHeader.biClrImportant = 0;
 
     m = pattern->base.matrix;
     status = cairo_matrix_invert (&m);
     /* _cairo_pattern_set_matrix guarantees invertibility */
     assert (status == CAIRO_STATUS_SUCCESS);
 
     cairo_matrix_multiply (&m, &m, &surface->gdi_ctm);
+    cairo_matrix_multiply(&m, &m, &surface->ctm);
     SaveDC (surface->dc);
     _cairo_matrix_to_win32_xform (&m, &xform);
 
     if (! SetWorldTransform (surface->dc, &xform)) {
 	status = _cairo_win32_print_gdi_error ("_cairo_win32_printing_surface_paint_image_pattern");
 	goto CLEANUP_OPAQUE_IMAGE;
     }
 
--- a/gfx/graphite2/src/Makefile.in
+++ b/gfx/graphite2/src/Makefile.in
@@ -12,17 +12,16 @@ else
 endif
 
 # get the lists of source files and exported headers
 include $(srcdir)/files.mk
 
 # on Windows, we're going to link graphite with gkmedias instead of libxul
 ifeq (WINNT,$(OS_TARGET))
 VISIBILITY_FLAGS =
-FORCE_STATIC_LIB = 1
 endif
 
 ifeq (WINNT,$(OS_TARGET))
 DEFINES += -DGRAPHITE2_EXPORTING
 else
 # tell graphite2 not to export symbols, we'll be linking it directly with thebes
 DEFINES += -DGRAPHITE2_STATIC
 endif
--- a/gfx/graphite2/src/moz.build
+++ b/gfx/graphite2/src/moz.build
@@ -1,21 +1,20 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'graphite2'
 
-if CONFIG['OS_TARGET'] != 'WINNT':
-    LIBXUL_LIBRARY = True
+if CONFIG['OS_TARGET'] == 'WINNT':
+    FORCE_STATIC_LIB = True
 else:
-    # FORCE_STATIC_LIB = True
-    pass
+    LIBXUL_LIBRARY = True
 
 # This should contain all of the _PUBLIC_HEADERS from files.mk
 EXPORTS.graphite2 += [
     '../include/graphite2/Font.h',
     '../include/graphite2/Log.h',
     '../include/graphite2/Segment.h',
     '../include/graphite2/Types.h',
 ]
--- a/gfx/harfbuzz/src/Makefile.in
+++ b/gfx/harfbuzz/src/Makefile.in
@@ -19,21 +19,16 @@
 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 # FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
 # ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
 # PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 #
 # Mozilla author(s): Jonathan Kew
 #
 
-
-ifeq ($(OS_ARCH),WINNT)
-FORCE_STATIC_LIB = 1
-endif
-
 LOCAL_INCLUDES  += -I$(srcdir) 
 
 
 include $(topsrcdir)/config/rules.mk
 
 DEFINES += -DPACKAGE_VERSION="\"moz\""
 DEFINES += -DPACKAGE_BUGREPORT="\"http://bugzilla.mozilla.org/\""
 DEFINES += -DHAVE_OT=1 -DHB_NO_MT -DHB_NO_UNICODE_FUNCS
--- a/gfx/harfbuzz/src/moz.build
+++ b/gfx/harfbuzz/src/moz.build
@@ -1,21 +1,20 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'harfbuzz'
 
-if CONFIG['OS_ARCH'] != 'WINNT':
-    LIBXUL_LIBRARY = True
+if CONFIG['OS_ARCH'] == 'WINNT':
+    FORCE_STATIC_LIB = True
 else:
-    # FORCE_STATIC_LIB = True
-    pass
+    LIBXUL_LIBRARY = True
 
 EXPORTS.harfbuzz += [
     'hb-blob.h',
     'hb-buffer.h',
     'hb-common.h',
     'hb-deprecated.h',
     'hb-face.h',
     'hb-font.h',
--- a/gfx/layers/client/CanvasClient.cpp
+++ b/gfx/layers/client/CanvasClient.cpp
@@ -101,24 +101,16 @@ CanvasClient2D::Update(gfx::IntSize aSiz
 TemporaryRef<BufferTextureClient>
 CanvasClient2D::CreateBufferTextureClient(gfx::SurfaceFormat aFormat, TextureFlags aFlags)
 {
   return CompositableClient::CreateBufferTextureClient(aFormat,
                                                        mTextureInfo.mTextureFlags | aFlags);
 }
 
 void
-CanvasClient2D::OnActorDestroy()
-{
-  if (mBuffer) {
-    mBuffer->OnActorDestroy();
-  }
-}
-
-void
 DeprecatedCanvasClient2D::Updated()
 {
   mForwarder->UpdateTexture(this, 1, mDeprecatedTextureClient->LockSurfaceDescriptor());
 }
 
 
 DeprecatedCanvasClient2D::DeprecatedCanvasClient2D(CompositableForwarder* aFwd,
                                                    TextureFlags aFlags)
@@ -160,24 +152,16 @@ DeprecatedCanvasClient2D::Update(gfx::In
   }
 
   gfxASurface* surface = mDeprecatedTextureClient->LockSurface();
   aLayer->UpdateSurface(surface);
   mDeprecatedTextureClient->Unlock();
 }
 
 void
-DeprecatedCanvasClient2D::OnActorDestroy()
-{
-  if (mDeprecatedTextureClient) {
-    mDeprecatedTextureClient->OnActorDestroy();
-  }
-}
-
-void
 DeprecatedCanvasClientSurfaceStream::Updated()
 {
   mForwarder->UpdateTextureNoSwap(this, 1, mDeprecatedTextureClient->LockSurfaceDescriptor());
 }
 
 
 DeprecatedCanvasClientSurfaceStream::DeprecatedCanvasClientSurfaceStream(CompositableForwarder* aFwd,
                                                                          TextureFlags aFlags)
@@ -235,18 +219,10 @@ DeprecatedCanvasClientSurfaceStream::Upd
     // Ref this so the SurfaceStream doesn't disappear unexpectedly. The
     // Compositor will need to unref it when finished.
     aLayer->mGLContext->AddRef();
   }
 
   aLayer->Painted();
 }
 
-void
-DeprecatedCanvasClientSurfaceStream::OnActorDestroy()
-{
-  if (mDeprecatedTextureClient) {
-    mDeprecatedTextureClient->OnActorDestroy();
-  }
-}
-
 }
 }
--- a/gfx/layers/client/CanvasClient.h
+++ b/gfx/layers/client/CanvasClient.h
@@ -86,22 +86,19 @@ public:
   CreateBufferTextureClient(gfx::SurfaceFormat aFormat,
                             TextureFlags aFlags = TEXTURE_FLAGS_DEFAULT) MOZ_OVERRIDE;
 
   virtual void OnDetach() MOZ_OVERRIDE
   {
     mBuffer = nullptr;
   }
 
-  virtual void OnActorDestroy() MOZ_OVERRIDE;
-
 private:
   RefPtr<TextureClient> mBuffer;
 };
-
 class DeprecatedCanvasClient2D : public CanvasClient
 {
 public:
   DeprecatedCanvasClient2D(CompositableForwarder* aLayerForwarder,
                            TextureFlags aFlags);
 
   TextureInfo GetTextureInfo() const MOZ_OVERRIDE
   {
@@ -112,18 +109,16 @@ public:
   virtual void Updated() MOZ_OVERRIDE;
 
   virtual void SetDescriptorFromReply(TextureIdentifier aTextureId,
                                       const SurfaceDescriptor& aDescriptor) MOZ_OVERRIDE
   {
     mDeprecatedTextureClient->SetDescriptorFromReply(aDescriptor);
   }
 
-  virtual void OnActorDestroy() MOZ_OVERRIDE;
-
 private:
   RefPtr<DeprecatedTextureClient> mDeprecatedTextureClient;
 };
 
 // Used for GL canvases where we don't need to do any readback, i.e., with a
 // GL backend.
 class DeprecatedCanvasClientSurfaceStream : public CanvasClient
 {
@@ -140,18 +135,16 @@ public:
   virtual void Updated() MOZ_OVERRIDE;
 
   virtual void SetDescriptorFromReply(TextureIdentifier aTextureId,
                                       const SurfaceDescriptor& aDescriptor) MOZ_OVERRIDE
   {
     mDeprecatedTextureClient->SetDescriptorFromReply(aDescriptor);
   }
 
-  virtual void OnActorDestroy() MOZ_OVERRIDE;
-
 private:
   RefPtr<DeprecatedTextureClient> mDeprecatedTextureClient;
 };
 
 }
 }
 
 #endif
--- a/gfx/layers/client/CompositableClient.cpp
+++ b/gfx/layers/client/CompositableClient.cpp
@@ -30,16 +30,17 @@ CompositableClient::CompositableClient(C
 
 
 CompositableClient::~CompositableClient()
 {
   MOZ_COUNT_DTOR(CompositableClient);
   Destroy();
 
   FlushTexturesToRemoveCallbacks();
+
   MOZ_ASSERT(mTexturesToRemove.Length() == 0, "would leak textures pending for deletion");
 }
 
 void
 CompositableClient::FlushTexturesToRemoveCallbacks()
 {
   std::map<uint64_t,TextureClientData*>::iterator it
     = mTexturesToRemoveCallbacks.begin();
@@ -81,17 +82,16 @@ CompositableClient::Connect()
 }
 
 void
 CompositableClient::Destroy()
 {
   if (!mCompositableChild) {
     return;
   }
-  mCompositableChild->SetClient(nullptr);
   mCompositableChild->Destroy();
   mCompositableChild = nullptr;
 }
 
 uint64_t
 CompositableClient::GetAsyncID() const
 {
   if (mCompositableChild) {
@@ -252,18 +252,10 @@ CompositableClient::OnTransaction()
 {
   for (unsigned i = 0; i < mTexturesToRemove.Length(); ++i) {
     const TextureIDAndFlags& texture = mTexturesToRemove[i];
     mForwarder->RemoveTexture(this, texture.mID, texture.mFlags);
   }
   mTexturesToRemove.Clear();
 }
 
-
-void
-CompositableChild::ActorDestroy(ActorDestroyReason why)
-{
-  if (mCompositableClient) {
-    mCompositableClient->OnActorDestroy();
-  }
-}
 } // namespace layers
 } // namespace mozilla
--- a/gfx/layers/client/CompositableClient.h
+++ b/gfx/layers/client/CompositableClient.h
@@ -156,22 +156,16 @@ public:
    */
   void OnReplyTextureRemoved(uint64_t aTextureID);
 
   /**
    * Run all he registered callbacks (see the comment for OnReplyTextureRemoved).
    * Only call this if you know what you are doing.
    */
   void FlushTexturesToRemoveCallbacks();
-
-  /**
-   * Our IPDL actor is being destroyed, get rid of any shmem resources now.
-   */
-  virtual void OnActorDestroy() = 0;
-
 protected:
   struct TextureIDAndFlags {
     TextureIDAndFlags(uint64_t aID, TextureFlags aFlags)
     : mID(aID), mFlags(aFlags) {}
     uint64_t mID;
     TextureFlags mFlags;
   };
   // The textures to destroy in the next transaction;
@@ -208,18 +202,16 @@ public:
     mCompositableClient = aClient;
   }
 
   CompositableClient* GetCompositableClient() const
   {
     return mCompositableClient;
   }
 
-  virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
-
   void SetAsyncID(uint64_t aID) { mID = aID; }
   uint64_t GetAsyncID() const
   {
     return mID;
   }
 private:
   CompositableClient* mCompositableClient;
   uint64_t mID;
--- a/gfx/layers/client/ContentClient.cpp
+++ b/gfx/layers/client/ContentClient.cpp
@@ -322,31 +322,16 @@ ContentClientRemoteBuffer::SwapBuffers(c
 
   mFrontAndBackBufferDiffer = true;
   mDeprecatedTextureClient->SetAccessMode(DeprecatedTextureClient::ACCESS_READ_WRITE);
   if (mDeprecatedTextureClientOnWhite) {
     mDeprecatedTextureClientOnWhite->SetAccessMode(DeprecatedTextureClient::ACCESS_READ_WRITE);
   }
 }
 
-
-void
-ContentClientRemoteBuffer::OnActorDestroy()
-{
-  if (mDeprecatedTextureClient) {
-    mDeprecatedTextureClient->OnActorDestroy();
-  }
-  if (mDeprecatedTextureClientOnWhite) {
-    mDeprecatedTextureClientOnWhite->OnActorDestroy();
-  }
-  for (size_t i = 0; i < mOldTextures.Length(); ++i) {
-    mOldTextures[i]->OnActorDestroy();
-  }
-}
-
 ContentClientDoubleBuffered::~ContentClientDoubleBuffered()
 {
   if (mDeprecatedTextureClient) {
     MOZ_ASSERT(mFrontClient);
     mDeprecatedTextureClient->SetDescriptor(SurfaceDescriptor());
     mFrontClient->SetDescriptor(SurfaceDescriptor());
   }
   if (mDeprecatedTextureClientOnWhite) {
@@ -437,36 +422,16 @@ ContentClientDoubleBuffered::SwapBuffers
   mFrontClient->SetAccessMode(DeprecatedTextureClient::ACCESS_READ_ONLY);
   if (mFrontClientOnWhite) {
     mFrontClientOnWhite->SetAccessMode(DeprecatedTextureClient::ACCESS_READ_ONLY);
   }
 
   ContentClientRemoteBuffer::SwapBuffers(aFrontUpdatedRegion);
 }
 
-void
-ContentClientDoubleBuffered::OnActorDestroy()
-{
-  if (mDeprecatedTextureClient) {
-    mDeprecatedTextureClient->OnActorDestroy();
-  }
-  if (mDeprecatedTextureClientOnWhite) {
-    mDeprecatedTextureClientOnWhite->OnActorDestroy();
-  }
-  for (size_t i = 0; i < mOldTextures.Length(); ++i) {
-    mOldTextures[i]->OnActorDestroy();
-  }
-  if (mFrontClient) {
-    mFrontClient->OnActorDestroy();
-  }
-  if (mFrontClientOnWhite) {
-    mFrontClientOnWhite->OnActorDestroy();
-  }
-}
-
 struct AutoDeprecatedTextureClient {
   AutoDeprecatedTextureClient()
     : mTexture(nullptr)
   {}
   ~AutoDeprecatedTextureClient()
   {
     if (mTexture) {
       mTexture->Unlock();
@@ -569,20 +534,17 @@ ContentClientDoubleBuffered::UpdateDesti
 
   bool isClippingCheap = IsClippingCheap(destCtx, aUpdateRegion);
   if (isClippingCheap) {
     gfxUtils::ClipToRegion(destCtx, aUpdateRegion);
   }
 
   if (SupportsAzureContent()) {
     MOZ_ASSERT(!destCtx->IsCairo());
-    if (destCtx->GetDrawTarget()->GetFormat() == FORMAT_B8G8R8A8) {
-      destCtx->GetDrawTarget()->ClearRect(Rect(0, 0, mFrontBufferRect.width, mFrontBufferRect.height));
-    }
-    aSource.DrawBufferWithRotation(destCtx->GetDrawTarget(), BUFFER_BLACK);
+    aSource.DrawBufferWithRotation(destCtx->GetDrawTarget(), BUFFER_BLACK, 1.0, OP_SOURCE);
   } else {
     aSource.DrawBufferWithRotation(destCtx, BUFFER_BLACK);
   }
 
   if (aSource.HaveBufferOnWhite()) {
     MOZ_ASSERT(HaveBufferOnWhite());
     nsRefPtr<gfxContext> destCtx =
       GetContextForQuadrantUpdate(aUpdateRegion.GetBounds(), BUFFER_WHITE);
@@ -590,20 +552,17 @@ ContentClientDoubleBuffered::UpdateDesti
 
     bool isClippingCheap = IsClippingCheap(destCtx, aUpdateRegion);
     if (isClippingCheap) {
       gfxUtils::ClipToRegion(destCtx, aUpdateRegion);
     }
 
     if (SupportsAzureContent()) {
       MOZ_ASSERT(!destCtx->IsCairo());
-      if (destCtx->GetDrawTarget()->GetFormat() == FORMAT_B8G8R8A8) {
-        destCtx->GetDrawTarget()->ClearRect(Rect(0, 0, mFrontBufferRect.width, mFrontBufferRect.height));
-      }
-      aSource.DrawBufferWithRotation(destCtx->GetDrawTarget(), BUFFER_WHITE);
+      aSource.DrawBufferWithRotation(destCtx->GetDrawTarget(), BUFFER_WHITE, 1.0, OP_SOURCE);
     } else {
       aSource.DrawBufferWithRotation(destCtx, BUFFER_WHITE);
     }
   }
 }
 
 ContentClientSingleBuffered::~ContentClientSingleBuffered()
 {
--- a/gfx/layers/client/ContentClient.h
+++ b/gfx/layers/client/ContentClient.h
@@ -158,18 +158,16 @@ public:
                             RefPtr<gfx::DrawTarget>* aBlackDT, RefPtr<gfx::DrawTarget>* aWhiteDT) MOZ_OVERRIDE;
   virtual bool SupportsAzureContent() const;
 
   virtual TextureInfo GetTextureInfo() const MOZ_OVERRIDE
   {
     MOZ_CRASH("Should not be called on non-remote ContentClient");
   }
 
-  virtual void OnActorDestroy() MOZ_OVERRIDE {}
-
 private:
   BasicLayerManager* mManager;
 };
 
 /**
  * A ContentClientRemote backed by a ThebesLayerBuffer.
  *
  * When using a ContentClientRemote, SurfaceDescriptors are created on
@@ -244,18 +242,16 @@ public:
 
   void DestroyBuffers();
 
   virtual TextureInfo GetTextureInfo() const MOZ_OVERRIDE
   {
     return mTextureInfo;
   }
 
-  virtual void OnActorDestroy() MOZ_OVERRIDE;
-
 protected:
   virtual nsIntRegion GetUpdatedRegion(const nsIntRegion& aRegionToDraw,
                                        const nsIntRegion& aVisibleRegion,
                                        bool aDidSelfCopy);
 
   // create and configure mDeprecatedTextureClient
   void BuildDeprecatedTextureClients(ContentType aType,
                                      const nsIntRect& aRect,
@@ -309,18 +305,16 @@ public:
 
   virtual void SyncFrontBufferToBackBuffer() MOZ_OVERRIDE;
 
 protected:
   virtual void CreateFrontBufferAndNotify(const nsIntRect& aBufferRect) MOZ_OVERRIDE;
   virtual void DestroyFrontBuffer() MOZ_OVERRIDE;
   virtual void LockFrontBuffer() MOZ_OVERRIDE;
 
-  virtual void OnActorDestroy() MOZ_OVERRIDE;
-
 private:
   void UpdateDestinationFrom(const RotatedBuffer& aSource,
                              const nsIntRegion& aUpdateRegion);
 
   RefPtr<DeprecatedTextureClient> mFrontClient;
   RefPtr<DeprecatedTextureClient> mFrontClientOnWhite;
   nsIntRegion mFrontUpdatedRegion;
   nsIntRect mFrontBufferRect;
@@ -396,18 +390,16 @@ public:
     if (IsSurfaceDescriptorValid(mUpdateDescriptor)) {
       mForwarder->DestroySharedSurface(&mUpdateDescriptor);
     }
     if (IsSurfaceDescriptorValid(mUpdateDescriptorOnWhite)) {
       mForwarder->DestroySharedSurface(&mUpdateDescriptorOnWhite);
     }
   }
 
-  virtual void OnActorDestroy() MOZ_OVERRIDE {}
-
 private:
 
   enum BufferType{
     BUFFER_BLACK,
     BUFFER_WHITE
   };
 
   void NotifyBufferCreated(ContentType aType, uint32_t aFlags)
--- a/gfx/layers/client/ImageClient.cpp
+++ b/gfx/layers/client/ImageClient.cpp
@@ -275,35 +275,16 @@ ImageClientBuffered::UpdateImage(ImageCo
                                  uint32_t aContentFlags)
 {
   RefPtr<TextureClient> temp = mFrontBuffer;
   mFrontBuffer = mBackBuffer;
   mBackBuffer = temp;
   return ImageClientSingle::UpdateImage(aContainer, aContentFlags);
 }
 
-void
-ImageClientSingle::OnActorDestroy()
-{
-  if (mFrontBuffer) {
-    mFrontBuffer->OnActorDestroy();
-  }
-}
-
-void
-ImageClientBuffered::OnActorDestroy()
-{
-  if (mFrontBuffer) {
-    mFrontBuffer->OnActorDestroy();
-  }
-  if (mBackBuffer) {
-    mBackBuffer->OnActorDestroy();
-  }
-}
-
 bool
 ImageClientSingle::AddTextureClient(TextureClient* aTexture)
 {
   MOZ_ASSERT((mTextureFlags & aTexture->GetFlags()) == mTextureFlags);
   return CompositableClient::AddTextureClient(aTexture);
 }
 
 TemporaryRef<BufferTextureClient>
@@ -479,24 +460,16 @@ DeprecatedImageClientSingle::Updated()
 ImageClientBridge::ImageClientBridge(CompositableForwarder* aFwd,
                                      TextureFlags aFlags)
 : ImageClient(aFwd, BUFFER_BRIDGE)
 , mAsyncContainerID(0)
 , mLayer(nullptr)
 {
 }
 
-void
-DeprecatedImageClientSingle::OnActorDestroy()
-{
-  if (mDeprecatedTextureClient) {
-    mDeprecatedTextureClient->OnActorDestroy();
-  }
-}
-
 bool
 ImageClientBridge::UpdateImage(ImageContainer* aContainer, uint32_t aContentFlags)
 {
   if (!GetForwarder() || !mLayer) {
     return false;
   }
   if (mAsyncContainerID == aContainer->GetAsyncContainerID()) {
     return true;
--- a/gfx/layers/client/ImageClient.h
+++ b/gfx/layers/client/ImageClient.h
@@ -97,18 +97,16 @@ public:
 
   virtual TextureInfo GetTextureInfo() const MOZ_OVERRIDE;
 
   virtual already_AddRefed<Image> CreateImage(const uint32_t *aFormats,
                                               uint32_t aNumFormats) MOZ_OVERRIDE;
 
   virtual void FlushAllImages(bool aExceptFront) MOZ_OVERRIDE;
 
-  virtual void OnActorDestroy() MOZ_OVERRIDE;
-
 protected:
   RefPtr<TextureClient> mFrontBuffer;
   // Some layers may want to enforce some flags to all their textures
   // (like disallowing tiling)
   TextureFlags mTextureFlags;
 };
 
 /**
@@ -122,18 +120,16 @@ public:
                       CompositableType aType);
 
   virtual bool UpdateImage(ImageContainer* aContainer, uint32_t aContentFlags);
 
   virtual void OnDetach() MOZ_OVERRIDE;
 
   virtual void FlushAllImages(bool aExceptFront) MOZ_OVERRIDE;
 
-  virtual void OnActorDestroy() MOZ_OVERRIDE;
-
 protected:
   RefPtr<TextureClient> mBackBuffer;
 };
 
 /**
  * An image client which uses a single texture client, may be single or double
  * buffered. (As opposed to using two texture clients for buffering, as in
  * ContentClientDoubleBuffered, or using multiple clients for YCbCr or tiled
@@ -168,18 +164,16 @@ public:
   virtual TextureInfo GetTextureInfo() const MOZ_OVERRIDE
   {
     return mTextureInfo;
   }
 
   virtual already_AddRefed<Image> CreateImage(const uint32_t *aFormats,
                                               uint32_t aNumFormats) MOZ_OVERRIDE;
 
-  virtual void OnActorDestroy() MOZ_OVERRIDE;
-
 private:
   RefPtr<DeprecatedTextureClient> mDeprecatedTextureClient;
   TextureInfo mTextureInfo;
 };
 
 /**
  * Image class to be used for async image uploads using the image bridge
  * protocol.
@@ -211,18 +205,16 @@ public:
 
   virtual already_AddRefed<Image> CreateImage(const uint32_t *aFormats,
                                               uint32_t aNumFormats) MOZ_OVERRIDE
   {
     NS_WARNING("Should not create an image through an ImageClientBridge");
     return nullptr;
   }
 
-  virtual void OnActorDestroy() MOZ_OVERRIDE {}
-
 protected:
   uint64_t mAsyncContainerID;
   ShadowableLayer* mLayer;
 };
 
 }
 }
 
--- a/gfx/layers/client/TextureClient.cpp
+++ b/gfx/layers/client/TextureClient.cpp
@@ -383,25 +383,16 @@ DeprecatedTextureClient::DeprecatedTextu
 }
 
 DeprecatedTextureClient::~DeprecatedTextureClient()
 {
   MOZ_COUNT_DTOR(DeprecatedTextureClient);
   MOZ_ASSERT(mDescriptor.type() == SurfaceDescriptor::T__None, "Need to release surface!");
 }
 
-void
-DeprecatedTextureClient::OnActorDestroy()
-{
-  if (ISurfaceAllocator::IsShmem(&mDescriptor)) {
-    mDescriptor = SurfaceDescriptor();
-  }
-}
-
-
 DeprecatedTextureClientShmem::DeprecatedTextureClientShmem(CompositableForwarder* aForwarder,
                                        const TextureInfo& aTextureInfo)
   : DeprecatedTextureClient(aForwarder, aTextureInfo)
 {
 }
 
 DeprecatedTextureClientShmem::~DeprecatedTextureClientShmem()
 {
--- a/gfx/layers/client/TextureClient.h
+++ b/gfx/layers/client/TextureClient.h
@@ -211,20 +211,16 @@ public:
   bool IsValid() const { return mValid; }
 
   /**
    * An invalid TextureClient cannot provide access to its shared data
    * anymore. This usually means it will soon be destroyed.
    */
   void MarkInvalid() { mValid = false; }
 
-  // If a texture client holds a reference to shmem, it should override this
-  // method to forget about the shmem _without_ releasing it.
-  virtual void OnActorDestroy() {}
-
 protected:
   void AddFlags(TextureFlags  aFlags)
   {
     MOZ_ASSERT(!IsSharedWithCompositor());
     mFlags |= aFlags;
   }
 
   uint64_t mID;
@@ -315,21 +311,16 @@ public:
   virtual bool IsAllocated() const MOZ_OVERRIDE { return mAllocated; }
 
   virtual TextureClientData* DropTextureData() MOZ_OVERRIDE;
 
   ISurfaceAllocator* GetAllocator() const;
 
   ipc::Shmem& GetShmem() { return mShmem; }
 
-  virtual void OnActorDestroy() MOZ_OVERRIDE
-  {
-    mShmem = ipc::Shmem();
-  }
-
 protected:
   ipc::Shmem mShmem;
   ISurfaceAllocator* mAllocator;
   bool mAllocated;
 };
 
 /**
  * TextureClient that wraps raw memory.
@@ -496,18 +487,16 @@ public:
 
   AccessMode GetAccessMode() const
   {
     return mAccessMode;
   }
 
   virtual gfxContentType GetContentType() = 0;
 
-  void OnActorDestroy();
-
 protected:
   DeprecatedTextureClient(CompositableForwarder* aForwarder,
                 const TextureInfo& aTextureInfo);
 
   CompositableForwarder* mForwarder;
   // So far all DeprecatedTextureClients use a SurfaceDescriptor, so it makes sense to
   // keep the reference here.
   SurfaceDescriptor mDescriptor;
--- a/gfx/layers/client/TiledContentClient.h
+++ b/gfx/layers/client/TiledContentClient.h
@@ -196,24 +196,16 @@ public:
                          LayerManager::DrawThebesLayerCallback aCallback,
                          void* aCallbackData);
 
   SurfaceDescriptorTiles GetSurfaceDescriptorTiles();
 
   static BasicTiledLayerBuffer OpenDescriptor(ISurfaceAllocator* aAllocator,
                                               const SurfaceDescriptorTiles& aDescriptor);
 
-  void OnActorDestroy()
-  {
-    for (size_t i = 0; i < mRetainedTiles.Length(); i++) {
-      if (mRetainedTiles[i].IsPlaceholderTile()) continue;
-      mRetainedTiles[i].mDeprecatedTextureClient->OnActorDestroy();
-    }
-  }
-
 protected:
   BasicTiledLayerTile ValidateTile(BasicTiledLayerTile aTile,
                                    const nsIntPoint& aTileRect,
                                    const nsIntRegion& dirtyRect);
 
   // If this returns true, we perform the paint operation into a single large
   // buffer and copy it out to the tiles instead of calling PaintThebes() on
   // each tile individually. Somewhat surprisingly, this turns out to be faster
@@ -293,22 +285,16 @@ public:
   }
 
   enum TiledBufferType {
     TILED_BUFFER,
     LOW_PRECISION_TILED_BUFFER
   };
   void LockCopyAndWrite(TiledBufferType aType);
 
-  virtual void OnActorDestroy() MOZ_OVERRIDE
-  {
-    mTiledBuffer.OnActorDestroy();
-    mLowPrecisionTiledBuffer.OnActorDestroy();
-  }
-
 private:
   BasicTiledLayerBuffer mTiledBuffer;
   BasicTiledLayerBuffer mLowPrecisionTiledBuffer;
 };
 
 }
 }
 
--- a/gfx/layers/composite/CompositableHost.cpp
+++ b/gfx/layers/composite/CompositableHost.cpp
@@ -232,24 +232,17 @@ CompositableHost::DumpTextureHost(FILE* 
   surf->DumpAsDataURL(aFile ? aFile : stderr);
 }
 #endif
 
 void
 CompositableParent::ActorDestroy(ActorDestroyReason why)
 {
   if (mHost) {
-    // XXX: sadness warning. We should be able to do this whenever we get ActorDestroy,
-    // not just for abnormal shutdowns (which is the only case we _need_ to - so that
-    // we don't double release our shmems). But, for some reason, that causes a
-    // crash, we don't know why. (Bug 925773).
-    if (why == AbnormalShutdown) {
-      mHost->OnActorDestroy();
-    }
-    mHost->Detach(nullptr, CompositableHost::FORCE_DETACH);
+    mHost->Detach();
   }
 }
 
 CompositableParent::CompositableParent(CompositableParentManager* aMgr,
                                        const TextureInfo& aTextureInfo,
                                        uint64_t aID)
 : mManager(aMgr)
 , mType(aTextureInfo.mCompositableType)
--- a/gfx/layers/composite/CompositableHost.h
+++ b/gfx/layers/composite/CompositableHost.h
@@ -105,22 +105,16 @@ public:
     return mBackendData;
   }
 
   virtual void SetCompositableBackendSpecificData(CompositableBackendSpecificData* aBackendData)
   {
     mBackendData = aBackendData;
   }
 
-  /**
-   * Our IPDL actor is being destroyed, get rid of any shmem resources now and
-   * don't worry about compositing anymore.
-   */
-  virtual void OnActorDestroy() = 0;
-
   // If base class overrides, it should still call the parent implementation
   virtual void SetCompositor(Compositor* aCompositor);
 
   // composite the contents of this buffer host to the compositor's surface
   virtual void Composite(EffectChain& aEffectChain,
                          float aOpacity,
                          const gfx::Matrix4x4& aTransform,
                          const gfx::Point& aOffset,
@@ -242,17 +236,16 @@ public:
   void SetLayer(Layer* aLayer) { mLayer = aLayer; }
 
   virtual TiledLayerComposer* AsTiledLayerComposer() { return nullptr; }
 
   typedef uint32_t AttachFlags;
   static const AttachFlags NO_FLAGS = 0;
   static const AttachFlags ALLOW_REATTACH = 1;
   static const AttachFlags KEEP_ATTACHED = 2;
-  static const AttachFlags FORCE_DETACH = 2;
 
   virtual void Attach(Layer* aLayer,
                       Compositor* aCompositor,
                       AttachFlags aFlags = NO_FLAGS)
   {
     MOZ_ASSERT(aCompositor, "Compositor is required");
     NS_ASSERTION(aFlags & ALLOW_REATTACH || !mAttached,
                  "Re-attaching compositables must be explicitly authorised");
@@ -263,22 +256,20 @@ public:
   }
   // Detach this compositable host from its layer.
   // If we are used for async video, then it is not safe to blindly detach since
   // we might be re-attached to a different layer. aLayer is the layer which the
   // caller expects us to be attached to, we will only detach if we are in fact
   // attached to that layer. If we are part of a normal layer, then we will be
   // detached in any case. if aLayer is null, then we will only detach if we are
   // not async.
-  // Only force detach if the IPDL tree is being shutdown.
-  void Detach(Layer* aLayer = nullptr, AttachFlags aFlags = NO_FLAGS)
+  void Detach(Layer* aLayer = nullptr)
   {
     if (!mKeepAttached ||
-        aLayer == mLayer ||
-        aFlags & FORCE_DETACH) {
+        aLayer == mLayer) {
       SetLayer(nullptr);
       SetCompositor(nullptr);
       mAttached = false;
       mKeepAttached = false;
     }
   }
   bool IsAttached() { return mAttached; }
 
--- a/gfx/layers/composite/ContentHost.cpp
+++ b/gfx/layers/composite/ContentHost.cpp
@@ -48,33 +48,16 @@ ContentHostBase::DestroyFrontHost()
              "We won't be able to destroy our SurfaceDescriptor");
   MOZ_ASSERT(!mDeprecatedTextureHostOnWhite || mDeprecatedTextureHostOnWhite->GetDeAllocator(),
              "We won't be able to destroy our SurfaceDescriptor");
   mDeprecatedTextureHost = nullptr;
   mDeprecatedTextureHostOnWhite = nullptr;
 }
 
 void
-ContentHostBase::OnActorDestroy()
-{
-  if (mDeprecatedTextureHost) {
-    mDeprecatedTextureHost->OnActorDestroy();
-  }
-  if (mDeprecatedTextureHostOnWhite) {
-    mDeprecatedTextureHostOnWhite->OnActorDestroy();
-  }
-  if (mNewFrontHost) {
-    mNewFrontHost->OnActorDestroy();
-  }
-  if (mNewFrontHostOnWhite) {
-    mNewFrontHostOnWhite->OnActorDestroy();
-  }
-}
-
-void
 ContentHostBase::Composite(EffectChain& aEffectChain,
                            float aOpacity,
                            const gfx::Matrix4x4& aTransform,
                            const Point& aOffset,
                            const Filter& aFilter,
                            const Rect& aClipRect,
                            const nsIntRegion* aVisibleRegion,
                            TiledLayerProperties* aLayerProperties)
@@ -422,59 +405,39 @@ ContentHostDoubleBuffered::EnsureDepreca
 void
 ContentHostDoubleBuffered::DestroyTextures()
 {
   if (mNewFrontHost) {
     MOZ_ASSERT(mNewFrontHost->GetDeAllocator(),
                "We won't be able to destroy our SurfaceDescriptor");
     mNewFrontHost = nullptr;
   }
+
   if (mNewFrontHostOnWhite) {
     MOZ_ASSERT(mNewFrontHostOnWhite->GetDeAllocator(),
                "We won't be able to destroy our SurfaceDescriptor");
     mNewFrontHostOnWhite = nullptr;
   }
+
   if (mBackHost) {
     MOZ_ASSERT(mBackHost->GetDeAllocator(),
                "We won't be able to destroy our SurfaceDescriptor");
     mBackHost = nullptr;
   }
+
   if (mBackHostOnWhite) {
     MOZ_ASSERT(mBackHostOnWhite->GetDeAllocator(),
                "We won't be able to destroy our SurfaceDescriptor");
     mBackHostOnWhite = nullptr;
   }
 
   // don't touch mDeprecatedTextureHost, we might need it for compositing
 }
 
 void
-ContentHostDoubleBuffered::OnActorDestroy()
-{
-  if (mDeprecatedTextureHost) {
-    mDeprecatedTextureHost->OnActorDestroy();
-  }
-  if (mDeprecatedTextureHostOnWhite) {
-    mDeprecatedTextureHostOnWhite->OnActorDestroy();
-  }
-  if (mNewFrontHost) {
-    mNewFrontHost->OnActorDestroy();
-  }
-  if (mNewFrontHostOnWhite) {
-    mNewFrontHostOnWhite->OnActorDestroy();
-  }
-  if (mBackHost) {
-    mBackHost->OnActorDestroy();
-  }
-  if (mBackHostOnWhite) {
-    mBackHostOnWhite->OnActorDestroy();
-  }
-}
-
-void
 ContentHostDoubleBuffered::UpdateThebes(const ThebesBufferData& aData,
                                         const nsIntRegion& aUpdated,
                                         const nsIntRegion& aOldValidRegionBack,
                                         nsIntRegion* aUpdatedRegionBack)
 {
   if (!mDeprecatedTextureHost && !mNewFrontHost) {
     mInitialised = false;
 
--- a/gfx/layers/composite/ContentHost.h
+++ b/gfx/layers/composite/ContentHost.h
@@ -123,18 +123,16 @@ public:
   virtual DeprecatedTextureHost* GetDeprecatedTextureHost() MOZ_OVERRIDE;
 
   virtual void SetPaintWillResample(bool aResample) { mPaintWillResample = aResample; }
   // The client has destroyed its texture clients and we should destroy our
   // texture hosts and SurfaceDescriptors. Note that we don't immediately
   // destroy our front buffer so that we can continue to composite.
   virtual void DestroyTextures() = 0;
 
-  virtual void OnActorDestroy() MOZ_OVERRIDE;
-
 protected:
   virtual nsIntPoint GetOriginOffset()
   {
     return mBufferRect.TopLeft() - mBufferRotation;
   }
 
   bool PaintWillResample() { return mPaintWillResample; }
 
@@ -175,18 +173,16 @@ public:
                             nsIntRegion* aUpdatedRegionBack);
 
   virtual void EnsureDeprecatedTextureHost(TextureIdentifier aTextureId,
                                  const SurfaceDescriptor& aSurface,
                                  ISurfaceAllocator* aAllocator,
                                  const TextureInfo& aTextureInfo) MOZ_OVERRIDE;
   virtual void DestroyTextures() MOZ_OVERRIDE;
 
-  virtual void OnActorDestroy() MOZ_OVERRIDE;
-
 #ifdef MOZ_DUMP_PAINTING
   virtual void Dump(FILE* aFile=nullptr,
                     const char* aPrefix="",
                     bool aDumpHtml=false) MOZ_OVERRIDE;
 #endif
 
 #ifdef MOZ_LAYERS_HAVE_LOG
   virtual void PrintInfo(nsACString& aTo, const char* aPrefix);
--- a/gfx/layers/composite/ImageHost.h
+++ b/gfx/layers/composite/ImageHost.h
@@ -64,23 +64,16 @@ public:
   virtual void SetPictureRect(const nsIntRect& aPictureRect) MOZ_OVERRIDE
   {
     mPictureRect = aPictureRect;
     mHasPictureRect = true;
   }
 
   virtual LayerRenderState GetRenderState() MOZ_OVERRIDE;
 
-  virtual void OnActorDestroy() MOZ_OVERRIDE
-  {
-    if (mFrontBuffer) {
-      mFrontBuffer->OnActorDestroy();
-    }
-  }
-
 #ifdef MOZ_LAYERS_HAVE_LOG
   virtual void PrintInfo(nsACString& aTo, const char* aPrefix);
 #endif
 
 #ifdef MOZ_DUMP_PAINTING
   virtual void Dump(FILE* aFile=NULL,
                     const char* aPrefix="",
                     bool aDumpHtml=false) MOZ_OVERRIDE;
@@ -134,23 +127,16 @@ public:
     mPictureRect = aPictureRect;
     mHasPictureRect = true;
   }
 
   virtual LayerRenderState GetRenderState() MOZ_OVERRIDE;
 
   virtual void SetCompositor(Compositor* aCompositor) MOZ_OVERRIDE;
 
-  virtual void OnActorDestroy() MOZ_OVERRIDE
-  {
-    if (mDeprecatedTextureHost) {
-      mDeprecatedTextureHost->OnActorDestroy();
-    }
-  }
-
 #ifdef MOZ_LAYERS_HAVE_LOG
   virtual void PrintInfo(nsACString& aTo, const char* aPrefix);
 #endif
 
 #ifdef MOZ_DUMP_PAINTING
   virtual void Dump(FILE* aFile=nullptr,
                     const char* aPrefix="",
                     bool aDumpHtml=false) MOZ_OVERRIDE;
--- a/gfx/layers/composite/TextureHost.cpp
+++ b/gfx/layers/composite/TextureHost.cpp
@@ -241,25 +241,16 @@ DeprecatedTextureHost::SwapTextures(cons
   // GrallocDeprecatedTextureHostOGL which overrides SetBuffer to make it
   // register the TextureHost with the GrallocBufferActor.
   // The reason why this SetBuffer calls is needed here is that just above we
   // overwrote *mBuffer in place, so we need to tell the new mBuffer about this
   // TextureHost.
   SetBuffer(mBuffer, mDeAllocator);
 }
 
-void
-DeprecatedTextureHost::OnActorDestroy()
-{
-  if (ISurfaceAllocator::IsShmem(mBuffer)) {
-    *mBuffer = SurfaceDescriptor();
-    mBuffer = nullptr;
-  }
-}
-
 #ifdef MOZ_LAYERS_HAVE_LOG
 
 void
 DeprecatedTextureHost::PrintInfo(nsACString& aTo, const char* aPrefix)
 {
   aTo += aPrefix;
   aTo += nsPrintfCString("%s (0x%p)", Name(), this);
   AppendToString(aTo, GetSize(), " [size=", "]");
@@ -517,23 +508,16 @@ ShmemTextureHost::DeallocateSharedData()
 {
   if (mShmem) {
     MOZ_ASSERT(mDeallocator,
                "Shared memory would leak without a ISurfaceAllocator");
     mDeallocator->DeallocShmem(*mShmem);
   }
 }
 
-void
-ShmemTextureHost::OnActorDestroy()
-{
-  delete mShmem;
-  mShmem = nullptr;
-}
-
 uint8_t* ShmemTextureHost::GetBuffer()
 {
   return mShmem ? mShmem->get<uint8_t>() : nullptr;
 }
 
 MemoryTextureHost::MemoryTextureHost(uint64_t aID,
                                      uint8_t* aBuffer,
                                      gfx::SurfaceFormat aFormat,
--- a/gfx/layers/composite/TextureHost.h
+++ b/gfx/layers/composite/TextureHost.h
@@ -379,20 +379,16 @@ public:
   {
     // By default we return an empty render state, this should be overridden
     // by the TextureHost implementations that are used on B2G with Composer2D
     return LayerRenderState();
   }
 
   virtual void SetCompositableBackendSpecificData(CompositableBackendSpecificData* aBackendData);
 
-  // If a texture host holds a reference to shmem, it should override this method
-  // to forget about the shmem _without_ releasing it.
-  virtual void OnActorDestroy() {}
-
 #ifdef MOZ_LAYERS_HAVE_LOG
   virtual const char *Name() { return "TextureHost"; }
   virtual void PrintInfo(nsACString& aTo, const char* aPrefix);
 #endif
 
 protected:
   uint64_t mID;
   RefPtr<TextureHost> mNextTexture;
@@ -483,18 +479,16 @@ public:
   virtual void DeallocateSharedData() MOZ_OVERRIDE;
 
   virtual uint8_t* GetBuffer() MOZ_OVERRIDE;
 
 #ifdef MOZ_LAYERS_HAVE_LOG
   virtual const char *Name() MOZ_OVERRIDE { return "ShmemTextureHost"; }
 #endif
 
-  virtual void OnActorDestroy() MOZ_OVERRIDE;
-
 protected:
   ipc::Shmem* mShmem;
   ISurfaceAllocator* mDeallocator;
 };
 
 /**
  * TextureHost that wraps raw memory.
  * The corresponding texture on the client side is MemoryTextureClient.
@@ -719,18 +713,16 @@ public:
     mBuffer = aBuffer;
     mDeAllocator = aAllocator;
   }
 
   // used only for hacky fix in gecko 23 for bug 862324
   // see bug 865908 about fixing this.
   virtual void ForgetBuffer() {}
 
-  void OnActorDestroy();
-
 protected:
   /**
    * Should be implemented by the backend-specific DeprecatedTextureHost classes
    *
    * It should not take a reference to aImage, unless it knows the data
    * to be thread-safe.
    */
   virtual void UpdateImpl(const SurfaceDescriptor& aImage,
--- a/gfx/layers/composite/TiledContentHost.h
+++ b/gfx/layers/composite/TiledContentHost.h
@@ -114,26 +114,16 @@ public:
   // by the sum of the resolutions of all parent layers' FrameMetrics.
   const gfxSize& GetFrameResolution() { return mFrameResolution; }
 
   void SetCompositor(Compositor* aCompositor)
   {
     mCompositor = aCompositor;
   }
 
-  void OnActorDestroy()
-  {
-    Iterator end = TilesEnd();
-    for (Iterator it = TilesBegin(); it != end; ++it) {
-      if (it->mDeprecatedTextureHost) {
-        it->mDeprecatedTextureHost->OnActorDestroy();
-      }
-    }
-  }
-
 protected:
   TiledTexture ValidateTile(TiledTexture aTile,
                             const nsIntPoint& aTileRect,
                             const nsIntRegion& dirtyRect);
 
   // do nothing, the desctructor in the texture host takes care of releasing resources
   void ReleaseTile(TiledTexture aTile) {}
 
@@ -246,22 +236,16 @@ public:
     mVideoMemoryTiledBuffer.SetCompositor(aCompositor);
     mLowPrecisionVideoMemoryTiledBuffer.SetCompositor(aCompositor);
   }
 
   virtual void Attach(Layer* aLayer,
                       Compositor* aCompositor,
                       AttachFlags aFlags = NO_FLAGS) MOZ_OVERRIDE;
 
-  virtual void OnActorDestroy() MOZ_OVERRIDE
-  {
-    mVideoMemoryTiledBuffer.OnActorDestroy();
-    mLowPrecisionVideoMemoryTiledBuffer.OnActorDestroy();
-  }
-
 #ifdef MOZ_DUMP_PAINTING
   virtual void Dump(FILE* aFile=nullptr,
                     const char* aPrefix="",
                     bool aDumpHtml=false) MOZ_OVERRIDE;
 #endif
 
 #ifdef MOZ_LAYERS_HAVE_LOG
   virtual void PrintInfo(nsACString& aTo, const char* aPrefix);
--- a/gfx/layers/ipc/ISurfaceAllocator.cpp
+++ b/gfx/layers/ipc/ISurfaceAllocator.cpp
@@ -104,23 +104,16 @@ ISurfaceAllocator::AllocSurfaceDescripto
                                getter_AddRefs(buffer))) {
     return false;
   }
 
   *aBuffer = buffer->GetShmem();
   return true;
 }
 
-/* static */ bool
-ISurfaceAllocator::IsShmem(SurfaceDescriptor* aSurface)
-{
-  return aSurface && (aSurface->type() == SurfaceDescriptor::TShmem ||
-                      aSurface->type() == SurfaceDescriptor::TYCbCrImage ||
-                      aSurface->type() == SurfaceDescriptor::TRGBImage);
-}
 
 void
 ISurfaceAllocator::DestroySharedSurface(SurfaceDescriptor* aSurface)
 {
   MOZ_ASSERT(aSurface);
   if (!aSurface) {
     return;
   }
--- a/gfx/layers/ipc/ISurfaceAllocator.h
+++ b/gfx/layers/ipc/ISurfaceAllocator.h
@@ -114,20 +114,16 @@ ISurfaceAllocator() {}
   // method that does the actual allocation work
   virtual PGrallocBufferChild* AllocGrallocBuffer(const gfxIntSize& aSize,
                                                   uint32_t aFormat,
                                                   uint32_t aUsage,
                                                   MaybeMagicGrallocBufferHandle* aHandle)
   {
     return nullptr;
   }
-
-  // Returns true if aSurface wraps a Shmem.
-  static bool IsShmem(SurfaceDescriptor* aSurface);
-
 protected:
   // this method is needed for a temporary fix, will be removed after
   // DeprecatedTextureClient/Host rework.
   virtual bool IsOnCompositorSide() const = 0;
   static bool PlatformDestroySharedSurface(SurfaceDescriptor* aSurface);
   virtual bool PlatformAllocSurfaceDescriptor(const gfxIntSize& aSize,
                                               gfxContentType aContent,
                                               uint32_t aCaps,
--- a/gfx/ots/src/Makefile.in
+++ b/gfx/ots/src/Makefile.in
@@ -22,17 +22,16 @@
 # PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 #
 # Mozilla author(s): Jonathan Kew
 #
 
 
 ifeq (WINNT,$(OS_TARGET))
 VISIBILITY_FLAGS =
-FORCE_STATIC_LIB = 1
 endif
 
 CSRCS =   \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 DEFINES += -DPACKAGE_VERSION="\"moz\""
--- a/gfx/ots/src/moz.build
+++ b/gfx/ots/src/moz.build
@@ -1,21 +1,20 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'ots'
 
-if CONFIG['OS_TARGET'] != 'WINNT':
-    LIBXUL_LIBRARY = True
+if CONFIG['OS_TARGET'] == 'WINNT':
+    FORCE_STATIC_LIB = True
 else:
-    # FORCE_STATIC_LIB = True
-    pass
+    LIBXUL_LIBRARY = True
 
 EXPORTS += [
     '../include/opentype-sanitiser.h',
     '../include/ots-memory-stream.h',
 ]
 
 SOURCES += [
     'cff.cc',
--- a/gfx/thebes/gfxWindowsSurface.cpp
+++ b/gfx/thebes/gfxWindowsSurface.cpp
@@ -120,17 +120,17 @@ already_AddRefed<gfxASurface>
 gfxWindowsSurface::CreateSimilarSurface(gfxContentType aContent,
                                         const gfxIntSize& aSize)
 {
     if (!mSurface || !mSurfaceValid) {
         return nullptr;
     }
 
     cairo_surface_t *surface;
-    if (GetContentType() == GFX_CONTENT_COLOR_ALPHA) {
+    if (!mForPrinting && GetContentType() == GFX_CONTENT_COLOR_ALPHA) {
         // When creating a similar surface to a transparent surface, ensure
         // the new surface uses a DIB. cairo_surface_create_similar won't
         // use  a DIB for a GFX_CONTENT_COLOR surface if this surface doesn't
         // have a DIB (e.g. if we're a transparent window surface). But
         // we need a DIB to perform well if the new surface is composited into
         // a surface that's the result of create_similar(GFX_CONTENT_COLOR_ALPHA)
         // (e.g. a backbuffer for the window) --- that new surface *would*
         // have a DIB.
--- a/intl/unicharutil/util/Makefile.in
+++ b/intl/unicharutil/util/Makefile.in
@@ -5,17 +5,16 @@
 
 # This makefile builds the unicharutil_external_s library which should be used
 # by frozen (dependent) linkage components. Internal-linkage code should use
 # unicharutil_s which is built in the internal/ subdirectory.
 
 DIST_INSTALL = 1
 SDK_LIBRARY = $(LIBRARY)
 
-FORCE_STATIC_LIB = 1
 USE_STATIC_LIBS = 1
 
 LOCAL_INCLUDES += -I$(srcdir)/../src
 
 include $(topsrcdir)/config/rules.mk
 
 ifdef _MSC_VER
 # Don't include directives about which CRT to use
--- a/intl/unicharutil/util/internal/Makefile.in
+++ b/intl/unicharutil/util/internal/Makefile.in
@@ -8,11 +8,9 @@
 # unicharutil_external_s.
 
 DIST_INSTALL = 1
 MOZILLA_INTERNAL_API = 1
 
 LOCAL_INCLUDES	+= -I$(srcdir)/.. \
   -I$(srcdir)/../../src
 
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
--- a/intl/unicharutil/util/internal/moz.build
+++ b/intl/unicharutil/util/internal/moz.build
@@ -9,8 +9,9 @@ MODULE = 'unicharutil'
 include('../objs.mozbuild')
 
 SOURCES += intl_unicharutil_util_cppsrcs
 
 LIBRARY_NAME = 'unicharutil_s'
 
 EXPORT_LIBRARY = True
 
+FORCE_STATIC_LIB = True
--- a/intl/unicharutil/util/moz.build
+++ b/intl/unicharutil/util/moz.build
@@ -16,8 +16,10 @@ EXPORTS += [
     'nsUnicodeScriptCodes.h',
 ]
 
 include('objs.mozbuild')
 
 SOURCES += intl_unicharutil_util_cppsrcs
 
 LIBRARY_NAME = 'unicharutil_external_s'
+
+FORCE_STATIC_LIB = True
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -26,17 +26,16 @@ LIBS		= $(NSPR_LIBS)
 # and then the static data cells used for locking no longer work.
 #
 # In fact, we now build both a static and a shared library, as the
 # JS shell would like to link to the static library.
 
 ifdef JS_SHARED_LIBRARY
 FORCE_SHARED_LIB = 1
 endif
-FORCE_STATIC_LIB = 1
 DIST_INSTALL = 1
 
 ###############################################
 # BEGIN include sources for low-level code shared with mfbt
 #
 MFBT_ROOT = $(srcdir)/../../mfbt
 VPATH += $(MFBT_ROOT)
 include $(MFBT_ROOT)/exported_headers.mk
--- a/js/src/config/config.mk
+++ b/js/src/config/config.mk
@@ -36,22 +36,24 @@ endif
 _MOZBUILD_EXTERNAL_VARIABLES := \
   ANDROID_GENERATED_RESFILES \
   ANDROID_RESFILES \
   CMMSRCS \
   CPP_UNIT_TESTS \
   DIRS \
   EXTRA_PP_COMPONENTS \
   EXTRA_PP_JS_MODULES \
+  FORCE_STATIC_LIB \
   GTEST_CMMSRCS \
   GTEST_CPPSRCS \
   GTEST_CSRCS \
   HOST_CSRCS \
   HOST_LIBRARY_NAME \
   IS_COMPONENT \
+  JAVA_JAR_TARGETS \
   JS_MODULES_PATH \
   LIBRARY_NAME \
   LIBXUL_LIBRARY \
   MODULE \
   MSVC_ENABLE_PGO \
   NO_DIST_INSTALL \
   PARALLEL_DIRS \
   SDK_HEADERS \
--- a/js/src/editline/Makefile.in
+++ b/js/src/editline/Makefile.in
@@ -1,10 +1,8 @@
 # -*- Mode: makefile -*-
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
-
 DEFINES += -DANSI_ARROWS -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT -DSYS_UNIX \
 	-DHAVE_STDLIB -DUNIQUE_HISTORY
--- a/js/src/editline/moz.build
+++ b/js/src/editline/moz.build
@@ -6,8 +6,9 @@
 
 LIBRARY_NAME = 'editline'
 
 SOURCES += [
     'editline.c',
     'sysunix.c',
 ]
 
+FORCE_STATIC_LIB = True
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -2353,18 +2353,23 @@ CodeGenerator::visitCallDirectEval(LCall
 
     return callVM(DirectEvalInfo, lir);
 }
 
 // Registers safe for use before generatePrologue().
 static const uint32_t EntryTempMask = Registers::TempMask & ~(1 << OsrFrameReg.code());
 
 bool
-CodeGenerator::generateArgumentsChecks()
-{
+CodeGenerator::generateArgumentsChecks(bool bailout)
+{
+    // This function can be used the normal way to check the argument types,
+    // before entering the function and bailout when arguments don't match.
+    // For debug purpose, this is can also be used to force/check that the
+    // arguments are correct. Upon fail it will hit a breakpoint.
+
     MIRGraph &mir = gen->graph();
     MResumePoint *rp = mir.entryResumePoint();
 
     // Reserve the amount of stack the actual frame will use. We have to undo
     // this before falling through to the method proper though, because the
     // monomorphic call case will bypass this entire path.
     masm.reserveStack(frameSize());
 
@@ -2384,18 +2389,28 @@ CodeGenerator::generateArgumentsChecks()
         // Calculate the offset on the stack of the argument.
         // (i - info.startArgSlot())    - Compute index of arg within arg vector.
         // ... * sizeof(Value)          - Scale by value size.
         // ArgToStackOffset(...)        - Compute displacement within arg vector.
         int32_t offset = ArgToStackOffset((i - info.startArgSlot()) * sizeof(Value));
         masm.guardTypeSet(Address(StackPointer, offset), types, temp, &miss);
     }
 
-    if (miss.used() && !bailoutFrom(&miss, graph.entrySnapshot()))
-        return false;
+    if (miss.used()) {
+        if (bailout) {
+            if (!bailoutFrom(&miss, graph.entrySnapshot()))
+                return false;
+        } else {
+            Label success;
+            masm.jump(&success);
+            masm.bind(&miss);
+            masm.breakpoint();
+            masm.bind(&success);
+        }
+    }
 
     masm.freeStack(frameSize());
 
     return true;
 }
 
 // Out-of-line path to report over-recursed error and fail.
 class CheckOverRecursedFailure : public OutOfLineCodeBase<CodeGenerator>
@@ -5674,16 +5689,22 @@ CodeGenerator::generate()
     setSkipArgCheckEntryOffset(masm.size());
 
 #if JS_TRACE_LOGGING
     masm.tracelogStart(gen->info().script());
     masm.tracelogLog(TraceLogging::INFO_ENGINE_IONMONKEY);
     masm.bind(&skip);
 #endif
 
+#ifdef DEBUG
+    // Assert that the argument types are correct.
+    if (!generateArgumentsChecks(/* bailout = */ false))
+        return false;
+#endif
+
     if (!generatePrologue())
         return false;
     if (!generateBody())
         return false;
     if (!generateEpilogue())
         return false;
     if (!generateInvalidateEpilogue())
         return false;
--- a/js/src/jit/CodeGenerator.h
+++ b/js/src/jit/CodeGenerator.h
@@ -38,17 +38,17 @@ class OutOfLineStoreElementHole;
 class OutOfLineTypeOfV;
 class OutOfLineLoadTypedArray;
 class OutOfLineNewGCThingPar;
 class OutOfLineUpdateCache;
 class OutOfLineCallPostWriteBarrier;
 
 class CodeGenerator : public CodeGeneratorSpecific
 {
-    bool generateArgumentsChecks();
+    bool generateArgumentsChecks(bool bailout = true);
     bool generateBody();
 
   public:
     CodeGenerator(MIRGenerator *gen, LIRGraph *graph, MacroAssembler *masm = nullptr);
     ~CodeGenerator();
 
   public:
     bool generate();
--- a/js/src/jit/IonMacroAssembler.cpp
+++ b/js/src/jit/IonMacroAssembler.cpp
@@ -155,16 +155,24 @@ MacroAssembler::guardObjectType(Register
         if (lastBranch.isInitialized())
             lastBranch.emit(*this);
 
         JSObject *object = types->getSingleObject(i);
         lastBranch = BranchGCPtr(Equal, obj, ImmGCPtr(object), &matched);
     }
 
     if (hasTypeObjects) {
+        // We are possibly going to overwrite the obj register. So already
+        // emit the branch, since branch depends on previous value of obj
+        // register and there is definitely a branch following. So no need
+        // to invert the condition.
+        if (lastBranch.isInitialized())
+            lastBranch.emit(*this);
+        lastBranch = BranchGCPtr();
+
         // Note: Some platforms give the same register for obj and scratch.
         // Make sure when writing to scratch, the obj register isn't used anymore!
         loadPtr(Address(obj, JSObject::offsetOfType()), scratch);
 
         for (unsigned i = 0; i < count; i++) {
             if (!types->getTypeObject(i))
                 continue;
 
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -2852,18 +2852,16 @@ class MToFloat32
             return false;
         return congruentIfOperandsEqual(ins);
     }
     AliasSet getAliasSet() const {
         return AliasSet::None();
     }
 
     void computeRange();
-    bool truncate();
-    bool isOperandTruncated(size_t index) const;
 
     bool canConsumeFloat32() const { return true; }
     bool canProduceFloat32() const { return true; }
 };
 
 // Converts a uint32 to a double (coming from asm.js).
 class MAsmJSUnsignedToDouble
   : public MUnaryInstruction
--- a/js/src/jit/RangeAnalysis.cpp
+++ b/js/src/jit/RangeAnalysis.cpp
@@ -2091,30 +2091,16 @@ MToDouble::truncate()
     setResultType(MIRType_Int32);
     if (range())
         range()->wrapAroundToInt32();
 
     return true;
 }
 
 bool
-MToFloat32::truncate()
-{
-    JS_ASSERT(type() == MIRType_Float32);
-
-    // We use the return type to flag that this MToFloat32 sould be replaced by a
-    // MTruncateToInt32 when modifying the graph.
-    setResultType(MIRType_Int32);
-    if (range())
-        range()->wrapAroundToInt32();
-
-    return true;
-}
-
-bool
 MLoadTypedArrayElementStatic::truncate()
 {
     setInfallible();
     return false;
 }
 
 bool
 MDefinition::isOperandTruncated(size_t index) const
@@ -2156,24 +2142,16 @@ bool
 MToDouble::isOperandTruncated(size_t index) const
 {
     // The return type is used to flag that we are replacing this Double by a
     // Truncate of its operand if needed.
     return type() == MIRType_Int32;
 }
 
 bool
-MToFloat32::isOperandTruncated(size_t index) const
-{
-    // The return type is used to flag that we are replacing this Float32 by a
-    // Truncate of its operand if needed.
-    return type() == MIRType_Int32;
-}
-
-bool
 MStoreTypedArrayElement::isOperandTruncated(size_t index) const
 {
     return index == 2 && !isFloatArray();
 }
 
 bool
 MStoreTypedArrayElementHole::isOperandTruncated(size_t index) const
 {
--- a/js/src/jsworkers.cpp
+++ b/js/src/jsworkers.cpp
@@ -653,19 +653,19 @@ WorkerThread::handleAsmJSWorkload(Worker
         asmData->compileTime = (after - before) / PRMJ_USEC_PER_MSEC;
 
         success = true;
     } while(0);
     state.lock();
 
     // On failure, signal parent for harvesting in CancelOutstandingJobs().
     if (!success) {
-        asmData = nullptr;
         state.noteAsmJSFailure(asmData->func);
         state.notifyAll(WorkerThreadState::CONSUMER);
+        asmData = nullptr;
         return;
     }
 
     // On success, move work to the finished list.
     state.asmJSFinishedList.append(asmData);
     asmData = nullptr;
 
     // Notify the main thread in case it's blocked waiting for a LifoAlloc.
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -349,8 +349,10 @@ else:
     ]
 
 MSVC_ENABLE_PGO = True
 
 HOST_SOURCES += [
     'jskwgen.cpp',
     'jsoplengen.cpp',
 ]
+
+FORCE_STATIC_LIB = True
--- a/js/src/vm/TypedArrayObject.cpp
+++ b/js/src/vm/TypedArrayObject.cpp
@@ -533,17 +533,17 @@ ArrayBufferObject::releaseAsmJSArrayBuff
 }
 #else  /* defined(JS_ION) && defined(JS_CPU_X64) */
 bool
 ArrayBufferObject::prepareForAsmJS(JSContext *cx, Handle<ArrayBufferObject*> buffer)
 {
     if (buffer->isAsmJSArrayBuffer())
         return true;
 
-    if (!buffer->copyData(cx))
+    if (!buffer->ensureNonInline(cx))
         return false;
     JS_ASSERT(buffer->hasDynamicElements());
 
     buffer->getElementsHeader()->setIsAsmJSArrayBuffer();
     return true;
 }
 
 void
--- a/js/xpconnect/tests/mochitest/file_asmjs.js
+++ b/js/xpconnect/tests/mochitest/file_asmjs.js
@@ -1,26 +1,71 @@
-function f(stdlib, foreign, buffer) {
+function f1() { "use asm"; function g() {} return g }
+if (this.jsFuns) {
+    ok(jsFuns.isAsmJSModule(f1), "f1 is an asm.js module");
+    ok(jsFuns.isAsmJSFunction(f1()), "f1.g is an asm.js function");
+}
+
+function f2(stdlib, foreign, buffer) {
     "use asm";
     var i32 = new stdlib.Int32Array(buffer);
     function main(n) {
         n = n|0;
         var i = 0, sum = 0;
         for (; (i|0) < (n|0); i=(i+1)|0)
             sum = (sum + (i32[(i<<2)>>2]|0))|0;
         return sum|0;
     }
     return main;
 }
-
-var i32 = new Int32Array(4096/4);
-for (var i = 0; i < 100; i++)
+if (this.jsFuns)
+    ok(jsFuns.isAsmJSModule(f2), "f2 is an asm.js module");
+var i32 = new Int32Array(1024);
+for (var i = 0; i < i32.length; i++)
     i32[i] = i;
+var f2Main = f2(this, null, i32.buffer);
+if (this.jsFuns)
+    ok(jsFuns.isAsmJSFunction(f2Main), "f2.main is an asm.js function");
+if (f2Main(4) !== 6)
+    throw "f2Main(4)";
+if (f2Main(100) !== 4950)
+    throw "f2.main(100)";
+var sum = (((i32.length - 1) * i32.length) / 2);
+if (f2Main(i32.length) !== sum)
+    throw "f2.main(" + i32.length + ")";
+if (f2Main(i32.length + 100) !== sum)
+    throw "f2.main(" + i32.length + ")";
 
-var fMain = f(this, null, i32.buffer);
-if (fMain(4) !== 6)
-    throw "f.main(4)";
-if (fMain(100) !== 4950)
-    throw "f.main(100)";
-if (fMain(5000) !== 4950)
-    throw "f.main(5000)";
+function f3(stdlib, foreign, buffer) {
+    "use asm";
+    var done = foreign.done;
+    var i32 = new stdlib.Int32Array(buffer);
+    function main() {
+        var i = 0, sum = 0;
+        while (1) {
+            for (i = 0; (i|0) < 1000; i=(i+1)|0)
+                sum = (sum + i)|0;
+            if (done(sum|0)|0)
+                break;
+        }
+        return sum|0;
+    }
+    return main;
+}
+var begin;
+var lastSum;
+function done(sum) {
+    if (sum !== ((lastSum + 499500)|0))
+        throw "bad sum: " + sum + ", " + lastSum + ", " + ((lastSum + 499500)|0);
+    lastSum = sum;
+    return (Date.now() - begin) > 3000;
+}
+var f3Main = f3(this, {done:done}, i32.buffer);
+if (this.jsFuns)
+    ok(jsFuns.isAsmJSFunction(f3Main), "f3.main is an asm.js function");
 
-postMessage("ok");
+begin = Date.now();
+lastSum = 0;
+if (f3Main() !== lastSum)
+    throw "f3.main()";
+
+if (!this.jsFuns)
+    postMessage("ok");
--- a/js/xpconnect/tests/mochitest/test_asmjs.html
+++ b/js/xpconnect/tests/mochitest/test_asmjs.html
@@ -5,75 +5,32 @@ https://bugzilla.mozilla.org/show_bug.cg
 -->
 <head>
   <meta charset="utf-8">
   <title>asm.js browser tests</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=854209">asm.js browser tests</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-  
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
+  <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=854209">asm.js browser tests</a>
+  <p id="display"></p>
+  <div id="content" style="display: none"></div>
+  <pre id="test"></pre>
 
-var jsFuns = SpecialPowers.Cu.getJSTestingFunctions();
-
-ok(jsFuns.isAsmJSCompilationAvailable());
-
-function f1() { "use asm"; function g() {} return g }
-ok(jsFuns.isAsmJSModule(f1), "f1 is an asm.js module");
-ok(jsFuns.isAsmJSFunction(f1()), "f1.g is an asm.js function");
+  <script>
+  var jsFuns = SpecialPowers.Cu.getJSTestingFunctions();
+  ok(jsFuns.isAsmJSCompilationAvailable());
+  </script>
 
-function f2(stdlib, foreign, buffer) {
-    "use asm";
-    var i32 = new stdlib.Int32Array(buffer);
-    function main(n) {
-        n = n|0;
-        var i = 0, sum = 0;
-        for (; (i|0) < (n|0); i=(i+1)|0)
-            sum = (sum + (i32[(i<<2)>>2]|0))|0;
-        return sum|0;
-    }
-    return main;
-}
-ok(jsFuns.isAsmJSModule(f2), "f2 is an asm.js module");
-var i32 = new Int32Array(4096/4);
-for (var i = 0; i < 100; i++)
-    i32[i] = i;
-var f2Main = f2(this, null, i32.buffer);
-ok(jsFuns.isAsmJSFunction(f2Main), "f2.main is an asm.js function");
-ok(f2Main(4) == 6, "f2.main(4)");
-ok(f2Main(100) == 4950, "f2.main(100)");
-ok(f2Main(5000) == 4950, "f2.main(5000)");
+  <script src="http://mochi.test:8888/tests/js/xpconnect/tests/mochitest/file_asmjs.js"></script>
 
-function f3(stdlib, foreign, buffer) {
-    "use asm";
-    var i32 = new stdlib.Int32Array(buffer);
-    function main(n,o) {
-        n = n|0;
-        o = o|0;
-        var i = 0, j = 0, sum = 0;
-        for (i = 0; (i|0) < (n|0); i=(i+1)|0)
-            for (j = 0; (j|0) < (o|0); j=(j+1)|0)
-                sum = (sum + (i32[(j<<2)>>2]|0))|0;
-        return sum|0;
-    }
-    return main;
-}
-var f3Main = f3(this, null, i32.buffer);
-ok(jsFuns.isAsmJSFunction(f3Main), "f3.main is an asm.js function");
-ok(f3Main(200000, 1000) == ((4950*200000)|0), "f3.main(200000, 1000)");
+  <script>
+  var w = new Worker('http://mochi.test:8888/tests/js/xpconnect/tests/mochitest/file_asmjs.js');
+  w.onmessage = function(e) {
+      ok(e.data === "ok", "Worker asm.js tests");
+      SimpleTest.finish();
+  }
 
-var w = new Worker('http://mochi.test:8888/tests/js/xpconnect/tests/mochitest/file_asmjs.js');
-w.onmessage = function(e) {
-    ok(e.data === "ok", "Worker asm.js tests");
-    SimpleTest.finish();
-}
+  SimpleTest.waitForExplicitFinish();
+  </script>
 
-SimpleTest.waitForExplicitFinish();
-</script>
-</pre>
 </body>
 </html>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1634,17 +1634,17 @@ HTTP(..) == 621253-2-externalFilter.html
 skip-if(B2G) random-if(winWidget) fuzzy-if(OSX==10.8,19,17) == 621918-1.svg 621918-1-ref.svg # 1-pixel diacritic positioning discrepancy in rotated text (may depend on platform fonts)
 random-if(winWidget) HTTP(..) == 621918-2.svg 621918-2-ref.svg # same 1px issue as above, and HTTP(..) for filters.svg, used to mask antialiasing issues where glyphs touch
 fuzzy-if(d2d,5,1) == 622585-1.html 622585-1-ref.html # bug 789402
 fuzzy-if(Android&&AndroidVersion>=15,8,300) == 625409-1.html 625409-1-ref.html
 == 627393-1.html about:blank
 == 630835-1.html about:blank
 == 631352-1.html 631352-1-ref.html
 skip-if(B2G) fails-if(Android) == 632423-1.html 632423-1-ref.html
-skip-if(Android||B2G) random-if(winWidget) == 632781-verybig.html 632781-ref.html
+skip-if(Android||B2G) random-if(winWidget&&!d2d) == 632781-verybig.html 632781-ref.html
 == 632781-normalsize.html 632781-ref.html
 fails-if(Android) == 633344-1.html 633344-1-ref.html
 == 634232-1.html 634232-1-ref.html
 fails-if(Android) == 635302-1.html 635302-1-ref.html
 skip-if(B2G) random-if(d2d) fails-if(Android) fuzzy-if(winWidget&&!d2d,1,11) == 635373-1.html 635373-1-ref.html
 skip-if(B2G) random-if(d2d) fails-if(Android) fuzzy-if(winWidget&&!d2d,1,15) == 635373-2.html 635373-2-ref.html
 skip-if(B2G) random-if(d2d) fails-if(Android) fuzzy-if(winWidget&&!d2d,1,15) == 635373-3.html 635373-3-ref.html
 HTTP(..) == 635639-1.html 635639-1-ref.html
--- a/media/libcubeb/src/Makefile.in
+++ b/media/libcubeb/src/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB= 1
 ifeq ($(OS_TARGET),WINNT)
 VISIBILITY_FLAGS =
 endif
 
 ifeq ($(OS_TARGET),WINNT)
 DEFINES         += -DUSE_WINMM -DUSE_WASAPI
 endif
 
--- a/media/libcubeb/src/moz.build
+++ b/media/libcubeb/src/moz.build
@@ -46,8 +46,9 @@ if CONFIG['OS_TARGET'] == 'Android':
         SOURCES += [
             'cubeb_audiotrack.c',
         ]
 
 LIBRARY_NAME = 'cubeb'
 
 MSVC_ENABLE_PGO = True
 
+FORCE_STATIC_LIB = True
--- a/media/libjpeg/Makefile.in
+++ b/media/libjpeg/Makefile.in
@@ -11,17 +11,14 @@ AS=$(LIBJPEG_TURBO_AS)
 ASM_SUFFIX=asm
 ASFLAGS=$(LIBJPEG_TURBO_ASFLAGS) -I$(topsrcdir)/media/libjpeg/simd/
 
 ifeq ($(AS),yasm)
   # yasm doesn't like -c
   AS_DASH_C_FLAG=
 endif
 
-# need static lib for some of the libimg componentry to link properly
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 jpeg_nbits_table.h: $(srcdir)/genTables.py
 	$(PYTHON) $(srcdir)/genTables.py
 
 jchuff.$(OBJ_SUFFIX): jpeg_nbits_table.h
--- a/media/libjpeg/moz.build
+++ b/media/libjpeg/moz.build
@@ -145,8 +145,10 @@ else: # No SIMD support?
     SOURCES += [
         'jsimd_none.c',
     ]
 
 LIBRARY_NAME = 'mozjpeg'
 
 MSVC_ENABLE_PGO = True
 
+# need static lib for some of the libimg componentry to link properly
+FORCE_STATIC_LIB = True
--- a/media/libnestegg/src/Makefile.in
+++ b/media/libnestegg/src/Makefile.in
@@ -1,8 +1,7 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB= 1
 ifeq (WINNT,$(OS_TARGET))
 VISIBILITY_FLAGS =
 endif
--- a/media/libnestegg/src/moz.build
+++ b/media/libnestegg/src/moz.build
@@ -10,8 +10,9 @@ SOURCES += [
     'halloc.c',
     'nestegg.c',
 ]
 
 LIBRARY_NAME = 'nestegg'
 
 MSVC_ENABLE_PGO = True
 
+FORCE_STATIC_LIB = True
--- a/media/libogg/src/Makefile.in
+++ b/media/libogg/src/Makefile.in
@@ -1,8 +1,7 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB= 1
 ifeq (WINNT,$(OS_TARGET))
 VISIBILITY_FLAGS =
 endif
--- a/media/libogg/src/moz.build
+++ b/media/libogg/src/moz.build
@@ -10,8 +10,9 @@ SOURCES += [
     'ogg_bitwise.c',
     'ogg_framing.c',
 ]
 
 LIBRARY_NAME = 'ogg'
 
 MSVC_ENABLE_PGO = True
 
+FORCE_STATIC_LIB = True
--- a/media/libopus/Makefile.in
+++ b/media/libopus/Makefile.in
@@ -1,14 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB= 1
-
 DEFINES += \
   -DOPUS_BUILD \
   -DOPUS_VERSION='"v1.1-beta-23-gf2446c2-mozilla"' \
   -DUSE_ALLOCA \
   $(NULL)
 
 ifneq ($(filter $(OS_ARCH),Linux Darwin DragonFly FreeBSD NetBSD OpenBSD),)
   DEFINES += -DHAVE_LRINTF
--- a/media/libopus/moz.build
+++ b/media/libopus/moz.build
@@ -12,8 +12,9 @@ EXPORTS.opus += [
     'include/opus_multistream.h',
     'include/opus_types.h',
 ]
 
 LIBRARY_NAME = 'opus'
 
 MSVC_ENABLE_PGO = True
 
+FORCE_STATIC_LIB = True
--- a/media/libpng/Makefile.in
+++ b/media/libpng/Makefile.in
@@ -1,9 +1,8 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB= 1
 ifeq ($(OS_ARCH),WINNT)
 VISIBILITY_FLAGS=
 endif
--- a/media/libpng/moz.build
+++ b/media/libpng/moz.build
@@ -44,8 +44,9 @@ if CONFIG['MOZ_PNG_ARM_NEON']:
     SOURCES += [
         'arm/filter_neon.S'
     ]
 
 LIBRARY_NAME = 'mozpng'
 
 MSVC_ENABLE_PGO = True
 
+FORCE_STATIC_LIB = True
--- a/media/libspeex_resampler/src/Makefile.in
+++ b/media/libspeex_resampler/src/Makefile.in
@@ -1,14 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
-
 # We don't compile the full speex codec, only the resampler.
 DEFINES += -DOUTSIDE_SPEEX
 # Speex wants a random prefix when building in another program, to avoid name
 # clashes
 DEFINES += -DRANDOM_PREFIX=speex
 # We don't use -fvisibility=hidden
 DEFINES += -DSPX_RESAMPLE_EXPORT=
 
--- a/media/libspeex_resampler/src/moz.build
+++ b/media/libspeex_resampler/src/moz.build
@@ -19,8 +19,9 @@ SOURCES += [
 LIBRARY_NAME = 'speex_resampler'
 
 SOURCES += [
     'resample.c',
 ]
 
 MSVC_ENABLE_PGO = True
 
+FORCE_STATIC_LIB = True
--- a/media/libtheora/lib/Makefile.in
+++ b/media/libtheora/lib/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 ifeq (WINNT,$(OS_TARGET))
 VISIBILITY_FLAGS =
 endif
 
 # The encoder is currently not included.
 DEFINES += -DTHEORA_DISABLE_ENCODE
 
 ifeq ($(findstring 86,$(OS_TEST)), 86)
--- a/media/libtheora/lib/moz.build
+++ b/media/libtheora/lib/moz.build
@@ -21,8 +21,9 @@ SOURCES += [
     'info.c',
     'internal.c',
     'quant.c',
     'state.c',
 ]
 
 MSVC_ENABLE_PGO = True
 
+FORCE_STATIC_LIB = True
--- a/media/libtremor/lib/Makefile.in
+++ b/media/libtremor/lib/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB= 1
 LOCAL_INCLUDES += -I$(topsrcdir)/media/libtremor/include/tremor
 
 ifeq ($(OS_ARCH),AIX)
 DEFINES += -Dalloca=__alloca
 endif
 
 ifeq (arm_1_, $(TARGET_CPU)_$(GNU_CC)_$(MOZ_THUMB2))
 DEFINES += -D_ARM_ASSEM_
--- a/media/libtremor/lib/moz.build
+++ b/media/libtremor/lib/moz.build
@@ -18,8 +18,9 @@ SOURCES += [
     'tremor_mdct.c',
     'tremor_registry.c',
     'tremor_res012.c',
     'tremor_sharedbook.c',
     'tremor_synthesis.c',
     'tremor_window.c',
 ]
 
+FORCE_STATIC_LIB = True
--- a/media/libvorbis/lib/Makefile.in
+++ b/media/libvorbis/lib/Makefile.in
@@ -1,12 +1,11 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB= 1
 ifeq (WINNT,$(OS_TARGET))
 VISIBILITY_FLAGS =
 endif
 
 ifeq ($(OS_ARCH),AIX)
 DEFINES += -Dalloca=__alloca
 endif
--- a/media/libvorbis/lib/moz.build
+++ b/media/libvorbis/lib/moz.build
@@ -28,8 +28,9 @@ SOURCES += [
     'vorbis_sharedbook.c',
     'vorbis_smallft.c',
     'vorbis_synthesis.c',
     'vorbis_window.c',
 ]
 
 MSVC_ENABLE_PGO = True
 
+FORCE_STATIC_LIB = True
--- a/media/libvpx/Makefile.in
+++ b/media/libvpx/Makefile.in
@@ -1,16 +1,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 
 DEFINES += -DHAVE_CONFIG_H=vpx_config.h
 
-FORCE_STATIC_LIB= 1
 ifeq (WINNT,$(OS_TARGET))
 VISIBILITY_FLAGS =
 endif
 
 LOCAL_INCLUDES += \
   -I. \
   -I$(topsrcdir)/media/libvpx \
   -I$(topsrcdir)/media/libvpx/vp8/ \
--- a/media/libvpx/moz.build
+++ b/media/libvpx/moz.build
@@ -87,8 +87,9 @@ SOURCES += [
     'vpx_scale/generic/scalesystemdependent.c',
     'vpx_scale/generic/vpxscale.c',
     'vpx_scale/generic/yv12config.c',
     'vpx_scale/generic/yv12extend.c',
 ]
 
 MSVC_ENABLE_PGO = True
 
+FORCE_STATIC_LIB = True
--- a/media/mtransport/standalone/Makefile.in
+++ b/media/mtransport/standalone/Makefile.in
@@ -1,14 +1,13 @@
 # -*- Mode: makefile; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB= 1
 ifeq (WINNT,$(OS_TARGET))
 VISIBILITY_FLAGS =
 endif
 
 DEFINES += -DHAVE_STRDUP -DNR_SOCKET_IS_VOID_PTR
 
 ifneq (,$(filter Darwin DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET)))
 ifeq ($(OS_TARGET), Darwin)
--- a/media/mtransport/standalone/moz.build
+++ b/media/mtransport/standalone/moz.build
@@ -44,8 +44,10 @@ elif CONFIG['OS_TARGET'] == 'Linux':
 elif CONFIG['OS_TARGET'] == 'Android':
     LOCAL_INCLUDES += [
         '/media/mtransport/third_party/nrappkit/src/port/android/include',
     ]
 elif CONFIG['OS_TARGET'] == 'WINNT':
     LOCAL_INCLUDES += [
         '/media/mtransport/third_party/nrappkit/src/port/win32/include',
     ]
+
+FORCE_STATIC_LIB = True
--- a/memory/build/Makefile.in
+++ b/memory/build/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 STLFLAGS =
 ifdef MOZ_GLUE_PROGRAM_LDFLAGS
 SDK_LIBRARY = $(REAL_LIBRARY)
 DIST_INSTALL = 1
 endif
 
 DEFINES += -DMOZ_MEMORY_IMPL
 
--- a/memory/build/moz.build
+++ b/memory/build/moz.build
@@ -28,8 +28,9 @@ if CONFIG['MOZ_JEMALLOC3']:
 
 if CONFIG['MOZ_REPLACE_MALLOC']:
     SOURCES += [
         'replace_malloc.c',
     ]
 
 LIBRARY_NAME = 'memory'
 
+FORCE_STATIC_LIB = True
--- a/memory/jemalloc/Makefile.in
+++ b/memory/jemalloc/Makefile.in
@@ -1,16 +1,14 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 VPATH		= $(srcdir) $(srcdir)/src/src
 
-FORCE_STATIC_LIB = 1
-
 ifdef MOZ_GLUE_PROGRAM_LDFLAGS
 SDK_LIBRARY = $(REAL_LIBRARY)
 DIST_INSTALL = 1
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 LOCAL_INCLUDES += \
--- a/memory/jemalloc/moz.build
+++ b/memory/jemalloc/moz.build
@@ -35,8 +35,9 @@ SOURCES += [
 # but only if replace-malloc is not enabled.
 if CONFIG['OS_TARGET'] == 'Darwin' and not CONFIG['MOZ_REPLACE_MALLOC']:
     SOURCES += [
         'src/src/zone.c',
     ]
 
 LIBRARY_NAME = 'jemalloc'
 
+FORCE_STATIC_LIB = True
--- a/memory/mozalloc/Makefile.in
+++ b/memory/mozalloc/Makefile.in
@@ -6,19 +6,17 @@
 VISIBILITY_FLAGS=
 STL_FLAGS	=
 ifdef _MSC_VER
 STL_FLAGS	= -D_HAS_EXCEPTIONS=0
 endif
 
 DIST_INSTALL 	= 1
 
-ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
-FORCE_STATIC_LIB= 1
-else
+ifneq (gonk,$(MOZ_WIDGET_TOOLKIT))
 FORCE_SHARED_LIB= 1
 endif
 
 ifeq (,$(filter-out OS2,$(OS_ARCH)))
 # The strndup declaration in string.h is in an ifdef __USE_GNU section
 DEFINES		+= -D_GNU_SOURCE
 endif
 
--- a/memory/mozalloc/moz.build
+++ b/memory/mozalloc/moz.build
@@ -38,8 +38,10 @@ if CONFIG['WRAP_STL_INCLUDES']:
 SOURCES += [
     'mozalloc.cpp',
     'mozalloc_abort.cpp',
     'mozalloc_oom.cpp',
 ]
 
 LIBRARY_NAME = 'mozalloc'
 
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+    FORCE_STATIC_LIB = True
--- a/memory/mozjemalloc/Makefile.in
+++ b/memory/mozjemalloc/Makefile.in
@@ -1,16 +1,14 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 ifndef MOZ_JEMALLOC3
-FORCE_STATIC_LIB= 1
-
 ifeq ($(OS_ARCH),SunOS)
 ifndef GNU_CC
 MODULE_OPTIMIZE_FLAGS = -xO5
 endif
 endif
 
 ifeq (Linux,$(OS_TARGET))
 #XXX: PGO on Linux causes problems here
--- a/memory/mozjemalloc/moz.build
+++ b/memory/mozjemalloc/moz.build
@@ -10,9 +10,9 @@ EXPORTS += [
     'jemalloc_types.h',
 ]
 
 if not CONFIG['MOZ_JEMALLOC3']:
     SOURCES += [
         'jemalloc.c',
     ]
     LIBRARY_NAME = 'jemalloc'
-
+    FORCE_STATIC_LIB = True
--- a/mfbt/Makefile.in
+++ b/mfbt/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 STL_FLAGS =
 
 # exported_headers.mk defines the headers exported by mfbt.  It is included by
 # mfbt itself and by the JS engine, which, when built standalone, must do the
 # work to install mfbt's exported headers itself.
 include $(srcdir)/exported_headers.mk
 
 # sources.mk defines the source files built for mfbt. It is included by mfbt
--- a/mfbt/moz.build
+++ b/mfbt/moz.build
@@ -5,8 +5,9 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['tests']
 
 MODULE = 'mozglue'
 
 LIBRARY_NAME = 'mfbt'
 
+FORCE_STATIC_LIB = True
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -1,330 +1,18 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIST_FILES = package-name.txt
 
-include $(topsrcdir)/mobile/android/base/android-services-files.mk
-
-MOZGLUE_JAVA_FILES := \
-  mozglue/ByteBufferInputStream.java \
-  mozglue/DirectBufferAllocator.java \
-  mozglue/GeneratableAndroidBridgeTarget.java \
-  mozglue/NativeReference.java \
-  mozglue/NativeZip.java \
-  mozglue/OptionalGeneratedParameter.java \
-  $(NULL)
-
-MOZGLUE_PP_JAVA_FILES := \
-  mozglue/GeckoLoader.java \
-  $(NULL)
-
-UTIL_JAVA_FILES := \
-  util/ActivityResultHandler.java \
-  util/ActivityResultHandlerMap.java \
-  util/Clipboard.java \
-  util/EventDispatcher.java \
-  util/FloatUtils.java \
-  util/GamepadUtils.java \
-  util/GeckoBackgroundThread.java \
-  util/GeckoEventListener.java \
-  util/GeckoEventResponder.java \
-  util/GeckoJarReader.java \
-  util/HardwareUtils.java \
-  util/INIParser.java \
-  util/INISection.java \
-  util/JSONUtils.java \
-  util/StringUtils.java \
-  util/ThreadUtils.java \
-  util/UiAsyncTask.java \
-  $(NULL)
-
-FENNEC_JAVA_FILES = \
-  ANRReporter.java \
-  ActivityHandlerHelper.java \
-  AlertNotification.java \
-  AlignRightLinkPreference.java \
-  AllCapsTextView.java \
-  AndroidImport.java \
-  AndroidImportPreference.java \
-  AnimatedHeightLayout.java \
-  AppNotificationClient.java \
-  AutocompleteHandler.java \
-  animation/AnimatorProxy.java \
-  animation/HeightChangeAnimation.java \
-  animation/PropertyAnimator.java \
-  animation/Rotate3DAnimation.java \
-  animation/ViewHelper.java \
-  BackButton.java \
-  BaseGeckoInterface.java \
-  BrowserApp.java \
-  BrowserToolbar.java \
-  BrowserToolbarBackground.java \
-  CameraImageResultHandler.java \
-  CameraVideoResultHandler.java \
-  CanvasDelegate.java \
-  CheckableLinearLayout.java \
-  ClickableWhenDisabledEditText.java \
-  ContactService.java \
-  ContextGetter.java \
-  CustomEditText.java \
-  db/BrowserDB.java \
-  db/LocalBrowserDB.java \
-  db/DBUtils.java \
-  DataReportingNotification.java \
-  Distribution.java \
-  DoorHanger.java \
-  DoorHangerPopup.java \
-  EditBookmarkDialog.java \
-  favicons/cache/FaviconCache.java \
-  favicons/cache/FaviconCacheElement.java \
-  favicons/cache/FaviconsForURL.java \
-  favicons/Favicons.java \
-  favicons/LoadFaviconTask.java \
-  favicons/OnFaviconLoadedListener.java \
-  FilePickerResultHandler.java \
-  FilePickerResultHandlerSync.java \
-  FindInPageBar.java \
-  FlowLayout.java \
-  FontSizePreference.java \
-  FormAssistPopup.java \
-  ForwardButton.java \
-  GeckoAccessibility.java \
-  GeckoApplication.java \
-  GeckoApp.java \
-  GeckoAppShell.java \
-  GeckoActivity.java \
-  GeckoBatteryManager.java \
-  GeckoConnectivityReceiver.java \
-  GeckoEditable.java \
-  GeckoEvent.java \
-  GeckoHalDefines.java \
-  GeckoInputConnection.java \
-  GeckoMessageReceiver.java \
-  GeckoPreferences.java \
-  GeckoPreferenceFragment.java \
-  GeckoProfile.java \
-  GeckoSmsManager.java \
-  GeckoThread.java \
-  GeckoJavaSampler.java \
-  GlobalHistory.java \
-  GeckoView.java \
-  health/BrowserHealthRecorder.java \
-  health/BrowserHealthReporter.java \
-  InputMethods.java \
-  JavaAddonManager.java \
-  LightweightTheme.java \
-  LightweightThemeDrawable.java \
-  LinkPreference.java \
-  MemoryMonitor.java \
-  MotionEventInterceptor.java \
-  MultiChoicePreference.java \
-  NotificationClient.java \
-  NotificationHandler.java \
-  NotificationHelper.java \
-  NotificationService.java \
-  NSSBridge.java \
-  OrderedBroadcastHelper.java \
-  PageActionLayout.java \
-  PrefsHelper.java \
-  PrivateDataPreference.java \
-  PrivateTab.java \
-  prompts/Prompt.java \
-  prompts/PromptInput.java \
-  prompts/PromptService.java \
-  prompts/IconGridInput.java \
-  Restarter.java \
-  sqlite/ByteBufferInputStream.java \
-  sqlite/MatrixBlobCursor.java \
-  sqlite/SQLiteBridge.java \
-  sqlite/SQLiteBridgeException.java \
-  ReaderModeUtils.java \
-  RemoteTabs.java \
-  RobocopAPI.java \
-  ServiceNotificationClient.java \
-  ScrollAnimator.java \
-  SessionParser.java \
-  ShapedButton.java \
-  SharedPreferencesHelper.java \
-  SiteIdentityPopup.java \
-  SmsManager.java \
-  SurfaceBits.java \
-  SyncPreference.java \
-  Tab.java \
-  TabCounter.java \
-  Tabs.java \
-  TabsPanel.java \
-  TabsTray.java \
-  TabsAccessor.java \
-  Telemetry.java \
-  TextSelection.java \
-  TextSelectionHandle.java \
-  ThumbnailHelper.java \
-  TouchEventInterceptor.java \
-  VideoPlayer.java \
-  WebAppAllocator.java \
-  WebAppImpl.java \
-  ZoomConstraints.java \
-  db/BrowserContract.java \
-  db/BrowserProvider.java \
-  db/FormHistoryProvider.java \
-  db/PerProfileContentProvider.java \
-  db/PasswordsProvider.java \
-  db/TabsProvider.java \
-  gfx/Axis.java \
-  gfx/BitmapUtils.java \
-  gfx/BufferedCairoImage.java \
-  gfx/CairoGLInfo.java \
-  gfx/CairoImage.java \
-  gfx/CairoUtils.java \
-  gfx/DisplayPortCalculator.java \
-  gfx/DisplayPortMetrics.java \
-  gfx/DrawTimingQueue.java \
-  gfx/FloatSize.java \
-  gfx/GeckoLayerClient.java \
-  gfx/GfxInfoThread.java \
-  gfx/GLController.java \
-  gfx/ImmutableViewportMetrics.java \
-  gfx/InputConnectionHandler.java \
-  gfx/IntSize.java \
-  gfx/JavaPanZoomController.java \
-  gfx/Layer.java \
-  gfx/LayerMarginsAnimator.java \
-  gfx/LayerRenderer.java \
-  gfx/LayerView.java \
-  gfx/NativePanZoomController.java \
-  gfx/NinePatchTileLayer.java \
-  gfx/Overscroll.java \
-  gfx/PanningPerfAPI.java \
-  gfx/PanZoomController.java \
-  gfx/PanZoomTarget.java \
-  gfx/PluginLayer.java \
-  gfx/PointUtils.java \
-  gfx/ProgressiveUpdateData.java \
-  gfx/RectUtils.java \
-  gfx/RenderTask.java \
-  gfx/ScrollbarLayer.java \
-  gfx/SimpleScaleGestureDetector.java \
-  gfx/SingleTileLayer.java \
-  gfx/SubdocumentScrollHelper.java \
-  gfx/TextLayer.java \
-  gfx/TextureGenerator.java \
-  gfx/TextureReaper.java \
-  gfx/TileLayer.java \
-  gfx/TouchEventHandler.java \
-  gfx/ViewTransform.java \
-  gfx/VirtualLayer.java \
-  home/BookmarksListAdapter.java \
-  home/BookmarksListView.java \
-  home/BookmarksPage.java \
-  home/BookmarkFolderView.java \
-  home/BrowserSearch.java \
-  home/HistoryPage.java \
-  home/HomeFragment.java \
-  home/HomeListView.java \
-  home/HomePager.java \
-  home/HomePagerTabStrip.java \
-  home/HomeBanner.java \
-  home/FadedTextView.java \
-  home/LastTabsPage.java \
-  home/MostRecentPage.java \
-  home/MultiTypeCursorAdapter.java \
-  home/PinSiteDialog.java \
-  home/ReadingListPage.java \
-  home/SearchEngine.java \
-  home/SearchEngineRow.java \
-  home/SearchLoader.java \
-  home/SimpleCursorLoader.java \
-  home/SuggestClient.java \
-  home/TabMenuStrip.java \
-  home/TopSitesGridItemView.java \
-  home/TopSitesGridView.java \
-  home/TopSitesPage.java \
-  home/TopSitesThumbnailView.java \
-  home/TwoLinePageRow.java \
-  menu/GeckoMenu.java \
-  menu/GeckoMenuInflater.java \
-  menu/GeckoMenuItem.java \
-  menu/GeckoSubMenu.java \
-  menu/MenuItemActionBar.java \
-  menu/MenuItemActionView.java \
-  menu/MenuItemDefault.java \
-  menu/MenuPanel.java \
-  menu/MenuPopup.java \
-  preferences/SearchPreferenceCategory.java \
-  preferences/SearchEnginePreference.java \
-  updater/UpdateServiceHelper.java \
-  updater/UpdateService.java \
-  widget/ActivityChooserModel.java \
-  widget/ButtonToast.java \
-  widget/ArrowPopup.java \
-  widget/DateTimePicker.java \
-  widget/Divider.java \
-  widget/FaviconView.java \
-  widget/GeckoPopupMenu.java \
-  widget/GeckoActionProvider.java \
-  widget/IconTabWidget.java \
-  widget/TabRow.java \
-  widget/ThumbnailView.java \
-  widget/TwoWayView.java \
-  GeckoNetworkManager.java \
-  GeckoScreenOrientationListener.java \
-  GeckoUpdateReceiver.java \
-  ReferrerReceiver.java \
-  $(NULL)
-
-BRAILLE_JAVA_FILES := \
-  com/googlecode/eyesfree/braille/selfbraille/ISelfBrailleService.java \
-  com/googlecode/eyesfree/braille/selfbraille/SelfBrailleClient.java \
-  com/googlecode/eyesfree/braille/selfbraille/WriteData.java \
-  $(NULL)
-
-WEBSOCKETS_JAVA_FILES := \
-  com/codebutler/android_websockets/HybiParser.java \
-  com/codebutler/android_websockets/WebSocketClient.java \
-  $(NULL)
-
-ifdef MOZ_WEBRTC
-WEBRTC_VIDEO_CAPTURE_JAVA_FILES = \
-  CaptureCapabilityAndroid.java \
-  VideoCaptureAndroid.java \
-  VideoCaptureDeviceInfoAndroid.java \
-  $(NULL)
-
-WEBRTC_AUDIO_CAPTURE_JAVA_FILES = \
-  WebRTCAudioDevice.java \
-  $(NULL)
-
-WEBRTC_JAVA_FILES = \
-  $(addprefix $(DEPTH)/media/webrtc/trunk/webrtc/modules/video_capture/android/java/org/webrtc/videoengine/, $(WEBRTC_VIDEO_CAPTURE_JAVA_FILES)) \
-  $(addprefix $(DEPTH)/media/webrtc/trunk/webrtc/modules/audio_device/android/org/webrtc/voiceengine/, $(WEBRTC_AUDIO_CAPTURE_JAVA_FILES)) \
-  $(NULL)
-endif
-
 ifdef MOZ_ANDROID_ANR_REPORTER
 DEFINES += -DMOZ_ANDROID_ANR_REPORTER=1
 endif
 
-FENNEC_PP_JAVA_FILES := \
-  App.java \
-  AppConstants.java \
-  widget/GeckoEditText.java \
-  widget/GeckoImageButton.java \
-  widget/GeckoImageView.java \
-  widget/GeckoLinearLayout.java \
-  widget/GeckoRelativeLayout.java \
-  widget/GeckoTextSwitcher.java \
-  widget/GeckoTextView.java \
-  SysInfo.java \
-  WebApp.java \
-  WebApps.java \
-  $(NULL)
-
 ifneq (,$(findstring -march=armv7,$(OS_CFLAGS)))
 MIN_CPU_VERSION=7
 else
 MIN_CPU_VERSION=5
 endif
 
 MOZ_APP_BUILDID=$(shell cat $(DEPTH)/config/buildid)
 
@@ -383,22 +71,22 @@ DEFINES += \
 ifdef MOZ_PKG_SPECIAL
 DEFINES += -DMOZ_PKG_SPECIAL=$(MOZ_PKG_SPECIAL)
 endif
 
 ifdef MOZ_LINKER_EXTRACT
 DEFINES += -DMOZ_LINKER_EXTRACT=1
 endif
 
+PP_JAVAFILES = $(filter-out R.java,$(gecko-mozglue_PP_JAVAFILES) $(gecko-browser_PP_JAVAFILES))
+
 GARBAGE += \
   AndroidManifest.xml  \
   classes.dex  \
-  $(MOZGLUE_PP_JAVA_FILES) \
-  $(FENNEC_PP_JAVA_FILES) \
-  $(SYNC_PP_JAVA_FILES) \
+  $(PP_JAVAFILES) \
   gecko.ap_  \
   res/values/strings.xml \
   R.java \
   package-name.txt \
   fennec_ids.txt \
   Manifest.java \
   javah.out \
   jni-stubs.inc \
@@ -416,104 +104,28 @@ ICON_PATH_XHDPI = $(topsrcdir)/$(MOZ_BRA
 ICON_PATH_XXHDPI = $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/content/fennec_144x144.png
 else
 ICON_PATH = $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/content/icon48.png
 ICON_PATH_HDPI = $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/content/icon64.png
 endif
 
 JAVA_CLASSPATH = $(ANDROID_SDK)/android.jar
 
-ifdef MOZ_CRASHREPORTER
-FENNEC_JAVA_FILES += CrashReporter.java
-endif
-
 ALL_JARS = \
-  jars/gecko-browser.jar \
-  jars/gecko-mozglue.jar \
-  jars/gecko-util.jar \
-  jars/sync-thirdparty.jar \
-  jars/websockets.jar \
+  gecko-browser.jar \
+  gecko-mozglue.jar \
+  gecko-util.jar \
+  sync-thirdparty.jar \
+  websockets.jar \
   $(NULL)
 
 ifdef MOZ_WEBRTC
-ALL_JARS += jars/webrtc.jar
+ALL_JARS += webrtc.jar
 endif
 
-thirdparty_source_dir = $(topsrcdir)/mobile/android/thirdparty
-
-JAVA_JAR_TARGETS += websockets
-websockets_DEST := jars/websockets.jar
-websockets_JAVAFILES := \
-  $(addprefix $(thirdparty_source_dir)/,$(WEBSOCKETS_JAVA_FILES)) \
-  $(NULL)
-websockets_JAVAC_FLAGS := -Xlint:all,-serial
-
-JAVA_JAR_TARGETS += gecko-browser
-gecko-browser_DEST := jars/gecko-browser.jar
-gecko-browser_JAVAFILES := \
-  $(FENNEC_JAVA_FILES) \
-  $(addprefix $(thirdparty_source_dir)/,$(BRAILLE_JAVA_FILES)) \
-  $(SYNC_JAVA_FILES) \
-  $(NULL)
-gecko-browser_PP_JAVAFILES := \
-  $(FENNEC_PP_JAVA_FILES) \
-  $(SYNC_PP_JAVA_FILES) \
-  R.java \
-  $(NULL)
-gecko-browser_EXTRA_JARS := \
-  jars/gecko-mozglue.jar \
-  jars/gecko-util.jar \
-  jars/sync-thirdparty.jar \
-  jars/websockets.jar \
-  $(NULL)
-gecko-browser_JAVAC_FLAGS := -Xlint:all,-deprecation,-fallthrough
-
-JAVA_JAR_TARGETS += gecko-mozglue
-gecko-mozglue_DEST := jars/gecko-mozglue.jar
-gecko-mozglue_JAVAFILES := \
-  $(MOZGLUE_JAVA_FILES) \
-  $(NULL)
-gecko-mozglue_PP_JAVAFILES := \
-  $(MOZGLUE_PP_JAVA_FILES) \
-  $(NULL)
-gecko-mozglue_JAVAC_FLAGS := -Xlint:all
-
-JAVA_JAR_TARGETS += gecko-util
-gecko-util_DEST := jars/gecko-util.jar
-gecko-util_JAVAFILES := \
-  $(UTIL_JAVA_FILES) \
-  $(NULL)
-gecko-util_EXTRA_JARS := \
-  jars/gecko-mozglue.jar \
-  $(NULL)
-gecko-util_JAVAC_FLAGS := -Xlint:all,-deprecation
-
-JAVA_JAR_TARGETS += sync-thirdparty
-sync-thirdparty_DEST := jars/sync-thirdparty.jar
-sync-thirdparty_JAVAFILES := \
-  $(addprefix $(thirdparty_source_dir)/,$(SYNC_THIRDPARTY_JAVA_FILES)) \
-  $(NULL)
-sync-thirdparty_JAVAC_FLAGS := -Xlint:none
-
-ifdef MOZ_WEBRTC
-JAVA_JAR_TARGETS += webrtc
-webrtc_DEST := jars/webrtc.jar
-webrtc_JAVAFILES := \
-  $(WEBRTC_JAVA_FILES) \
-  $(NULL)
-webrtc_EXTRA_JARS := \
-  jars/gecko-browser.jar \
-  jars/gecko-util.jar \
-  jars/gecko-mozglue.jar \
-  $(NULL)
-webrtc_JAVAC_FLAGS := -Xlint:all,-deprecation,-cast
-endif
-
-include $(topsrcdir)/config/makefiles/java-build.mk
-
 # We process ANDROID_RESFILES specially for now; the following flag
 # disables the default processing.
 IGNORE_ANDROID_RESFILES=1
 
 include $(topsrcdir)/config/rules.mk
 
 # Override the Java settings with some specific android settings
 include $(topsrcdir)/config/android-common.mk
@@ -538,44 +150,40 @@ ifdef MOZ_WEBSMS_BACKEND
 # Note: if you are building with MOZ_WEBSMS_BACKEND turned on, then
 # you will get a build error because the generated jni-stubs.inc will
 # be different than the one checked in (i.e. it will have the sms-related
 # JNI stubs as well). Just copy the generated file to mozglue/android/
 # like the error message says and rebuild. All should be well after that.
 CLASSES_WITH_JNI += org.mozilla.gecko.GeckoSmsManager
 endif
 
-jni-stubs.inc: jars/gecko-browser.jar jars/gecko-mozglue.jar jars/gecko-util.jar jars/sync-thirdparty.jar
+jni-stubs.inc: gecko-browser.jar gecko-mozglue.jar gecko-util.jar sync-thirdparty.jar
 	$(JAVAH) -o javah.out -bootclasspath $(JAVA_BOOTCLASSPATH) -classpath $(subst $(NULL) $(NULL),:,$^) $(CLASSES_WITH_JNI)
 	$(PYTHON) $(topsrcdir)/mobile/android/base/jni-generator.py javah.out $@
 
 ANNOTATION_PROCESSOR_JAR_FILES := $(DEPTH)/build/annotationProcessors/annotationProcessors.jar
 
 GeneratedJNIWrappers.cpp: $(ANNOTATION_PROCESSOR_JAR_FILES)
 GeneratedJNIWrappers.cpp: $(ALL_JARS)
 	$(JAVA) -classpath $(JAVA_BOOTCLASSPATH):$(ANNOTATION_PROCESSOR_JAR_FILES) org.mozilla.gecko.annotationProcessors.AnnotationProcessor $(ALL_JARS)
 
 # AndroidManifest.xml includes these files, so they need to be marked as dependencies.
 SERVICES_MANIFEST_FRAGMENTS = $(wildcard $(topsrcdir)/mobile/android/services/manifests/*.in)
 
 android-tgts = \
   AndroidManifest.xml \
-  $(MOZGLUE_PP_JAVA_FILES) \
-  $(FENNEC_PP_JAVA_FILES) \
-  $(SYNC_PP_JAVA_FILES) \
   package-name.txt \
+  $(PP_JAVAFILES) \
   $(NULL)
 
 android-preqs = \
   Makefile.in \
   widget/GeckoView.java.frag \
-  $(call mkdir_deps,$(sort $(dir $(MOZGLUE_PP_JAVA_FILES)))) \
-  $(call mkdir_deps,$(sort $(dir $(FENNEC_PP_JAVA_FILES)))) \
-  $(call mkdir_deps,$(sort $(dir $(SYNC_PP_JAVA_FILES)))) \
   $(SERVICES_MANIFEST_FRAGMENTS) \
+  $(call mkdir_deps,$(sort $(dir $(PP_JAVAFILES)))) \
   $(NULL)
 
 $(android-tgts): % : %.in $(android-preqs)
 	$(PYTHON) $(topsrcdir)/config/Preprocessor.py \
              $(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $< > $@
 
 res/drawable-mdpi/icon.png: $(ICON_PATH)
 	$(NSINSTALL) -D res/drawable-mdpi
deleted file mode 100644
--- a/mobile/android/base/android-services-files.mk
+++ /dev/null
@@ -1,771 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-# These files are managed in the android-sync repo. Do not modify directly, or your changes will be lost.
-SYNC_PP_JAVA_FILES := \
-  background/common/GlobalConstants.java \
-  sync/SyncConstants.java \
-  background/announcements/AnnouncementsConstants.java \
-  background/healthreport/HealthReportConstants.java \
-  $(NULL)
-
-SYNC_JAVA_FILES := \
-  background/announcements/Announcement.java \
-  background/announcements/AnnouncementPresenter.java \
-  background/announcements/AnnouncementsBroadcastReceiver.java \
-  background/announcements/AnnouncementsBroadcastService.java \
-  background/announcements/AnnouncementsFetchDelegate.java \
-  background/announcements/AnnouncementsFetcher.java \
-  background/announcements/AnnouncementsFetchResourceDelegate.java \
-  background/announcements/AnnouncementsService.java \
-  background/BackgroundService.java \
-  background/bagheera/BagheeraClient.java \
-  background/bagheera/BagheeraRequestDelegate.java \
-  background/bagheera/BoundedByteArrayEntity.java \
-  background/bagheera/DeflateHelper.java \
-  background/common/DateUtils.java \
-  background/common/log/Logger.java \
-  background/common/log/writers/AndroidLevelCachingLogWriter.java \
-  background/common/log/writers/AndroidLogWriter.java \
-  background/common/log/writers/LevelFilteringLogWriter.java \
-  background/common/log/writers/LogWriter.java \
-  background/common/log/writers/PrintLogWriter.java \
-  background/common/log/writers/SimpleTagLogWriter.java \
-  background/common/log/writers/StringLogWriter.java \
-  background/common/log/writers/TagLogWriter.java \
-  background/common/log/writers/ThreadLocalTagLogWriter.java \
-  background/datareporting/TelemetryRecorder.java \
-  background/db/CursorDumper.java \
-  background/db/Tab.java \
-  background/healthreport/Environment.java \
-  background/healthreport/EnvironmentBuilder.java \
-  background/healthreport/EnvironmentV1.java \
-  background/healthreport/HealthReportBroadcastReceiver.java \
-  background/healthreport/HealthReportBroadcastService.java \
-  background/healthreport/HealthReportDatabases.java \
-  background/healthreport/HealthReportDatabaseStorage.java \
-  background/healthreport/HealthReportGenerator.java \
-  background/healthreport/HealthReportProvider.java \
-  background/healthreport/HealthReportStorage.java \
-  background/healthreport/HealthReportUtils.java \
-  background/healthreport/ProfileInformationCache.java \
-  background/healthreport/prune/HealthReportPruneService.java \
-  background/healthreport/prune/PrunePolicy.java \
-  background/healthreport/prune/PrunePolicyDatabaseStorage.java \
-  background/healthreport/prune/PrunePolicyStorage.java \
-  background/healthreport/upload/AndroidSubmissionClient.java \
-  background/healthreport/upload/HealthReportUploadService.java \
-  background/healthreport/upload/ObsoleteDocumentTracker.java \
-  background/healthreport/upload/SubmissionClient.java \
-  background/healthreport/upload/SubmissionPolicy.java \
-  sync/AlreadySyncingException.java \
-  sync/CollectionKeys.java \
-  sync/CommandProcessor.java \
-  sync/CommandRunner.java \
-  sync/config/AccountPickler.java \
-  sync/config/activities/SelectEnginesActivity.java \
-  sync/config/ClientRecordTerminator.java \
-  sync/config/ConfigurationMigrator.java \
-  sync/CredentialException.java \
-  sync/CredentialsSource.java \
-  sync/crypto/CryptoException.java \
-  sync/crypto/CryptoInfo.java \
-  sync/crypto/HKDF.java \
-  sync/crypto/HMACVerificationException.java \
-  sync/crypto/KeyBundle.java \
-  sync/crypto/MissingCryptoInputException.java \
-  sync/crypto/NoKeyBundleException.java \
-  sync/crypto/PersistedCrypto5Keys.java \
-  sync/CryptoRecord.java \
-  sync/DelayedWorkTracker.java \
-  sync/delegates/ClientsDataDelegate.java \
-  sync/delegates/FreshStartDelegate.java \
-  sync/delegates/GlobalSessionCallback.java \
-  sync/delegates/JSONRecordFetchDelegate.java \
-  sync/delegates/KeyUploadDelegate.java \
-  sync/delegates/MetaGlobalDelegate.java \
-  sync/delegates/WipeServerDelegate.java \
-  sync/EngineSettings.java \
-  sync/ExtendedJSONObject.java \
-  sync/GlobalSession.java \
-  sync/HTTPFailureException.java \
-  sync/InfoCollections.java \
-  sync/InfoCounts.java \
-  sync/jpake/BigIntegerHelper.java \
-  sync/jpake/Gx3OrGx4IsZeroOrOneException.java \
-  sync/jpake/IncorrectZkpException.java \
-  sync/jpake/JPakeClient.java \
-  sync/jpake/JPakeCrypto.java \
-  sync/jpake/JPakeJson.java \
-  sync/jpake/JPakeNoActivePairingException.java \
-  sync/jpake/JPakeNumGenerator.java \
-  sync/jpake/JPakeNumGeneratorRandom.java \
-  sync/jpake/JPakeParty.java \
-  sync/jpake/stage/CompleteStage.java \
-  sync/jpake/stage/ComputeFinalStage.java \
-  sync/jpake/stage/ComputeKeyVerificationStage.java \
-  sync/jpake/stage/ComputeStepOneStage.java \
-  sync/jpake/stage/ComputeStepTwoStage.java \
-  sync/jpake/stage/DecryptDataStage.java \
-  sync/jpake/stage/DeleteChannel.java \
-  sync/jpake/stage/GetChannelStage.java \
-  sync/jpake/stage/GetRequestStage.java \
-  sync/jpake/stage/JPakeStage.java \
-  sync/jpake/stage/PutRequestStage.java \
-  sync/jpake/stage/VerifyPairingStage.java \
-  sync/jpake/Zkp.java \
-  sync/JSONRecordFetcher.java \
-  sync/KeyBundleProvider.java \
-  sync/MetaGlobal.java \
-  sync/MetaGlobalException.java \
-  sync/MetaGlobalMissingEnginesException.java \
-  sync/MetaGlobalNotSetException.java \
-  sync/middleware/Crypto5MiddlewareRepository.java \
-  sync/middleware/Crypto5MiddlewareRepositorySession.java \
-  sync/middleware/MiddlewareRepository.java \
-  sync/middleware/MiddlewareRepositorySession.java \
-  sync/net/AuthHeaderProvider.java \
-  sync/net/BaseResource.java \
-  sync/net/BaseResourceDelegate.java \
-  sync/net/BasicAuthHeaderProvider.java \
-  sync/net/BrowserIDAuthHeaderProvider.java \
-  sync/net/ConnectionMonitorThread.java \
-  sync/net/HandleProgressException.java \
-  sync/net/HawkAuthHeaderProvider.java \
-  sync/net/HMACAuthHeaderProvider.java \
-  sync/net/HttpResponseObserver.java \
-  sync/net/Resource.java \
-  sync/net/ResourceDelegate.java \
-  sync/net/SyncResponse.java \
-  sync/net/SyncStorageCollectionRequest.java \
-  sync/net/SyncStorageCollectionRequestDelegate.java \
-  sync/net/SyncStorageRecordRequest.java \
-  sync/net/SyncStorageRequest.java \
-  sync/net/SyncStorageRequestDelegate.java \
-  sync/net/SyncStorageRequestIncrementalDelegate.java \
-  sync/net/SyncStorageResponse.java \
-  sync/net/TLSSocketFactory.java \
-  sync/net/WBOCollectionRequestDelegate.java \
-  sync/net/WBORequestDelegate.java \
-  sync/NoCollectionKeysSetException.java \
-  sync/NodeAuthenticationException.java \
-  sync/NonArrayJSONException.java \
-  sync/NonObjectJSONException.java \
-  sync/NullClusterURLException.java \
-  sync/PersistedMetaGlobal.java \
-  sync/PrefsSource.java \
-  sync/receivers/SyncAccountDeletedReceiver.java \
-  sync/receivers/SyncAccountDeletedService.java \
-  sync/receivers/UpgradeReceiver.java \
-  sync/repositories/android/AndroidBrowserBookmarksDataAccessor.java \
-  sync/repositories/android/AndroidBrowserBookmarksRepository.java \
-  sync/repositories/android/AndroidBrowserBookmarksRepositorySession.java \
-  sync/repositories/android/AndroidBrowserHistoryDataAccessor.java \
-  sync/repositories/android/AndroidBrowserHistoryDataExtender.java \
-  sync/repositories/android/AndroidBrowserHistoryRepository.java \
-  sync/repositories/android/AndroidBrowserHistoryRepositorySession.java \
-  sync/repositories/android/AndroidBrowserRepository.java \
-  sync/repositories/android/AndroidBrowserRepositoryDataAccessor.java \
-  sync/repositories/android/AndroidBrowserRepositorySession.java \
-  sync/repositories/android/BookmarksDeletionManager.java \
-  sync/repositories/android/BookmarksInsertionManager.java \
-  sync/repositories/android/BrowserContractHelpers.java \
-  sync/repositories/android/CachedSQLiteOpenHelper.java \
-  sync/repositories/android/ClientsDatabase.java \
-  sync/repositories/android/ClientsDatabaseAccessor.java \
-  sync/repositories/android/FennecTabsRepository.java \
-  sync/repositories/android/FormHistoryRepositorySession.java \
-  sync/repositories/android/PasswordsRepositorySession.java \
-  sync/repositories/android/RepoUtils.java \
-  sync/repositories/BookmarkNeedsReparentingException.java \
-  sync/repositories/BookmarksRepository.java \
-  sync/repositories/ConstrainedServer11Repository.java \
-  sync/repositories/delegates/DeferrableRepositorySessionCreationDelegate.java \
-  sync/repositories/delegates/DeferredRepositorySessionBeginDelegate.java \
-  sync/repositories/delegates/DeferredRepositorySessionFetchRecordsDelegate.java \
-  sync/repositories/delegates/DeferredRepositorySessionFinishDelegate.java \
-  sync/repositories/delegates/DeferredRepositorySessionStoreDelegate.java \
-  sync/repositories/delegates/RepositorySessionBeginDelegate.java \
-  sync/repositories/delegates/RepositorySessionCleanDelegate.java \
-  sync/repositories/delegates/RepositorySessionCreationDelegate.java \
-  sync/repositories/delegates/RepositorySessionFetchRecordsDelegate.java \
-  sync/repositories/delegates/RepositorySessionFinishDelegate.java \
-  sync/repositories/delegates/RepositorySessionGuidsSinceDelegate.java \
-  sync/repositories/delegates/RepositorySessionStoreDelegate.java \
-  sync/repositories/delegates/RepositorySessionWipeDelegate.java \
-  sync/repositories/domain/BookmarkRecord.java \
-  sync/repositories/domain/BookmarkRecordFactory.java \
-  sync/repositories/domain/ClientRecord.java \
-  sync/repositories/domain/ClientRecordFactory.java \
-  sync/repositories/domain/FormHistoryRecord.java \
-  sync/repositories/domain/HistoryRecord.java \
-  sync/repositories/domain/HistoryRecordFactory.java \
-  sync/repositories/domain/PasswordRecord.java \
-  sync/repositories/domain/Record.java \
-  sync/repositories/domain/RecordParseException.java \
-  sync/repositories/domain/TabsRecord.java \
-  sync/repositories/domain/VersionConstants.java \
-  sync/repositories/FetchFailedException.java \
-  sync/repositories/HashSetStoreTracker.java \
-  sync/repositories/HistoryRepository.java \
-  sync/repositories/IdentityRecordFactory.java \
-  sync/repositories/InactiveSessionException.java \
-  sync/repositories/InvalidBookmarkTypeException.java \
-  sync/repositories/InvalidRequestException.java \
-  sync/repositories/InvalidSessionTransitionException.java \
-  sync/repositories/MultipleRecordsForGuidException.java \
-  sync/repositories/NoContentProviderException.java \
-  sync/repositories/NoGuidForIdException.java \
-  sync/repositories/NoStoreDelegateException.java \
-  sync/repositories/NullCursorException.java \
-  sync/repositories/ParentNotFoundException.java \
-  sync/repositories/ProfileDatabaseException.java \
-  sync/repositories/RecordFactory.java \
-  sync/repositories/RecordFilter.java \
-  sync/repositories/Repository.java \
-  sync/repositories/RepositorySession.java \
-  sync/repositories/RepositorySessionBundle.java \
-  sync/repositories/Server11Repository.java \
-  sync/repositories/Server11RepositorySession.java \
-  sync/repositories/StoreFailedException.java \
-  sync/repositories/StoreTracker.java \
-  sync/repositories/StoreTrackingRepositorySession.java \
-  sync/Server11PreviousPostFailedException.java \
-  sync/Server11RecordPostFailedException.java \
-  sync/setup/activities/AccountActivity.java \
-  sync/setup/activities/ActivityUtils.java \
-  sync/setup/activities/ClientRecordArrayAdapter.java \
-  sync/setup/activities/RedirectToSetupActivity.java \
-  sync/setup/activities/SendTabActivity.java \
-  sync/setup/activities/SendTabData.java \
-  sync/setup/activities/SetupFailureActivity.java \
-  sync/setup/activities/SetupSuccessActivity.java \
-  sync/setup/activities/SetupSyncActivity.java \
-  sync/setup/activities/SyncActivity.java \
-  sync/setup/activities/WebURLFinder.java \
-  sync/setup/activities/WebViewActivity.java \
-  sync/setup/auth/AccountAuthenticator.java \
-  sync/setup/auth/AuthenticateAccountStage.java \
-  sync/setup/auth/AuthenticationResult.java \
-  sync/setup/auth/AuthenticatorStage.java \
-  sync/setup/auth/EnsureUserExistenceStage.java \
-  sync/setup/auth/FetchUserNodeStage.java \
-  sync/setup/Constants.java \
-  sync/setup/InvalidSyncKeyException.java \
-  sync/setup/SyncAccounts.java \
-  sync/setup/SyncAuthenticatorService.java \
-  sync/stage/AbstractNonRepositorySyncStage.java \
-  sync/stage/AbstractSessionManagingSyncStage.java \
-  sync/stage/AndroidBrowserBookmarksServerSyncStage.java \
-  sync/stage/AndroidBrowserHistoryServerSyncStage.java \
-  sync/stage/CheckPreconditionsStage.java \
-  sync/stage/CompletedStage.java \
-  sync/stage/EnsureClusterURLStage.java \
-  sync/stage/EnsureCrypto5KeysStage.java \
-  sync/stage/FennecTabsServerSyncStage.java \
-  sync/stage/FetchInfoCollectionsStage.java \
-  sync/stage/FetchMetaGlobalStage.java \
-  sync/stage/FormHistoryServerSyncStage.java \
-  sync/stage/GlobalSyncStage.java \
-  sync/stage/NoSuchStageException.java \
-  sync/stage/NoSyncIDException.java \
-  sync/stage/PasswordsServerSyncStage.java \
-  sync/stage/SafeConstrainedServer11Repository.java \
-  sync/stage/ServerSyncStage.java \
-  sync/stage/SyncClientsEngineStage.java \
-  sync/stage/UploadMetaGlobalStage.java \
-  sync/syncadapter/SyncAdapter.java \
-  sync/syncadapter/SyncService.java \
-  sync/SyncConfiguration.java \
-  sync/SyncConfigurationException.java \
-  sync/SyncException.java \
-  sync/synchronizer/ConcurrentRecordConsumer.java \
-  sync/synchronizer/RecordConsumer.java \
-  sync/synchronizer/RecordsChannel.java \
-  sync/synchronizer/RecordsChannelDelegate.java \
-  sync/synchronizer/RecordsConsumerDelegate.java \
-  sync/synchronizer/SerialRecordConsumer.java \
-  sync/synchronizer/ServerLocalSynchronizer.java \
-  sync/synchronizer/ServerLocalSynchronizerSession.java \
-  sync/synchronizer/SessionNotBegunException.java \
-  sync/synchronizer/Synchronizer.java \
-  sync/synchronizer/SynchronizerDelegate.java \
-  sync/synchronizer/SynchronizerSession.java \
-  sync/synchronizer/SynchronizerSessionDelegate.java \
-  sync/synchronizer/UnbundleError.java \
-  sync/synchronizer/UnexpectedSessionException.java \
-  sync/SynchronizerConfiguration.java \
-  sync/ThreadPool.java \
-  sync/UnexpectedJSONException.java \
-  sync/UnknownSynchronizerConfigurationVersionException.java \
-  sync/Utils.java \
-  $(NULL)
-
-SYNC_THIRDPARTY_JAVA_FILES := \
-  ch/boye/httpclientandroidlib/androidextra/HttpClientAndroidLog.java \
-  ch/boye/httpclientandroidlib/annotation/GuardedBy.java \
-  ch/boye/httpclientandroidlib/annotation/Immutable.java \
-  ch/boye/httpclientandroidlib/annotation/NotThreadSafe.java \
-  ch/boye/httpclientandroidlib/annotation/ThreadSafe.java \
-  ch/boye/httpclientandroidlib/auth/AUTH.java \
-  ch/boye/httpclientandroidlib/auth/AuthenticationException.java \
-  ch/boye/httpclientandroidlib/auth/AuthScheme.java \
-  ch/boye/httpclientandroidlib/auth/AuthSchemeFactory.java \
-  ch/boye/httpclientandroidlib/auth/AuthSchemeRegistry.java \
-  ch/boye/httpclientandroidlib/auth/AuthScope.java \
-  ch/boye/httpclientandroidlib/auth/AuthState.java \
-  ch/boye/httpclientandroidlib/auth/BasicUserPrincipal.java \
-  ch/boye/httpclientandroidlib/auth/ContextAwareAuthScheme.java \
-  ch/boye/httpclientandroidlib/auth/Credentials.java \
-  ch/boye/httpclientandroidlib/auth/InvalidCredentialsException.java \
-  ch/boye/httpclientandroidlib/auth/MalformedChallengeException.java \
-  ch/boye/httpclientandroidlib/auth/NTCredentials.java \
-  ch/boye/httpclientandroidlib/auth/NTUserPrincipal.java \
-  ch/boye/httpclientandroidlib/auth/params/AuthParamBean.java \
-  ch/boye/httpclientandroidlib/auth/params/AuthParams.java \
-  ch/boye/httpclientandroidlib/auth/params/AuthPNames.java \
-  ch/boye/httpclientandroidlib/auth/UsernamePasswordCredentials.java \
-  ch/boye/httpclientandroidlib/client/AuthCache.java \
-  ch/boye/httpclientandroidlib/client/AuthenticationHandler.java \
-  ch/boye/httpclientandroidlib/client/CircularRedirectException.java \
-  ch/boye/httpclientandroidlib/client/ClientProtocolException.java \
-  ch/boye/httpclientandroidlib/client/CookieStore.java \
-  ch/boye/httpclientandroidlib/client/CredentialsProvider.java \
-  ch/boye/httpclientandroidlib/client/entity/DecompressingEntity.java \
-  ch/boye/httpclientandroidlib/client/entity/DeflateDecompressingEntity.java \
-  ch/boye/httpclientandroidlib/client/entity/GzipDecompressingEntity.java \
-  ch/boye/httpclientandroidlib/client/entity/UrlEncodedFormEntity.java \
-  ch/boye/httpclientandroidlib/client/HttpClient.java \
-  ch/boye/httpclientandroidlib/client/HttpRequestRetryHandler.java \
-  ch/boye/httpclientandroidlib/client/HttpResponseException.java \
-  ch/boye/httpclientandroidlib/client/methods/AbortableHttpRequest.java \
-  ch/boye/httpclientandroidlib/client/methods/HttpDelete.java \
-  ch/boye/httpclientandroidlib/client/methods/HttpEntityEnclosingRequestBase.java \
-  ch/boye/httpclientandroidlib/client/methods/HttpGet.java \
-  ch/boye/httpclientandroidlib/client/methods/HttpHead.java \
-  ch/boye/httpclientandroidlib/client/methods/HttpOptions.java \
-  ch/boye/httpclientandroidlib/client/methods/HttpPost.java \
-  ch/boye/httpclientandroidlib/client/methods/HttpPut.java \
-  ch/boye/httpclientandroidlib/client/methods/HttpRequestBase.java \
-  ch/boye/httpclientandroidlib/client/methods/HttpTrace.java \
-  ch/boye/httpclientandroidlib/client/methods/HttpUriRequest.java \
-  ch/boye/httpclientandroidlib/client/NonRepeatableRequestException.java \
-  ch/boye/httpclientandroidlib/client/params/AllClientPNames.java \
-  ch/boye/httpclientandroidlib/client/params/AuthPolicy.java \
-  ch/boye/httpclientandroidlib/client/params/ClientParamBean.java \
-  ch/boye/httpclientandroidlib/client/params/ClientPNames.java \
-  ch/boye/httpclientandroidlib/client/params/CookiePolicy.java \
-  ch/boye/httpclientandroidlib/client/params/HttpClientParams.java \
-  ch/boye/httpclientandroidlib/client/protocol/ClientContext.java \
-  ch/boye/httpclientandroidlib/client/protocol/ClientContextConfigurer.java \
-  ch/boye/httpclientandroidlib/client/protocol/RequestAcceptEncoding.java \
-  ch/boye/httpclientandroidlib/client/protocol/RequestAddCookies.java \
-  ch/boye/httpclientandroidlib/client/protocol/RequestAuthCache.java \
-  ch/boye/httpclientandroidlib/client/protocol/RequestClientConnControl.java \
-  ch/boye/httpclientandroidlib/client/protocol/RequestDefaultHeaders.java \
-  ch/boye/httpclientandroidlib/client/protocol/RequestProxyAuthentication.java \
-  ch/boye/httpclientandroidlib/client/protocol/RequestTargetAuthentication.java \
-  ch/boye/httpclientandroidlib/client/protocol/ResponseAuthCache.java \
-  ch/boye/httpclientandroidlib/client/protocol/ResponseContentEncoding.java \
-  ch/boye/httpclientandroidlib/client/protocol/ResponseProcessCookies.java \
-  ch/boye/httpclientandroidlib/client/RedirectException.java \
-  ch/boye/httpclientandroidlib/client/RedirectHandler.java \
-  ch/boye/httpclientandroidlib/client/RedirectStrategy.java \
-  ch/boye/httpclientandroidlib/client/RequestDirector.java \
-  ch/boye/httpclientandroidlib/client/ResponseHandler.java \
-  ch/boye/httpclientandroidlib/client/UserTokenHandler.java \
-  ch/boye/httpclientandroidlib/client/utils/CloneUtils.java \
-  ch/boye/httpclientandroidlib/client/utils/Idn.java \
-  ch/boye/httpclientandroidlib/client/utils/JdkIdn.java \
-  ch/boye/httpclientandroidlib/client/utils/Punycode.java \
-  ch/boye/httpclientandroidlib/client/utils/Rfc3492Idn.java \
-  ch/boye/httpclientandroidlib/client/utils/URIUtils.java \
-  ch/boye/httpclientandroidlib/client/utils/URLEncodedUtils.java \
-  ch/boye/httpclientandroidlib/conn/BasicEofSensorWatcher.java \
-  ch/boye/httpclientandroidlib/conn/BasicManagedEntity.java \
-  ch/boye/httpclientandroidlib/conn/ClientConnectionManager.java \
-  ch/boye/httpclientandroidlib/conn/ClientConnectionManagerFactory.java \
-  ch/boye/httpclientandroidlib/conn/ClientConnectionOperator.java \
-  ch/boye/httpclientandroidlib/conn/ClientConnectionRequest.java \
-  ch/boye/httpclientandroidlib/conn/ConnectionKeepAliveStrategy.java \
-  ch/boye/httpclientandroidlib/conn/ConnectionPoolTimeoutException.java \
-  ch/boye/httpclientandroidlib/conn/ConnectionReleaseTrigger.java \
-  ch/boye/httpclientandroidlib/conn/ConnectTimeoutException.java \
-  ch/boye/httpclientandroidlib/conn/EofSensorInputStream.java \
-  ch/boye/httpclientandroidlib/conn/EofSensorWatcher.java \
-  ch/boye/httpclientandroidlib/conn/HttpHostConnectException.java \
-  ch/boye/httpclientandroidlib/conn/HttpRoutedConnection.java \
-  ch/boye/httpclientandroidlib/conn/ManagedClientConnection.java \
-  ch/boye/httpclientandroidlib/conn/MultihomePlainSocketFactory.java \
-  ch/boye/httpclientandroidlib/conn/OperatedClientConnection.java \
-  ch/boye/httpclientandroidlib/conn/params/ConnConnectionParamBean.java \
-  ch/boye/httpclientandroidlib/conn/params/ConnConnectionPNames.java \
-  ch/boye/httpclientandroidlib/conn/params/ConnManagerParamBean.java \
-  ch/boye/httpclientandroidlib/conn/params/ConnManagerParams.java \
-  ch/boye/httpclientandroidlib/conn/params/ConnManagerPNames.java \
-  ch/boye/httpclientandroidlib/conn/params/ConnPerRoute.java \
-  ch/boye/httpclientandroidlib/conn/params/ConnPerRouteBean.java \
-  ch/boye/httpclientandroidlib/conn/params/ConnRouteParamBean.java \
-  ch/boye/httpclientandroidlib/conn/params/ConnRouteParams.java \
-  ch/boye/httpclientandroidlib/conn/params/ConnRoutePNames.java \
-  ch/boye/httpclientandroidlib/conn/routing/BasicRouteDirector.java \
-  ch/boye/httpclientandroidlib/conn/routing/HttpRoute.java \
-  ch/boye/httpclientandroidlib/conn/routing/HttpRouteDirector.java \
-  ch/boye/httpclientandroidlib/conn/routing/HttpRoutePlanner.java \
-  ch/boye/httpclientandroidlib/conn/routing/RouteInfo.java \
-  ch/boye/httpclientandroidlib/conn/routing/RouteTracker.java \
-  ch/boye/httpclientandroidlib/conn/scheme/HostNameResolver.java \
-  ch/boye/httpclientandroidlib/conn/scheme/LayeredSchemeSocketFactory.java \
-  ch/boye/httpclientandroidlib/conn/scheme/LayeredSchemeSocketFactoryAdaptor.java \
-  ch/boye/httpclientandroidlib/conn/scheme/LayeredSocketFactory.java \
-  ch/boye/httpclientandroidlib/conn/scheme/LayeredSocketFactoryAdaptor.java \
-  ch/boye/httpclientandroidlib/conn/scheme/PlainSocketFactory.java \
-  ch/boye/httpclientandroidlib/conn/scheme/Scheme.java \
-  ch/boye/httpclientandroidlib/conn/scheme/SchemeRegistry.java \
-  ch/boye/httpclientandroidlib/conn/scheme/SchemeSocketFactory.java \
-  ch/boye/httpclientandroidlib/conn/scheme/SchemeSocketFactoryAdaptor.java \
-  ch/boye/httpclientandroidlib/conn/scheme/SocketFactory.java \
-  ch/boye/httpclientandroidlib/conn/scheme/SocketFactoryAdaptor.java \
-  ch/boye/httpclientandroidlib/conn/ssl/AbstractVerifier.java \
-  ch/boye/httpclientandroidlib/conn/ssl/AllowAllHostnameVerifier.java \
-  ch/boye/httpclientandroidlib/conn/ssl/BrowserCompatHostnameVerifier.java \
-  ch/boye/httpclientandroidlib/conn/ssl/SSLSocketFactory.java \
-  ch/boye/httpclientandroidlib/conn/ssl/StrictHostnameVerifier.java \
-  ch/boye/httpclientandroidlib/conn/ssl/TrustManagerDecorator.java \
-  ch/boye/httpclientandroidlib/conn/ssl/TrustSelfSignedStrategy.java \
-  ch/boye/httpclientandroidlib/conn/ssl/TrustStrategy.java \
-  ch/boye/httpclientandroidlib/conn/ssl/X509HostnameVerifier.java \
-  ch/boye/httpclientandroidlib/conn/util/InetAddressUtils.java \
-  ch/boye/httpclientandroidlib/ConnectionClosedException.java \
-  ch/boye/httpclientandroidlib/ConnectionReuseStrategy.java \
-  ch/boye/httpclientandroidlib/cookie/ClientCookie.java \
-  ch/boye/httpclientandroidlib/cookie/Cookie.java \
-  ch/boye/httpclientandroidlib/cookie/CookieAttributeHandler.java \
-  ch/boye/httpclientandroidlib/cookie/CookieIdentityComparator.java \
-  ch/boye/httpclientandroidlib/cookie/CookieOrigin.java \
-  ch/boye/httpclientandroidlib/cookie/CookiePathComparator.java \
-  ch/boye/httpclientandroidlib/cookie/CookieRestrictionViolationException.java \
-  ch/boye/httpclientandroidlib/cookie/CookieSpec.java \
-  ch/boye/httpclientandroidlib/cookie/CookieSpecFactory.java \
-  ch/boye/httpclientandroidlib/cookie/CookieSpecRegistry.java \
-  ch/boye/httpclientandroidlib/cookie/MalformedCookieException.java \
-  ch/boye/httpclientandroidlib/cookie/params/CookieSpecParamBean.java \
-  ch/boye/httpclientandroidlib/cookie/params/CookieSpecPNames.java \
-  ch/boye/httpclientandroidlib/cookie/SetCookie.java \
-  ch/boye/httpclientandroidlib/cookie/SetCookie2.java \
-  ch/boye/httpclientandroidlib/cookie/SM.java \
-  ch/boye/httpclientandroidlib/entity/AbstractHttpEntity.java \
-  ch/boye/httpclientandroidlib/entity/BasicHttpEntity.java \
-  ch/boye/httpclientandroidlib/entity/BufferedHttpEntity.java \
-  ch/boye/httpclientandroidlib/entity/ByteArrayEntity.java \
-  ch/boye/httpclientandroidlib/entity/ContentLengthStrategy.java \
-  ch/boye/httpclientandroidlib/entity/ContentProducer.java \
-  ch/boye/httpclientandroidlib/entity/EntityTemplate.java \
-  ch/boye/httpclientandroidlib/entity/FileEntity.java \
-  ch/boye/httpclientandroidlib/entity/HttpEntityWrapper.java \
-  ch/boye/httpclientandroidlib/entity/InputStreamEntity.java \
-  ch/boye/httpclientandroidlib/entity/SerializableEntity.java \
-  ch/boye/httpclientandroidlib/entity/StringEntity.java \
-  ch/boye/httpclientandroidlib/FormattedHeader.java \
-  ch/boye/httpclientandroidlib/Header.java \
-  ch/boye/httpclientandroidlib/HeaderElement.java \
-  ch/boye/httpclientandroidlib/HeaderElementIterator.java \
-  ch/boye/httpclientandroidlib/HeaderIterator.java \
-  ch/boye/httpclientandroidlib/HttpClientConnection.java \
-  ch/boye/httpclientandroidlib/HttpConnection.java \
-  ch/boye/httpclientandroidlib/HttpConnectionMetrics.java \
-  ch/boye/httpclientandroidlib/HttpEntity.java \
-  ch/boye/httpclientandroidlib/HttpEntityEnclosingRequest.java \
-  ch/boye/httpclientandroidlib/HttpException.java \
-  ch/boye/httpclientandroidlib/HttpHeaders.java \
-  ch/boye/httpclientandroidlib/HttpHost.java \
-  ch/boye/httpclientandroidlib/HttpInetConnection.java \
-  ch/boye/httpclientandroidlib/HttpMessage.java \
-  ch/boye/httpclientandroidlib/HttpRequest.java \
-  ch/boye/httpclientandroidlib/HttpRequestFactory.java \
-  ch/boye/httpclientandroidlib/HttpRequestInterceptor.java \
-  ch/boye/httpclientandroidlib/HttpResponse.java \
-  ch/boye/httpclientandroidlib/HttpResponseFactory.java \
-  ch/boye/httpclientandroidlib/HttpResponseInterceptor.java \
-  ch/boye/httpclientandroidlib/HttpServerConnection.java \
-  ch/boye/httpclientandroidlib/HttpStatus.java \
-  ch/boye/httpclientandroidlib/HttpVersion.java \
-  ch/boye/httpclientandroidlib/impl/AbstractHttpClientConnection.java \
-  ch/boye/httpclientandroidlib/impl/AbstractHttpServerConnection.java \
-  ch/boye/httpclientandroidlib/impl/auth/AuthSchemeBase.java \
-  ch/boye/httpclientandroidlib/impl/auth/BasicScheme.java \
-  ch/boye/httpclientandroidlib/impl/auth/BasicSchemeFactory.java \
-  ch/boye/httpclientandroidlib/impl/auth/DigestScheme.java \
-  ch/boye/httpclientandroidlib/impl/auth/DigestSchemeFactory.java \
-  ch/boye/httpclientandroidlib/impl/auth/NTLMEngine.java \
-  ch/boye/httpclientandroidlib/impl/auth/NTLMEngineException.java \
-  ch/boye/httpclientandroidlib/impl/auth/NTLMEngineImpl.java \
-  ch/boye/httpclientandroidlib/impl/auth/NTLMScheme.java \
-  ch/boye/httpclientandroidlib/impl/auth/NTLMSchemeFactory.java \
-  ch/boye/httpclientandroidlib/impl/auth/RFC2617Scheme.java \
-  ch/boye/httpclientandroidlib/impl/auth/SpnegoTokenGenerator.java \
-  ch/boye/httpclientandroidlib/impl/auth/UnsupportedDigestAlgorithmException.java \
-  ch/boye/httpclientandroidlib/impl/client/AbstractAuthenticationHandler.java \
-  ch/boye/httpclientandroidlib/impl/client/AbstractHttpClient.java \
-  ch/boye/httpclientandroidlib/impl/client/BasicAuthCache.java \
-  ch/boye/httpclientandroidlib/impl/client/BasicCookieStore.java \
-  ch/boye/httpclientandroidlib/impl/client/BasicCredentialsProvider.java \
-  ch/boye/httpclientandroidlib/impl/client/BasicResponseHandler.java \
-  ch/boye/httpclientandroidlib/impl/client/ClientParamsStack.java \
-  ch/boye/httpclientandroidlib/impl/client/ContentEncodingHttpClient.java \
-  ch/boye/httpclientandroidlib/impl/client/DefaultConnectionKeepAliveStrategy.java \
-  ch/boye/httpclientandroidlib/impl/client/DefaultHttpClient.java \
-  ch/boye/httpclientandroidlib/impl/client/DefaultHttpRequestRetryHandler.java \
-  ch/boye/httpclientandroidlib/impl/client/DefaultProxyAuthenticationHandler.java \
-  ch/boye/httpclientandroidlib/impl/client/DefaultRedirectHandler.java \
-  ch/boye/httpclientandroidlib/impl/client/DefaultRedirectStrategy.java \
-  ch/boye/httpclientandroidlib/impl/client/DefaultRedirectStrategyAdaptor.java \
-  ch/boye/httpclientandroidlib/impl/client/DefaultRequestDirector.java \
-  ch/boye/httpclientandroidlib/impl/client/DefaultTargetAuthenticationHandler.java \
-  ch/boye/httpclientandroidlib/impl/client/DefaultUserTokenHandler.java \
-  ch/boye/httpclientandroidlib/impl/client/EntityEnclosingRequestWrapper.java \
-  ch/boye/httpclientandroidlib/impl/client/RedirectLocations.java \
-  ch/boye/httpclientandroidlib/impl/client/RequestWrapper.java \
-  ch/boye/httpclientandroidlib/impl/client/RoutedRequest.java \
-  ch/boye/httpclientandroidlib/impl/client/TunnelRefusedException.java \
-  ch/boye/httpclientandroidlib/impl/conn/AbstractClientConnAdapter.java \
-  ch/boye/httpclientandroidlib/impl/conn/AbstractPooledConnAdapter.java \
-  ch/boye/httpclientandroidlib/impl/conn/AbstractPoolEntry.java \
-  ch/boye/httpclientandroidlib/impl/conn/ConnectionShutdownException.java \
-  ch/boye/httpclientandroidlib/impl/conn/DefaultClientConnection.java \
-  ch/boye/httpclientandroidlib/impl/conn/DefaultClientConnectionOperator.java \
-  ch/boye/httpclientandroidlib/impl/conn/DefaultHttpRoutePlanner.java \
-  ch/boye/httpclientandroidlib/impl/conn/DefaultResponseParser.java \
-  ch/boye/httpclientandroidlib/impl/conn/HttpInetSocketAddress.java \
-  ch/boye/httpclientandroidlib/impl/conn/IdleConnectionHandler.java \
-  ch/boye/httpclientandroidlib/impl/conn/LoggingSessionInputBuffer.java \
-  ch/boye/httpclientandroidlib/impl/conn/LoggingSessionOutputBuffer.java \
-  ch/boye/httpclientandroidlib/impl/conn/ProxySelectorRoutePlanner.java \
-  ch/boye/httpclientandroidlib/impl/conn/SchemeRegistryFactory.java \
-  ch/boye/httpclientandroidlib/impl/conn/SingleClientConnManager.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/AbstractConnPool.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/BasicPooledConnAdapter.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/BasicPoolEntry.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/BasicPoolEntryRef.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/ConnPoolByRoute.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/PoolEntryRequest.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/RefQueueHandler.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/RefQueueWorker.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/RouteSpecificPool.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/ThreadSafeClientConnManager.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/WaitingThread.java \
-  ch/boye/httpclientandroidlib/impl/conn/tsccm/WaitingThreadAborter.java \
-  ch/boye/httpclientandroidlib/impl/conn/Wire.java \
-  ch/boye/httpclientandroidlib/impl/cookie/AbstractCookieAttributeHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/AbstractCookieSpec.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BasicClientCookie.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BasicClientCookie2.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BasicCommentHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BasicDomainHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BasicExpiresHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BasicMaxAgeHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BasicPathHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BasicSecureHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BestMatchSpec.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BestMatchSpecFactory.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BrowserCompatSpec.java \
-  ch/boye/httpclientandroidlib/impl/cookie/BrowserCompatSpecFactory.java \
-  ch/boye/httpclientandroidlib/impl/cookie/CookieSpecBase.java \
-  ch/boye/httpclientandroidlib/impl/cookie/DateParseException.java \
-  ch/boye/httpclientandroidlib/impl/cookie/DateUtils.java \
-  ch/boye/httpclientandroidlib/impl/cookie/IgnoreSpec.java \
-  ch/boye/httpclientandroidlib/impl/cookie/IgnoreSpecFactory.java \
-  ch/boye/httpclientandroidlib/impl/cookie/NetscapeDomainHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/NetscapeDraftHeaderParser.java \
-  ch/boye/httpclientandroidlib/impl/cookie/NetscapeDraftSpec.java \
-  ch/boye/httpclientandroidlib/impl/cookie/NetscapeDraftSpecFactory.java \
-  ch/boye/httpclientandroidlib/impl/cookie/PublicSuffixFilter.java \
-  ch/boye/httpclientandroidlib/impl/cookie/PublicSuffixListParser.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2109DomainHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2109Spec.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2109SpecFactory.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2109VersionHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2965CommentUrlAttributeHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2965DiscardAttributeHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2965DomainAttributeHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2965PortAttributeHandler.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2965Spec.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2965SpecFactory.java \
-  ch/boye/httpclientandroidlib/impl/cookie/RFC2965VersionAttributeHandler.java \
-  ch/boye/httpclientandroidlib/impl/DefaultConnectionReuseStrategy.java \
-  ch/boye/httpclientandroidlib/impl/DefaultHttpClientConnection.java \
-  ch/boye/httpclientandroidlib/impl/DefaultHttpRequestFactory.java \
-  ch/boye/httpclientandroidlib/impl/DefaultHttpResponseFactory.java \
-  ch/boye/httpclientandroidlib/impl/DefaultHttpServerConnection.java \
-  ch/boye/httpclientandroidlib/impl/EnglishReasonPhraseCatalog.java \
-  ch/boye/httpclientandroidlib/impl/entity/EntityDeserializer.java \
-  ch/boye/httpclientandroidlib/impl/entity/EntitySerializer.java \
-  ch/boye/httpclientandroidlib/impl/entity/LaxContentLengthStrategy.java \
-  ch/boye/httpclientandroidlib/impl/entity/StrictContentLengthStrategy.java \
-  ch/boye/httpclientandroidlib/impl/HttpConnectionMetricsImpl.java \
-  ch/boye/httpclientandroidlib/impl/io/AbstractMessageParser.java \
-  ch/boye/httpclientandroidlib/impl/io/AbstractMessageWriter.java \
-  ch/boye/httpclientandroidlib/impl/io/AbstractSessionInputBuffer.java \
-  ch/boye/httpclientandroidlib/impl/io/AbstractSessionOutputBuffer.java \
-  ch/boye/httpclientandroidlib/impl/io/ChunkedInputStream.java \
-  ch/boye/httpclientandroidlib/impl/io/ChunkedOutputStream.java \
-  ch/boye/httpclientandroidlib/impl/io/ContentLengthInputStream.java \
-  ch/boye/httpclientandroidlib/impl/io/ContentLengthOutputStream.java \
-  ch/boye/httpclientandroidlib/impl/io/HttpRequestParser.java \
-  ch/boye/httpclientandroidlib/impl/io/HttpRequestWriter.java \
-  ch/boye/httpclientandroidlib/impl/io/HttpResponseParser.java \
-  ch/boye/httpclientandroidlib/impl/io/HttpResponseWriter.java \
-  ch/boye/httpclientandroidlib/impl/io/HttpTransportMetricsImpl.java \
-  ch/boye/httpclientandroidlib/impl/io/IdentityInputStream.java \
-  ch/boye/httpclientandroidlib/impl/io/IdentityOutputStream.java \
-  ch/boye/httpclientandroidlib/impl/io/SocketInputBuffer.java \
-  ch/boye/httpclientandroidlib/impl/io/SocketOutputBuffer.java \
-  ch/boye/httpclientandroidlib/impl/NoConnectionReuseStrategy.java \
-  ch/boye/httpclientandroidlib/impl/SocketHttpClientConnection.java \
-  ch/boye/httpclientandroidlib/impl/SocketHttpServerConnection.java \
-  ch/boye/httpclientandroidlib/io/BufferInfo.java \
-  ch/boye/httpclientandroidlib/io/EofSensor.java \
-  ch/boye/httpclientandroidlib/io/HttpMessageParser.java \
-  ch/boye/httpclientandroidlib/io/HttpMessageWriter.java \
-  ch/boye/httpclientandroidlib/io/HttpTransportMetrics.java \
-  ch/boye/httpclientandroidlib/io/SessionInputBuffer.java \
-  ch/boye/httpclientandroidlib/io/SessionOutputBuffer.java \
-  ch/boye/httpclientandroidlib/MalformedChunkCodingException.java \
-  ch/boye/httpclientandroidlib/message/AbstractHttpMessage.java \
-  ch/boye/httpclientandroidlib/message/BasicHeader.java \
-  ch/boye/httpclientandroidlib/message/BasicHeaderElement.java \
-  ch/boye/httpclientandroidlib/message/BasicHeaderElementIterator.java \
-  ch/boye/httpclientandroidlib/message/BasicHeaderIterator.java \
-  ch/boye/httpclientandroidlib/message/BasicHeaderValueFormatter.java \
-  ch/boye/httpclientandroidlib/message/BasicHeaderValueParser.java \
-  ch/boye/httpclientandroidlib/message/BasicHttpEntityEnclosingRequest.java \
-  ch/boye/httpclientandroidlib/message/BasicHttpRequest.java \
-  ch/boye/httpclientandroidlib/message/BasicHttpResponse.java \
-  ch/boye/httpclientandroidlib/message/BasicLineFormatter.java \
-  ch/boye/httpclientandroidlib/message/BasicLineParser.java \
-  ch/boye/httpclientandroidlib/message/BasicListHeaderIterator.java \
-  ch/boye/httpclientandroidlib/message/BasicNameValuePair.java \
-  ch/boye/httpclientandroidlib/message/BasicRequestLine.java \
-  ch/boye/httpclientandroidlib/message/BasicStatusLine.java \
-  ch/boye/httpclientandroidlib/message/BasicTokenIterator.java \
-  ch/boye/httpclientandroidlib/message/BufferedHeader.java \
-  ch/boye/httpclientandroidlib/message/HeaderGroup.java \
-  ch/boye/httpclientandroidlib/message/HeaderValueFormatter.java \
-  ch/boye/httpclientandroidlib/message/HeaderValueParser.java \
-  ch/boye/httpclientandroidlib/message/LineFormatter.java \
-  ch/boye/httpclientandroidlib/message/LineParser.java \
-  ch/boye/httpclientandroidlib/message/ParserCursor.java \
-  ch/boye/httpclientandroidlib/MethodNotSupportedException.java \
-  ch/boye/httpclientandroidlib/NameValuePair.java \
-  ch/boye/httpclientandroidlib/NoHttpResponseException.java \
-  ch/boye/httpclientandroidlib/params/AbstractHttpParams.java \
-  ch/boye/httpclientandroidlib/params/BasicHttpParams.java \
-  ch/boye/httpclientandroidlib/params/CoreConnectionPNames.java \
-  ch/boye/httpclientandroidlib/params/CoreProtocolPNames.java \
-  ch/boye/httpclientandroidlib/params/DefaultedHttpParams.java \
-  ch/boye/httpclientandroidlib/params/HttpAbstractParamBean.java \
-  ch/boye/httpclientandroidlib/params/HttpConnectionParamBean.java \
-  ch/boye/httpclientandroidlib/params/HttpConnectionParams.java \
-  ch/boye/httpclientandroidlib/params/HttpParams.java \
-  ch/boye/httpclientandroidlib/params/HttpProtocolParamBean.java \
-  ch/boye/httpclientandroidlib/params/HttpProtocolParams.java \
-  ch/boye/httpclientandroidlib/params/SyncBasicHttpParams.java \
-  ch/boye/httpclientandroidlib/ParseException.java \
-  ch/boye/httpclientandroidlib/protocol/BasicHttpContext.java \
-  ch/boye/httpclientandroidlib/protocol/BasicHttpProcessor.java \
-  ch/boye/httpclientandroidlib/protocol/DefaultedHttpContext.java \
-  ch/boye/httpclientandroidlib/protocol/ExecutionContext.java \
-  ch/boye/httpclientandroidlib/protocol/HTTP.java \
-  ch/boye/httpclientandroidlib/protocol/HttpContext.java \
-  ch/boye/httpclientandroidlib/protocol/HttpDateGenerator.java \
-  ch/boye/httpclientandroidlib/protocol/HttpExpectationVerifier.java \
-  ch/boye/httpclientandroidlib/protocol/HttpProcessor.java \
-  ch/boye/httpclientandroidlib/protocol/HttpRequestExecutor.java \
-  ch/boye/httpclientandroidlib/protocol/HttpRequestHandler.java \
-  ch/boye/httpclientandroidlib/protocol/HttpRequestHandlerRegistry.java \
-  ch/boye/httpclientandroidlib/protocol/HttpRequestHandlerResolver.java \
-  ch/boye/httpclientandroidlib/protocol/HttpRequestInterceptorList.java \
-  ch/boye/httpclientandroidlib/protocol/HttpResponseInterceptorList.java \
-  ch/boye/httpclientandroidlib/protocol/HttpService.java \
-  ch/boye/httpclientandroidlib/protocol/ImmutableHttpProcessor.java \
-  ch/boye/httpclientandroidlib/protocol/RequestConnControl.java \
-  ch/boye/httpclientandroidlib/protocol/RequestContent.java \
-  ch/boye/httpclientandroidlib/protocol/RequestDate.java \
-  ch/boye/httpclientandroidlib/protocol/RequestExpectContinue.java \
-  ch/boye/httpclientandroidlib/protocol/RequestTargetHost.java \
-  ch/boye/httpclientandroidlib/protocol/RequestUserAgent.java \
-  ch/boye/httpclientandroidlib/protocol/ResponseConnControl.java \
-  ch/boye/httpclientandroidlib/protocol/ResponseContent.java \
-  ch/boye/httpclientandroidlib/protocol/ResponseDate.java \
-  ch/boye/httpclientandroidlib/protocol/ResponseServer.java \
-  ch/boye/httpclientandroidlib/protocol/SyncBasicHttpContext.java \
-  ch/boye/httpclientandroidlib/protocol/UriPatternMatcher.java \
-  ch/boye/httpclientandroidlib/ProtocolException.java \
-  ch/boye/httpclientandroidlib/ProtocolVersion.java \
-  ch/boye/httpclientandroidlib/ReasonPhraseCatalog.java \
-  ch/boye/httpclientandroidlib/RequestLine.java \
-  ch/boye/httpclientandroidlib/StatusLine.java \
-  ch/boye/httpclientandroidlib/TokenIterator.java \
-  ch/boye/httpclientandroidlib/TruncatedChunkException.java \
-  ch/boye/httpclientandroidlib/UnsupportedHttpVersionException.java \
-  ch/boye/httpclientandroidlib/util/ByteArrayBuffer.java \
-  ch/boye/httpclientandroidlib/util/CharArrayBuffer.java \
-  ch/boye/httpclientandroidlib/util/EncodingUtils.java \
-  ch/boye/httpclientandroidlib/util/EntityUtils.java \
-  ch/boye/httpclientandroidlib/util/ExceptionUtils.java \
-  ch/boye/httpclientandroidlib/util/LangUtils.java \
-  ch/boye/httpclientandroidlib/util/VersionInfo.java \
-  org/json/simple/ItemList.java \
-  org/json/simple/JSONArray.java \
-  org/json/simple/JSONAware.java \
-  org/json/simple/JSONObject.java \
-  org/json/simple/JSONStreamAware.java \
-  org/json/simple/JSONValue.java \
-  org/json/simple/parser/ContainerFactory.java \
-  org/json/simple/parser/ContentHandler.java \
-  org/json/simple/parser/JSONParser.java \
-  org/json/simple/parser/ParseException.java \
-  org/json/simple/parser/Yylex.java \
-  org/json/simple/parser/Yytoken.java \
-  org/mozilla/apache/commons/codec/binary/Base32.java \
-  org/mozilla/apache/commons/codec/binary/Base32InputStream.java \
-  org/mozilla/apache/commons/codec/binary/Base32OutputStream.java \
-  org/mozilla/apache/commons/codec/binary/Base64.java \
-  org/mozilla/apache/commons/codec/binary/Base64InputStream.java \
-  org/mozilla/apache/commons/codec/binary/Base64OutputStream.java \
-  org/mozilla/apache/commons/codec/binary/BaseNCodec.java \
-  org/mozilla/apache/commons/codec/binary/BaseNCodecInputStream.java \
-  org/mozilla/apache/commons/codec/binary/BaseNCodecOutputStream.java \
-  org/mozilla/apache/commons/codec/binary/BinaryCodec.java \
-  org/mozilla/apache/commons/codec/binary/Hex.java \
-  org/mozilla/apache/commons/codec/binary/StringUtils.java \
-  org/mozilla/apache/commons/codec/BinaryDecoder.java \
-  org/mozilla/apache/commons/codec/BinaryEncoder.java \
-  org/mozilla/apache/commons/codec/CharEncoding.java \
-  org/mozilla/apache/commons/codec/Decoder.java \
-  org/mozilla/apache/commons/codec/DecoderException.java \
-  org/mozilla/apache/commons/codec/digest/DigestUtils.java \
-  org/mozilla/apache/commons/codec/Encoder.java \
-  org/mozilla/apache/commons/codec/EncoderException.java \
-  org/mozilla/apache/commons/codec/language/AbstractCaverphone.java \
-  org/mozilla/apache/commons/codec/language/Caverphone.java \
-  org/mozilla/apache/commons/codec/language/Caverphone1.java \
-  org/mozilla/apache/commons/codec/language/Caverphone2.java \
-  org/mozilla/apache/commons/codec/language/ColognePhonetic.java \
-  org/mozilla/apache/commons/codec/language/DoubleMetaphone.java \
-  org/mozilla/apache/commons/codec/language/Metaphone.java \
-  org/mozilla/apache/commons/codec/language/RefinedSoundex.java \
-  org/mozilla/apache/commons/codec/language/Soundex.java \
-  org/mozilla/apache/commons/codec/language/SoundexUtils.java \
-  org/mozilla/apache/commons/codec/net/BCodec.java \
-  org/mozilla/apache/commons/codec/net/QCodec.java \
-  org/mozilla/apache/commons/codec/net/QuotedPrintableCodec.java \
-  org/mozilla/apache/commons/codec/net/RFC1522Codec.java \
-  org/mozilla/apache/commons/codec/net/URLCodec.java \
-  org/mozilla/apache/commons/codec/net/Utils.java \
-  org/mozilla/apache/commons/codec/StringDecoder.java \
-  org/mozilla/apache/commons/codec/StringEncoder.java \
-  org/mozilla/apache/commons/codec/StringEncoderComparator.java \
-  $(NULL)
-
--- a/mobile/android/base/android-services.mozbuild
+++ b/mobile/android/base/android-services.mozbuild
@@ -21,8 +21,774 @@ ANDROID_RESFILES += [
     'resources/layout/sync_setup_webview.xml',
     'resources/values-large-v11/sync_styles.xml',
     'resources/values-v11/sync_styles.xml',
     'resources/values/sync_styles.xml',
     'resources/xml/sync_authenticator.xml',
     'resources/xml/sync_options.xml',
     'resources/xml/sync_syncadapter.xml',
 ]
+
+sync_thirdparty_java_files = [
+    'ch/boye/httpclientandroidlib/androidextra/HttpClientAndroidLog.java',
+    'ch/boye/httpclientandroidlib/annotation/GuardedBy.java',
+    'ch/boye/httpclientandroidlib/annotation/Immutable.java',
+    'ch/boye/httpclientandroidlib/annotation/NotThreadSafe.java',
+    'ch/boye/httpclientandroidlib/annotation/ThreadSafe.java',
+    'ch/boye/httpclientandroidlib/auth/AUTH.java',
+    'ch/boye/httpclientandroidlib/auth/AuthenticationException.java',
+    'ch/boye/httpclientandroidlib/auth/AuthScheme.java',
+    'ch/boye/httpclientandroidlib/auth/AuthSchemeFactory.java',
+    'ch/boye/httpclientandroidlib/auth/AuthSchemeRegistry.java',
+    'ch/boye/httpclientandroidlib/auth/AuthScope.java',
+    'ch/boye/httpclientandroidlib/auth/AuthState.java',
+    'ch/boye/httpclientandroidlib/auth/BasicUserPrincipal.java',
+    'ch/boye/httpclientandroidlib/auth/ContextAwareAuthScheme.java',
+    'ch/boye/httpclientandroidlib/auth/Credentials.java',
+    'ch/boye/httpclientandroidlib/auth/InvalidCredentialsException.java',
+    'ch/boye/httpclientandroidlib/auth/MalformedChallengeException.java',
+    'ch/boye/httpclientandroidlib/auth/NTCredentials.java',
+    'ch/boye/httpclientandroidlib/auth/NTUserPrincipal.java',
+    'ch/boye/httpclientandroidlib/auth/params/AuthParamBean.java',
+    'ch/boye/httpclientandroidlib/auth/params/AuthParams.java',
+    'ch/boye/httpclientandroidlib/auth/params/AuthPNames.java',
+    'ch/boye/httpclientandroidlib/auth/UsernamePasswordCredentials.java',
+    'ch/boye/httpclientandroidlib/client/AuthCache.java',
+    'ch/boye/httpclientandroidlib/client/AuthenticationHandler.java',
+    'ch/boye/httpclientandroidlib/client/CircularRedirectException.java',
+    'ch/boye/httpclientandroidlib/client/ClientProtocolException.java',
+    'ch/boye/httpclientandroidlib/client/CookieStore.java',
+    'ch/boye/httpclientandroidlib/client/CredentialsProvider.java',
+    'ch/boye/httpclientandroidlib/client/entity/DecompressingEntity.java',
+    'ch/boye/httpclientandroidlib/client/entity/DeflateDecompressingEntity.java',
+    'ch/boye/httpclientandroidlib/client/entity/GzipDecompressingEntity.java',
+    'ch/boye/httpclientandroidlib/client/entity/UrlEncodedFormEntity.java',
+    'ch/boye/httpclientandroidlib/client/HttpClient.java',
+    'ch/boye/httpclientandroidlib/client/HttpRequestRetryHandler.java',
+    'ch/boye/httpclientandroidlib/client/HttpResponseException.java',
+    'ch/boye/httpclientandroidlib/client/methods/AbortableHttpRequest.java',
+    'ch/boye/httpclientandroidlib/client/methods/HttpDelete.java',
+    'ch/boye/httpclientandroidlib/client/methods/HttpEntityEnclosingRequestBase.java',
+    'ch/boye/httpclientandroidlib/client/methods/HttpGet.java',
+    'ch/boye/httpclientandroidlib/client/methods/HttpHead.java',
+    'ch/boye/httpclientandroidlib/client/methods/HttpOptions.java',
+    'ch/boye/httpclientandroidlib/client/methods/HttpPost.java',
+    'ch/boye/httpclientandroidlib/client/methods/HttpPut.java',
+    'ch/boye/httpclientandroidlib/client/methods/HttpRequestBase.java',
+    'ch/boye/httpclientandroidlib/client/methods/HttpTrace.java',
+    'ch/boye/httpclientandroidlib/client/methods/HttpUriRequest.java',
+    'ch/boye/httpclientandroidlib/client/NonRepeatableRequestException.java',
+    'ch/boye/httpclientandroidlib/client/params/AllClientPNames.java',
+    'ch/boye/httpclientandroidlib/client/params/AuthPolicy.java',
+    'ch/boye/httpclientandroidlib/client/params/ClientParamBean.java',
+    'ch/boye/httpclientandroidlib/client/params/ClientPNames.java',
+    'ch/boye/httpclientandroidlib/client/params/CookiePolicy.java',
+    'ch/boye/httpclientandroidlib/client/params/HttpClientParams.java',
+    'ch/boye/httpclientandroidlib/client/protocol/ClientContext.java',
+    'ch/boye/httpclientandroidlib/client/protocol/ClientContextConfigurer.java',
+    'ch/boye/httpclientandroidlib/client/protocol/RequestAcceptEncoding.java',
+    'ch/boye/httpclientandroidlib/client/protocol/RequestAddCookies.java',
+    'ch/boye/httpclientandroidlib/client/protocol/RequestAuthCache.java',
+    'ch/boye/httpclientandroidlib/client/protocol/RequestClientConnControl.java',
+    'ch/boye/httpclientandroidlib/client/protocol/RequestDefaultHeaders.java',
+    'ch/boye/httpclientandroidlib/client/protocol/RequestProxyAuthentication.java',
+    'ch/boye/httpclientandroidlib/client/protocol/RequestTargetAuthentication.java',
+    'ch/boye/httpclientandroidlib/client/protocol/ResponseAuthCache.java',
+    'ch/boye/httpclientandroidlib/client/protocol/ResponseContentEncoding.java',
+    'ch/boye/httpclientandroidlib/client/protocol/ResponseProcessCookies.java',
+    'ch/boye/httpclientandroidlib/client/RedirectException.java',
+    'ch/boye/httpclientandroidlib/client/RedirectHandler.java',
+    'ch/boye/httpclientandroidlib/client/RedirectStrategy.java',
+    'ch/boye/httpclientandroidlib/client/RequestDirector.java',
+    'ch/boye/httpclientandroidlib/client/ResponseHandler.java',
+    'ch/boye/httpclientandroidlib/client/UserTokenHandler.java',
+    'ch/boye/httpclientandroidlib/client/utils/CloneUtils.java',
+    'ch/boye/httpclientandroidlib/client/utils/Idn.java',
+    'ch/boye/httpclientandroidlib/client/utils/JdkIdn.java',
+    'ch/boye/httpclientandroidlib/client/utils/Punycode.java',
+    'ch/boye/httpclientandroidlib/client/utils/Rfc3492Idn.java',
+    'ch/boye/httpclientandroidlib/client/utils/URIUtils.java',
+    'ch/boye/httpclientandroidlib/client/utils/URLEncodedUtils.java',
+    'ch/boye/httpclientandroidlib/conn/BasicEofSensorWatcher.java',
+    'ch/boye/httpclientandroidlib/conn/BasicManagedEntity.java',
+    'ch/boye/httpclientandroidlib/conn/ClientConnectionManager.java',
+    'ch/boye/httpclientandroidlib/conn/ClientConnectionManagerFactory.java',
+    'ch/boye/httpclientandroidlib/conn/ClientConnectionOperator.java',
+    'ch/boye/httpclientandroidlib/conn/ClientConnectionRequest.java',
+    'ch/boye/httpclientandroidlib/conn/ConnectionKeepAliveStrategy.java',
+    'ch/boye/httpclientandroidlib/conn/ConnectionPoolTimeoutException.java',
+    'ch/boye/httpclientandroidlib/conn/ConnectionReleaseTrigger.java',
+    'ch/boye/httpclientandroidlib/conn/ConnectTimeoutException.java',
+    'ch/boye/httpclientandroidlib/conn/EofSensorInputStream.java',
+    'ch/boye/httpclientandroidlib/conn/EofSensorWatcher.java',
+    'ch/boye/httpclientandroidlib/conn/HttpHostConnectException.java',
+    'ch/boye/httpclientandroidlib/conn/HttpRoutedConnection.java',
+    'ch/boye/httpclientandroidlib/conn/ManagedClientConnection.java',
+    'ch/boye/httpclientandroidlib/conn/MultihomePlainSocketFactory.java',
+    'ch/boye/httpclientandroidlib/conn/OperatedClientConnection.java',
+    'ch/boye/httpclientandroidlib/conn/params/ConnConnectionParamBean.java',
+    'ch/boye/httpclientandroidlib/conn/params/ConnConnectionPNames.java',
+    'ch/boye/httpclientandroidlib/conn/params/ConnManagerParamBean.java',
+    'ch/boye/httpclientandroidlib/conn/params/ConnManagerParams.java',
+    'ch/boye/httpclientandroidlib/conn/params/ConnManagerPNames.java',
+    'ch/boye/httpclientandroidlib/conn/params/ConnPerRoute.java',
+    'ch/boye/httpclientandroidlib/conn/params/ConnPerRouteBean.java',
+    'ch/boye/httpclientandroidlib/conn/params/ConnRouteParamBean.java',
+    'ch/boye/httpclientandroidlib/conn/params/ConnRouteParams.java',
+    'ch/boye/httpclientandroidlib/conn/params/ConnRoutePNames.java',
+    'ch/boye/httpclientandroidlib/conn/routing/BasicRouteDirector.java',
+    'ch/boye/httpclientandroidlib/conn/routing/HttpRoute.java',
+    'ch/boye/httpclientandroidlib/conn/routing/HttpRouteDirector.java',
+    'ch/boye/httpclientandroidlib/conn/routing/HttpRoutePlanner.java',
+    'ch/boye/httpclientandroidlib/conn/routing/RouteInfo.java',
+    'ch/boye/httpclientandroidlib/conn/routing/RouteTracker.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/HostNameResolver.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/LayeredSchemeSocketFactory.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/LayeredSchemeSocketFactoryAdaptor.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/LayeredSocketFactory.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/LayeredSocketFactoryAdaptor.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/PlainSocketFactory.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/Scheme.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/SchemeRegistry.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/SchemeSocketFactory.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/SchemeSocketFactoryAdaptor.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/SocketFactory.java',
+    'ch/boye/httpclientandroidlib/conn/scheme/SocketFactoryAdaptor.java',
+    'ch/boye/httpclientandroidlib/conn/ssl/AbstractVerifier.java',
+    'ch/boye/httpclientandroidlib/conn/ssl/AllowAllHostnameVerifier.java',
+    'ch/boye/httpclientandroidlib/conn/ssl/BrowserCompatHostnameVerifier.java',
+    'ch/boye/httpclientandroidlib/conn/ssl/SSLSocketFactory.java',
+    'ch/boye/httpclientandroidlib/conn/ssl/StrictHostnameVerifier.java',
+    'ch/boye/httpclientandroidlib/conn/ssl/TrustManagerDecorator.java',
+    'ch/boye/httpclientandroidlib/conn/ssl/TrustSelfSignedStrategy.java',
+    'ch/boye/httpclientandroidlib/conn/ssl/TrustStrategy.java',
+    'ch/boye/httpclientandroidlib/conn/ssl/X509HostnameVerifier.java',
+    'ch/boye/httpclientandroidlib/conn/util/InetAddressUtils.java',
+    'ch/boye/httpclientandroidlib/ConnectionClosedException.java',
+    'ch/boye/httpclientandroidlib/ConnectionReuseStrategy.java',
+    'ch/boye/httpclientandroidlib/cookie/ClientCookie.java',
+    'ch/boye/httpclientandroidlib/cookie/Cookie.java',
+    'ch/boye/httpclientandroidlib/cookie/CookieAttributeHandler.java',
+    'ch/boye/httpclientandroidlib/cookie/CookieIdentityComparator.java',
+    'ch/boye/httpclientandroidlib/cookie/CookieOrigin.java',
+    'ch/boye/httpclientandroidlib/cookie/CookiePathComparator.java',
+    'ch/boye/httpclientandroidlib/cookie/CookieRestrictionViolationException.java',
+    'ch/boye/httpclientandroidlib/cookie/CookieSpec.java',
+    'ch/boye/httpclientandroidlib/cookie/CookieSpecFactory.java',
+    'ch/boye/httpclientandroidlib/cookie/CookieSpecRegistry.java',
+    'ch/boye/httpclientandroidlib/cookie/MalformedCookieException.java',
+    'ch/boye/httpclientandroidlib/cookie/params/CookieSpecParamBean.java',
+    'ch/boye/httpclientandroidlib/cookie/params/CookieSpecPNames.java',
+    'ch/boye/httpclientandroidlib/cookie/SetCookie.java',
+    'ch/boye/httpclientandroidlib/cookie/SetCookie2.java',
+    'ch/boye/httpclientandroidlib/cookie/SM.java',
+    'ch/boye/httpclientandroidlib/entity/AbstractHttpEntity.java',
+    'ch/boye/httpclientandroidlib/entity/BasicHttpEntity.java',
+    'ch/boye/httpclientandroidlib/entity/BufferedHttpEntity.java',
+    'ch/boye/httpclientandroidlib/entity/ByteArrayEntity.java',
+    'ch/boye/httpclientandroidlib/entity/ContentLengthStrategy.java',
+    'ch/boye/httpclientandroidlib/entity/ContentProducer.java',
+    'ch/boye/httpclientandroidlib/entity/EntityTemplate.java',
+    'ch/boye/httpclientandroidlib/entity/FileEntity.java',
+    'ch/boye/httpclientandroidlib/entity/HttpEntityWrapper.java',
+    'ch/boye/httpclientandroidlib/entity/InputStreamEntity.java',
+    'ch/boye/httpclientandroidlib/entity/SerializableEntity.java',
+    'ch/boye/httpclientandroidlib/entity/StringEntity.java',
+    'ch/boye/httpclientandroidlib/FormattedHeader.java',
+    'ch/boye/httpclientandroidlib/Header.java',
+    'ch/boye/httpclientandroidlib/HeaderElement.java',
+    'ch/boye/httpclientandroidlib/HeaderElementIterator.java',
+    'ch/boye/httpclientandroidlib/HeaderIterator.java',
+    'ch/boye/httpclientandroidlib/HttpClientConnection.java',
+    'ch/boye/httpclientandroidlib/HttpConnection.java',
+    'ch/boye/httpclientandroidlib/HttpConnectionMetrics.java',
+    'ch/boye/httpclientandroidlib/HttpEntity.java',
+    'ch/boye/httpclientandroidlib/HttpEntityEnclosingRequest.java',
+    'ch/boye/httpclientandroidlib/HttpException.java',
+    'ch/boye/httpclientandroidlib/HttpHeaders.java',
+    'ch/boye/httpclientandroidlib/HttpHost.java',
+    'ch/boye/httpclientandroidlib/HttpInetConnection.java',
+    'ch/boye/httpclientandroidlib/HttpMessage.java',
+    'ch/boye/httpclientandroidlib/HttpRequest.java',
+    'ch/boye/httpclientandroidlib/HttpRequestFactory.java',
+    'ch/boye/httpclientandroidlib/HttpRequestInterceptor.java',
+    'ch/boye/httpclientandroidlib/HttpResponse.java',
+    'ch/boye/httpclientandroidlib/HttpResponseFactory.java',
+    'ch/boye/httpclientandroidlib/HttpResponseInterceptor.java',
+    'ch/boye/httpclientandroidlib/HttpServerConnection.java',
+    'ch/boye/httpclientandroidlib/HttpStatus.java',
+    'ch/boye/httpclientandroidlib/HttpVersion.java',
+    'ch/boye/httpclientandroidlib/impl/AbstractHttpClientConnection.java',
+    'ch/boye/httpclientandroidlib/impl/AbstractHttpServerConnection.java',
+    'ch/boye/httpclientandroidlib/impl/auth/AuthSchemeBase.java',
+    'ch/boye/httpclientandroidlib/impl/auth/BasicScheme.java',
+    'ch/boye/httpclientandroidlib/impl/auth/BasicSchemeFactory.java',
+    'ch/boye/httpclientandroidlib/impl/auth/DigestScheme.java',
+    'ch/boye/httpclientandroidlib/impl/auth/DigestSchemeFactory.java',
+    'ch/boye/httpclientandroidlib/impl/auth/NTLMEngine.java',
+    'ch/boye/httpclientandroidlib/impl/auth/NTLMEngineException.java',
+    'ch/boye/httpclientandroidlib/impl/auth/NTLMEngineImpl.java',
+    'ch/boye/httpclientandroidlib/impl/auth/NTLMScheme.java',
+    'ch/boye/httpclientandroidlib/impl/auth/NTLMSchemeFactory.java',
+    'ch/boye/httpclientandroidlib/impl/auth/RFC2617Scheme.java',
+    'ch/boye/httpclientandroidlib/impl/auth/SpnegoTokenGenerator.java',
+    'ch/boye/httpclientandroidlib/impl/auth/UnsupportedDigestAlgorithmException.java',
+    'ch/boye/httpclientandroidlib/impl/client/AbstractAuthenticationHandler.java',
+    'ch/boye/httpclientandroidlib/impl/client/AbstractHttpClient.java',
+    'ch/boye/httpclientandroidlib/impl/client/BasicAuthCache.java',
+    'ch/boye/httpclientandroidlib/impl/client/BasicCookieStore.java',
+    'ch/boye/httpclientandroidlib/impl/client/BasicCredentialsProvider.java',
+    'ch/boye/httpclientandroidlib/impl/client/BasicResponseHandler.java',
+    'ch/boye/httpclientandroidlib/impl/client/ClientParamsStack.java',
+    'ch/boye/httpclientandroidlib/impl/client/ContentEncodingHttpClient.java',
+    'ch/boye/httpclientandroidlib/impl/client/DefaultConnectionKeepAliveStrategy.java',
+    'ch/boye/httpclientandroidlib/impl/client/DefaultHttpClient.java',
+    'ch/boye/httpclientandroidlib/impl/client/DefaultHttpRequestRetryHandler.java',
+    'ch/boye/httpclientandroidlib/impl/client/DefaultProxyAuthenticationHandler.java',
+    'ch/boye/httpclientandroidlib/impl/client/DefaultRedirectHandler.java',
+    'ch/boye/httpclientandroidlib/impl/client/DefaultRedirectStrategy.java',
+    'ch/boye/httpclientandroidlib/impl/client/DefaultRedirectStrategyAdaptor.java',
+    'ch/boye/httpclientandroidlib/impl/client/DefaultRequestDirector.java',
+    'ch/boye/httpclientandroidlib/impl/client/DefaultTargetAuthenticationHandler.java',
+    'ch/boye/httpclientandroidlib/impl/client/DefaultUserTokenHandler.java',
+    'ch/boye/httpclientandroidlib/impl/client/EntityEnclosingRequestWrapper.java',
+    'ch/boye/httpclientandroidlib/impl/client/RedirectLocations.java',
+    'ch/boye/httpclientandroidlib/impl/client/RequestWrapper.java',
+    'ch/boye/httpclientandroidlib/impl/client/RoutedRequest.java',
+    'ch/boye/httpclientandroidlib/impl/client/TunnelRefusedException.java',
+    'ch/boye/httpclientandroidlib/impl/conn/AbstractClientConnAdapter.java',
+    'ch/boye/httpclientandroidlib/impl/conn/AbstractPooledConnAdapter.java',
+    'ch/boye/httpclientandroidlib/impl/conn/AbstractPoolEntry.java',
+    'ch/boye/httpclientandroidlib/impl/conn/ConnectionShutdownException.java',
+    'ch/boye/httpclientandroidlib/impl/conn/DefaultClientConnection.java',
+    'ch/boye/httpclientandroidlib/impl/conn/DefaultClientConnectionOperator.java',
+    'ch/boye/httpclientandroidlib/impl/conn/DefaultHttpRoutePlanner.java',
+    'ch/boye/httpclientandroidlib/impl/conn/DefaultResponseParser.java',
+    'ch/boye/httpclientandroidlib/impl/conn/HttpInetSocketAddress.java',
+    'ch/boye/httpclientandroidlib/impl/conn/IdleConnectionHandler.java',
+    'ch/boye/httpclientandroidlib/impl/conn/LoggingSessionInputBuffer.java',
+    'ch/boye/httpclientandroidlib/impl/conn/LoggingSessionOutputBuffer.java',
+    'ch/boye/httpclientandroidlib/impl/conn/ProxySelectorRoutePlanner.java',
+    'ch/boye/httpclientandroidlib/impl/conn/SchemeRegistryFactory.java',
+    'ch/boye/httpclientandroidlib/impl/conn/SingleClientConnManager.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/AbstractConnPool.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/BasicPooledConnAdapter.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/BasicPoolEntry.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/BasicPoolEntryRef.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/ConnPoolByRoute.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/PoolEntryRequest.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/RefQueueHandler.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/RefQueueWorker.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/RouteSpecificPool.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/ThreadSafeClientConnManager.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/WaitingThread.java',
+    'ch/boye/httpclientandroidlib/impl/conn/tsccm/WaitingThreadAborter.java',
+    'ch/boye/httpclientandroidlib/impl/conn/Wire.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/AbstractCookieAttributeHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/AbstractCookieSpec.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BasicClientCookie.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BasicClientCookie2.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BasicCommentHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BasicDomainHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BasicExpiresHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BasicMaxAgeHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BasicPathHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BasicSecureHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BestMatchSpec.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BestMatchSpecFactory.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BrowserCompatSpec.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/BrowserCompatSpecFactory.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/CookieSpecBase.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/DateParseException.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/DateUtils.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/IgnoreSpec.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/IgnoreSpecFactory.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/NetscapeDomainHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/NetscapeDraftHeaderParser.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/NetscapeDraftSpec.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/NetscapeDraftSpecFactory.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/PublicSuffixFilter.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/PublicSuffixListParser.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2109DomainHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2109Spec.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2109SpecFactory.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2109VersionHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2965CommentUrlAttributeHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2965DiscardAttributeHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2965DomainAttributeHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2965PortAttributeHandler.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2965Spec.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2965SpecFactory.java',
+    'ch/boye/httpclientandroidlib/impl/cookie/RFC2965VersionAttributeHandler.java',
+    'ch/boye/httpclientandroidlib/impl/DefaultConnectionReuseStrategy.java',
+    'ch/boye/httpclientandroidlib/impl/DefaultHttpClientConnection.java',
+    'ch/boye/httpclientandroidlib/impl/DefaultHttpRequestFactory.java',
+    'ch/boye/httpclientandroidlib/impl/DefaultHttpResponseFactory.java',
+    'ch/boye/httpclientandroidlib/impl/DefaultHttpServerConnection.java',
+    'ch/boye/httpclientandroidlib/impl/EnglishReasonPhraseCatalog.java',
+    'ch/boye/httpclientandroidlib/impl/entity/EntityDeserializer.java',
+    'ch/boye/httpclientandroidlib/impl/entity/EntitySerializer.java',
+    'ch/boye/httpclientandroidlib/impl/entity/LaxContentLengthStrategy.java',
+    'ch/boye/httpclientandroidlib/impl/entity/StrictContentLengthStrategy.java',
+    'ch/boye/httpclientandroidlib/impl/HttpConnectionMetricsImpl.java',
+    'ch/boye/httpclientandroidlib/impl/io/AbstractMessageParser.java',
+    'ch/boye/httpclientandroidlib/impl/io/AbstractMessageWriter.java',
+    'ch/boye/httpclientandroidlib/impl/io/AbstractSessionInputBuffer.java',
+    'ch/boye/httpclientandroidlib/impl/io/AbstractSessionOutputBuffer.java',
+    'ch/boye/httpclientandroidlib/impl/io/ChunkedInputStream.java',
+    'ch/boye/httpclientandroidlib/impl/io/ChunkedOutputStream.java',
+    'ch/boye/httpclientandroidlib/impl/io/ContentLengthInputStream.java',
+    'ch/boye/httpclientandroidlib/impl/io/ContentLengthOutputStream.java',
+    'ch/boye/httpclientandroidlib/impl/io/HttpRequestParser.java',
+    'ch/boye/httpclientandroidlib/impl/io/HttpRequestWriter.java',
+    'ch/boye/httpclientandroidlib/impl/io/HttpResponseParser.java',
+    'ch/boye/httpclientandroidlib/impl/io/HttpResponseWriter.java',
+    'ch/boye/httpclientandroidlib/impl/io/HttpTransportMetricsImpl.java',
+    'ch/boye/httpclientandroidlib/impl/io/IdentityInputStream.java',
+    'ch/boye/httpclientandroidlib/impl/io/IdentityOutputStream.java',
+    'ch/boye/httpclientandroidlib/impl/io/SocketInputBuffer.java',
+    'ch/boye/httpclientandroidlib/impl/io/SocketOutputBuffer.java',
+    'ch/boye/httpclientandroidlib/impl/NoConnectionReuseStrategy.java',
+    'ch/boye/httpclientandroidlib/impl/SocketHttpClientConnection.java',
+    'ch/boye/httpclientandroidlib/impl/SocketHttpServerConnection.java',
+    'ch/boye/httpclientandroidlib/io/BufferInfo.java',
+    'ch/boye/httpclientandroidlib/io/EofSensor.java',
+    'ch/boye/httpclientandroidlib/io/HttpMessageParser.java',
+    'ch/boye/httpclientandroidlib/io/HttpMessageWriter.java',
+    'ch/boye/httpclientandroidlib/io/HttpTransportMetrics.java',
+    'ch/boye/httpclientandroidlib/io/SessionInputBuffer.java',
+    'ch/boye/httpclientandroidlib/io/SessionOutputBuffer.java',
+    'ch/boye/httpclientandroidlib/MalformedChunkCodingException.java',
+    'ch/boye/httpclientandroidlib/message/AbstractHttpMessage.java',
+    'ch/boye/httpclientandroidlib/message/BasicHeader.java',
+    'ch/boye/httpclientandroidlib/message/BasicHeaderElement.java',
+    'ch/boye/httpclientandroidlib/message/BasicHeaderElementIterator.java',
+    'ch/boye/httpclientandroidlib/message/BasicHeaderIterator.java',
+    'ch/boye/httpclientandroidlib/message/BasicHeaderValueFormatter.java',
+    'ch/boye/httpclientandroidlib/message/BasicHeaderValueParser.java',
+    'ch/boye/httpclientandroidlib/message/BasicHttpEntityEnclosingRequest.java',
+    'ch/boye/httpclientandroidlib/message/BasicHttpRequest.java',
+    'ch/boye/httpclientandroidlib/message/BasicHttpResponse.java',
+    'ch/boye/httpclientandroidlib/message/BasicLineFormatter.java',
+    'ch/boye/httpclientandroidlib/message/BasicLineParser.java',
+    'ch/boye/httpclientandroidlib/message/BasicListHeaderIterator.java',
+    'ch/boye/httpclientandroidlib/message/BasicNameValuePair.java',
+    'ch/boye/httpclientandroidlib/message/BasicRequestLine.java',
+    'ch/boye/httpclientandroidlib/message/BasicStatusLine.java',
+    'ch/boye/httpclientandroidlib/message/BasicTokenIterator.java',
+    'ch/boye/httpclientandroidlib/message/BufferedHeader.java',
+    'ch/boye/httpclientandroidlib/message/HeaderGroup.java',
+    'ch/boye/httpclientandroidlib/message/HeaderValueFormatter.java',
+    'ch/boye/httpclientandroidlib/message/HeaderValueParser.java',
+    'ch/boye/httpclientandroidlib/message/LineFormatter.java',
+    'ch/boye/httpclientandroidlib/message/LineParser.java',
+    'ch/boye/httpclientandroidlib/message/ParserCursor.java',
+    'ch/boye/httpclientandroidlib/MethodNotSupportedException.java',
+    'ch/boye/httpclientandroidlib/NameValuePair.java',
+    'ch/boye/httpclientandroidlib/NoHttpResponseException.java',
+    'ch/boye/httpclientandroidlib/params/AbstractHttpParams.java',
+    'ch/boye/httpclientandroidlib/params/BasicHttpParams.java',
+    'ch/boye/httpclientandroidlib/params/CoreConnectionPNames.java',
+    'ch/boye/httpclientandroidlib/params/CoreProtocolPNames.java',
+    'ch/boye/httpclientandroidlib/params/DefaultedHttpParams.java',
+    'ch/boye/httpclientandroidlib/params/HttpAbstractParamBean.java',
+    'ch/boye/httpclientandroidlib/params/HttpConnectionParamBean.java',
+    'ch/boye/httpclientandroidlib/params/HttpConnectionParams.java',
+    'ch/boye/httpclientandroidlib/params/HttpParams.java',
+    'ch/boye/httpclientandroidlib/params/HttpProtocolParamBean.java',
+    'ch/boye/httpclientandroidlib/params/HttpProtocolParams.java',
+    'ch/boye/httpclientandroidlib/params/SyncBasicHttpParams.java',
+    'ch/boye/httpclientandroidlib/ParseException.java',
+    'ch/boye/httpclientandroidlib/protocol/BasicHttpContext.java',
+    'ch/boye/httpclientandroidlib/protocol/BasicHttpProcessor.java',
+    'ch/boye/httpclientandroidlib/protocol/DefaultedHttpContext.java',
+    'ch/boye/httpclientandroidlib/protocol/ExecutionContext.java',
+    'ch/boye/httpclientandroidlib/protocol/HTTP.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpContext.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpDateGenerator.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpExpectationVerifier.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpProcessor.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpRequestExecutor.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpRequestHandler.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpRequestHandlerRegistry.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpRequestHandlerResolver.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpRequestInterceptorList.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpResponseInterceptorList.java',
+    'ch/boye/httpclientandroidlib/protocol/HttpService.java',
+    'ch/boye/httpclientandroidlib/protocol/ImmutableHttpProcessor.java',
+    'ch/boye/httpclientandroidlib/protocol/RequestConnControl.java',
+    'ch/boye/httpclientandroidlib/protocol/RequestContent.java',
+    'ch/boye/httpclientandroidlib/protocol/RequestDate.java',
+    'ch/boye/httpclientandroidlib/protocol/RequestExpectContinue.java',
+    'ch/boye/httpclientandroidlib/protocol/RequestTargetHost.java',
+    'ch/boye/httpclientandroidlib/protocol/RequestUserAgent.java',
+    'ch/boye/httpclientandroidlib/protocol/ResponseConnControl.java',
+    'ch/boye/httpclientandroidlib/protocol/ResponseContent.java',
+    'ch/boye/httpclientandroidlib/protocol/ResponseDate.java',
+    'ch/boye/httpclientandroidlib/protocol/ResponseServer.java',
+    'ch/boye/httpclientandroidlib/protocol/SyncBasicHttpContext.java',
+    'ch/boye/httpclientandroidlib/protocol/UriPatternMatcher.java',
+    'ch/boye/httpclientandroidlib/ProtocolException.java',
+    'ch/boye/httpclientandroidlib/ProtocolVersion.java',
+    'ch/boye/httpclientandroidlib/ReasonPhraseCatalog.java',
+    'ch/boye/httpclientandroidlib/RequestLine.java',
+    'ch/boye/httpclientandroidlib/StatusLine.java',
+    'ch/boye/httpclientandroidlib/TokenIterator.java',
+    'ch/boye/httpclientandroidlib/TruncatedChunkException.java',
+    'ch/boye/httpclientandroidlib/UnsupportedHttpVersionException.java',
+    'ch/boye/httpclientandroidlib/util/ByteArrayBuffer.java',
+    'ch/boye/httpclientandroidlib/util/CharArrayBuffer.java',
+    'ch/boye/httpclientandroidlib/util/EncodingUtils.java',
+    'ch/boye/httpclientandroidlib/util/EntityUtils.java',
+    'ch/boye/httpclientandroidlib/util/ExceptionUtils.java',
+    'ch/boye/httpclientandroidlib/util/LangUtils.java',
+    'ch/boye/httpclientandroidlib/util/VersionInfo.java',
+    'org/json/simple/ItemList.java',
+    'org/json/simple/JSONArray.java',
+    'org/json/simple/JSONAware.java',
+    'org/json/simple/JSONObject.java',
+    'org/json/simple/JSONStreamAware.java',
+    'org/json/simple/JSONValue.java',
+    'org/json/simple/parser/ContainerFactory.java',
+    'org/json/simple/parser/ContentHandler.java',
+    'org/json/simple/parser/JSONParser.java',
+    'org/json/simple/parser/ParseException.java',
+    'org/json/simple/parser/Yylex.java',
+    'org/json/simple/parser/Yytoken.java',
+    'org/mozilla/apache/commons/codec/binary/Base32.java',
+    'org/mozilla/apache/commons/codec/binary/Base32InputStream.java',
+    'org/mozilla/apache/commons/codec/binary/Base32OutputStream.java',
+    'org/mozilla/apache/commons/codec/binary/Base64.java',
+    'org/mozilla/apache/commons/codec/binary/Base64InputStream.java',
+    'org/mozilla/apache/commons/codec/binary/Base64OutputStream.java',
+    'org/mozilla/apache/commons/codec/binary/BaseNCodec.java',
+    'org/mozilla/apache/commons/codec/binary/BaseNCodecInputStream.java',
+    'org/mozilla/apache/commons/codec/binary/BaseNCodecOutputStream.java',
+    'org/mozilla/apache/commons/codec/binary/BinaryCodec.java',
+    'org/mozilla/apache/commons/codec/binary/Hex.java',
+    'org/mozilla/apache/commons/codec/binary/StringUtils.java',
+    'org/mozilla/apache/commons/codec/BinaryDecoder.java',
+    'org/mozilla/apache/commons/codec/BinaryEncoder.java',
+    'org/mozilla/apache/commons/codec/CharEncoding.java',
+    'org/mozilla/apache/commons/codec/Decoder.java',
+    'org/mozilla/apache/commons/codec/DecoderException.java',
+    'org/mozilla/apache/commons/codec/digest/DigestUtils.java',
+    'org/mozilla/apache/commons/codec/Encoder.java',
+    'org/mozilla/apache/commons/codec/EncoderException.java',
+    'org/mozilla/apache/commons/codec/language/AbstractCaverphone.java',
+    'org/mozilla/apache/commons/codec/language/Caverphone.java',
+    'org/mozilla/apache/commons/codec/language/Caverphone1.java',
+    'org/mozilla/apache/commons/codec/language/Caverphone2.java',
+    'org/mozilla/apache/commons/codec/language/ColognePhonetic.java',
+    'org/mozilla/apache/commons/codec/language/DoubleMetaphone.java',
+    'org/mozilla/apache/commons/codec/language/Metaphone.java',
+    'org/mozilla/apache/commons/codec/language/RefinedSoundex.java',
+    'org/mozilla/apache/commons/codec/language/Soundex.java',
+    'org/mozilla/apache/commons/codec/language/SoundexUtils.java',
+    'org/mozilla/apache/commons/codec/net/BCodec.java',
+    'org/mozilla/apache/commons/codec/net/QCodec.java',
+    'org/mozilla/apache/commons/codec/net/QuotedPrintableCodec.java',
+    'org/mozilla/apache/commons/codec/net/RFC1522Codec.java',
+    'org/mozilla/apache/commons/codec/net/URLCodec.java',
+    'org/mozilla/apache/commons/codec/net/Utils.java',
+    'org/mozilla/apache/commons/codec/StringDecoder.java',
+    'org/mozilla/apache/commons/codec/StringEncoder.java',
+    'org/mozilla/apache/commons/codec/StringEncoderComparator.java',
+]
+
+sync_java_files = [
+    'background/announcements/Announcement.java',
+    'background/announcements/AnnouncementPresenter.java',
+    'background/announcements/AnnouncementsBroadcastReceiver.java',
+    'background/announcements/AnnouncementsBroadcastService.java',
+    'background/announcements/AnnouncementsFetchDelegate.java',
+    'background/announcements/AnnouncementsFetcher.java',
+    'background/announcements/AnnouncementsFetchResourceDelegate.java',
+    'background/announcements/AnnouncementsService.java',
+    'background/BackgroundService.java',
+    'background/bagheera/BagheeraClient.java',
+    'background/bagheera/BagheeraRequestDelegate.java',
+    'background/bagheera/BoundedByteArrayEntity.java',
+    'background/bagheera/DeflateHelper.java',
+    'background/common/DateUtils.java',
+    'background/common/log/Logger.java',
+    'background/common/log/writers/AndroidLevelCachingLogWriter.java',
+    'background/common/log/writers/AndroidLogWriter.java',
+    'background/common/log/writers/LevelFilteringLogWriter.java',
+    'background/common/log/writers/LogWriter.java',
+    'background/common/log/writers/PrintLogWriter.java',
+    'background/common/log/writers/SimpleTagLogWriter.java',
+    'background/common/log/writers/StringLogWriter.java',
+    'background/common/log/writers/TagLogWriter.java',
+    'background/common/log/writers/ThreadLocalTagLogWriter.java',
+    'background/datareporting/TelemetryRecorder.java',
+    'background/db/CursorDumper.java',
+    'background/db/Tab.java',
+    'background/healthreport/Environment.java',
+    'background/healthreport/EnvironmentBuilder.java',
+    'background/healthreport/EnvironmentV1.java',
+    'background/healthreport/HealthReportBroadcastReceiver.java',
+    'background/healthreport/HealthReportBroadcastService.java',
+    'background/healthreport/HealthReportDatabases.java',
+    'background/healthreport/HealthReportDatabaseStorage.java',
+    'background/healthreport/HealthReportGenerator.java',
+    'background/healthreport/HealthReportProvider.java',
+    'background/healthreport/HealthReportStorage.java',
+    'background/healthreport/HealthReportUtils.java',
+    'background/healthreport/ProfileInformationCache.java',
+    'background/healthreport/prune/HealthReportPruneService.java',
+    'background/healthreport/prune/PrunePolicy.java',
+    'background/healthreport/prune/PrunePolicyDatabaseStorage.java',
+    'background/healthreport/prune/PrunePolicyStorage.java',
+    'background/healthreport/upload/AndroidSubmissionClient.java',
+    'background/healthreport/upload/HealthReportUploadService.java',
+    'background/healthreport/upload/ObsoleteDocumentTracker.java',
+    'background/healthreport/upload/SubmissionClient.java',
+    'background/healthreport/upload/SubmissionPolicy.java',
+    'sync/AlreadySyncingException.java',
+    'sync/CollectionKeys.java',
+    'sync/CommandProcessor.java',
+    'sync/CommandRunner.java',
+    'sync/config/AccountPickler.java',
+    'sync/config/activities/SelectEnginesActivity.java',
+    'sync/config/ClientRecordTerminator.java',
+    'sync/config/ConfigurationMigrator.java',
+    'sync/CredentialException.java',
+    'sync/CredentialsSource.java',
+    'sync/crypto/CryptoException.java',
+    'sync/crypto/CryptoInfo.java',
+    'sync/crypto/HKDF.java',
+    'sync/crypto/HMACVerificationException.java',
+    'sync/crypto/KeyBundle.java',
+    'sync/crypto/MissingCryptoInputException.java',
+    'sync/crypto/NoKeyBundleException.java',
+    'sync/crypto/PersistedCrypto5Keys.java',
+    'sync/CryptoRecord.java',
+    'sync/DelayedWorkTracker.java',
+    'sync/delegates/ClientsDataDelegate.java',
+    'sync/delegates/FreshStartDelegate.java',
+    'sync/delegates/GlobalSessionCallback.java',
+    'sync/delegates/JSONRecordFetchDelegate.java',
+    'sync/delegates/KeyUploadDelegate.java',
+    'sync/delegates/MetaGlobalDelegate.java',
+    'sync/delegates/WipeServerDelegate.java',
+    'sync/EngineSettings.java',
+    'sync/ExtendedJSONObject.java',
+    'sync/GlobalSession.java',
+    'sync/HTTPFailureException.java',
+    'sync/InfoCollections.java',
+    'sync/InfoCounts.java',
+    'sync/jpake/BigIntegerHelper.java',
+    'sync/jpake/Gx3OrGx4IsZeroOrOneException.java',
+    'sync/jpake/IncorrectZkpException.java',
+    'sync/jpake/JPakeClient.java',
+    'sync/jpake/JPakeCrypto.java',
+    'sync/jpake/JPakeJson.java',
+    'sync/jpake/JPakeNoActivePairingException.java',
+    'sync/jpake/JPakeNumGenerator.java',
+    'sync/jpake/JPakeNumGeneratorRandom.java',
+    'sync/jpake/JPakeParty.java',
+    'sync/jpake/stage/CompleteStage.java',
+    'sync/jpake/stage/ComputeFinalStage.java',
+    'sync/jpake/stage/ComputeKeyVerificationStage.java',
+    'sync/jpake/stage/ComputeStepOneStage.java',
+    'sync/jpake/stage/ComputeStepTwoStage.java',
+    'sync/jpake/stage/DecryptDataStage.java',
+    'sync/jpake/stage/DeleteChannel.java',
+    'sync/jpake/stage/GetChannelStage.java',
+    'sync/jpake/stage/GetRequestStage.java',
+    'sync/jpake/stage/JPakeStage.java',
+    'sync/jpake/stage/PutRequestStage.java',
+    'sync/jpake/stage/VerifyPairingStage.java',
+    'sync/jpake/Zkp.java',
+    'sync/JSONRecordFetcher.java',
+    'sync/KeyBundleProvider.java',
+    'sync/MetaGlobal.java',
+    'sync/MetaGlobalException.java',
+    'sync/MetaGlobalMissingEnginesException.java',
+    'sync/MetaGlobalNotSetException.java',
+    'sync/middleware/Crypto5MiddlewareRepository.java',
+    'sync/middleware/Crypto5MiddlewareRepositorySession.java',
+    'sync/middleware/MiddlewareRepository.java',
+    'sync/middleware/MiddlewareRepositorySession.java',
+    'sync/net/AuthHeaderProvider.java',
+    'sync/net/BaseResource.java',
+    'sync/net/BaseResourceDelegate.java',
+    'sync/net/BasicAuthHeaderProvider.java',
+    'sync/net/BrowserIDAuthHeaderProvider.java',
+    'sync/net/ConnectionMonitorThread.java',
+    'sync/net/HandleProgressException.java',
+    'sync/net/HawkAuthHeaderProvider.java',
+    'sync/net/HMACAuthHeaderProvider.java',
+    'sync/net/HttpResponseObserver.java',
+    'sync/net/Resource.java',
+    'sync/net/ResourceDelegate.java',
+    'sync/net/SyncResponse.java',
+    'sync/net/SyncStorageCollectionRequest.java',
+    'sync/net/SyncStorageCollectionRequestDelegate.java',
+    'sync/net/SyncStorageRecordRequest.java',
+    'sync/net/SyncStorageRequest.java',
+    'sync/net/SyncStorageRequestDelegate.java',
+    'sync/net/SyncStorageRequestIncrementalDelegate.java',
+    'sync/net/SyncStorageResponse.java',
+    'sync/net/TLSSocketFactory.java',
+    'sync/net/WBOCollectionRequestDelegate.java',
+    'sync/net/WBORequestDelegate.java',
+    'sync/NoCollectionKeysSetException.java',
+    'sync/NodeAuthenticationException.java',
+    'sync/NonArrayJSONException.java',
+    'sync/NonObjectJSONException.java',
+    'sync/NullClusterURLException.java',
+    'sync/PersistedMetaGlobal.java',
+    'sync/PrefsSource.java',
+    'sync/receivers/SyncAccountDeletedReceiver.java',
+    'sync/receivers/SyncAccountDeletedService.java',
+    'sync/receivers/UpgradeReceiver.java',
+    'sync/repositories/android/AndroidBrowserBookmarksDataAccessor.java',
+    'sync/repositories/android/AndroidBrowserBookmarksRepository.java',
+    'sync/repositories/android/AndroidBrowserBookmarksRepositorySession.java',
+    'sync/repositories/android/AndroidBrowserHistoryDataAccessor.java',
+    'sync/repositories/android/AndroidBrowserHistoryDataExtender.java',
+    'sync/repositories/android/AndroidBrowserHistoryRepository.java',
+    'sync/repositories/android/AndroidBrowserHistoryRepositorySession.java',
+    'sync/repositories/android/AndroidBrowserRepository.java',
+    'sync/repositories/android/AndroidBrowserRepositoryDataAccessor.java',
+    'sync/repositories/android/AndroidBrowserRepositorySession.java',
+    'sync/repositories/android/BookmarksDeletionManager.java',
+    'sync/repositories/android/BookmarksInsertionManager.java',
+    'sync/repositories/android/BrowserContractHelpers.java',
+    'sync/repositories/android/CachedSQLiteOpenHelper.java',
+    'sync/repositories/android/ClientsDatabase.java',
+    'sync/repositories/android/ClientsDatabaseAccessor.java',
+    'sync/repositories/android/FennecTabsRepository.java',
+    'sync/repositories/android/FormHistoryRepositorySession.java',
+    'sync/repositories/android/PasswordsRepositorySession.java',
+    'sync/repositories/android/RepoUtils.java',
+    'sync/repositories/BookmarkNeedsReparentingException.java',
+    'sync/repositories/BookmarksRepository.java',
+    'sync/repositories/ConstrainedServer11Repository.java',
+    'sync/repositories/delegates/DeferrableRepositorySessionCreationDelegate.java',
+    'sync/repositories/delegates/DeferredRepositorySessionBeginDelegate.java',
+    'sync/repositories/delegates/DeferredRepositorySessionFetchRecordsDelegate.java',
+    'sync/repositories/delegates/DeferredRepositorySessionFinishDelegate.java',
+    'sync/repositories/delegates/DeferredRepositorySessionStoreDelegate.java',
+    'sync/repositories/delegates/RepositorySessionBeginDelegate.java',
+    'sync/repositories/delegates/RepositorySessionCleanDelegate.java',
+    'sync/repositories/delegates/RepositorySessionCreationDelegate.java',
+    'sync/repositories/delegates/RepositorySessionFetchRecordsDelegate.java',
+    'sync/repositories/delegates/RepositorySessionFinishDelegate.java',
+    'sync/repositories/delegates/RepositorySessionGuidsSinceDelegate.java',
+    'sync/repositories/delegates/RepositorySessionStoreDelegate.java',
+    'sync/repositories/delegates/RepositorySessionWipeDelegate.java',
+    'sync/repositories/domain/BookmarkRecord.java',
+    'sync/repositories/domain/BookmarkRecordFactory.java',
+    'sync/repositories/domain/ClientRecord.java',
+    'sync/repositories/domain/ClientRecordFactory.java',
+    'sync/repositories/domain/FormHistoryRecord.java',
+    'sync/repositories/domain/HistoryRecord.java',
+    'sync/repositories/domain/HistoryRecordFactory.java',
+    'sync/repositories/domain/PasswordRecord.java',
+    'sync/repositories/domain/Record.java',
+    'sync/repositories/domain/RecordParseException.java',
+    'sync/repositories/domain/TabsRecord.java',
+    'sync/repositories/domain/VersionConstants.java',
+    'sync/repositories/FetchFailedException.java',
+    'sync/repositories/HashSetStoreTracker.java',
+    'sync/repositories/HistoryRepository.java',
+    'sync/repositories/IdentityRecordFactory.java',
+    'sync/repositories/InactiveSessionException.java',
+    'sync/repositories/InvalidBookmarkTypeException.java',
+    'sync/repositories/InvalidRequestException.java',
+    'sync/repositories/InvalidSessionTransitionException.java',
+    'sync/repositories/MultipleRecordsForGuidException.java',
+    'sync/repositories/NoContentProviderException.java',
+    'sync/repositories/NoGuidForIdException.java',
+    'sync/repositories/NoStoreDelegateException.java',
+    'sync/repositories/NullCursorException.java',
+    'sync/repositories/ParentNotFoundException.java',
+    'sync/repositories/ProfileDatabaseException.java',
+    'sync/repositories/RecordFactory.java',
+    'sync/repositories/RecordFilter.java',
+    'sync/repositories/Repository.java',
+    'sync/repositories/RepositorySession.java',
+    'sync/repositories/RepositorySessionBundle.java',
+    'sync/repositories/Server11Repository.java',
+    'sync/repositories/Server11RepositorySession.java',
+    'sync/repositories/StoreFailedException.java',
+    'sync/repositories/StoreTracker.java',
+    'sync/repositories/StoreTrackingRepositorySession.java',
+    'sync/Server11PreviousPostFailedException.java',
+    'sync/Server11RecordPostFailedException.java',
+    'sync/setup/activities/AccountActivity.java',
+    'sync/setup/activities/ActivityUtils.java',
+    'sync/setup/activities/ClientRecordArrayAdapter.java',
+    'sync/setup/activities/RedirectToSetupActivity.java',
+    'sync/setup/activities/SendTabActivity.java',
+    'sync/setup/activities/SendTabData.java',
+    'sync/setup/activities/SetupFailureActivity.java',
+    'sync/setup/activities/SetupSuccessActivity.java',
+    'sync/setup/activities/SetupSyncActivity.java',
+    'sync/setup/activities/SyncActivity.java',
+    'sync/setup/activities/WebURLFinder.java',
+    'sync/setup/activities/WebViewActivity.java',
+    'sync/setup/auth/AccountAuthenticator.java',
+    'sync/setup/auth/AuthenticateAccountStage.java',
+    'sync/setup/auth/AuthenticationResult.java',
+    'sync/setup/auth/AuthenticatorStage.java',
+    'sync/setup/auth/EnsureUserExistenceStage.java',
+    'sync/setup/auth/FetchUserNodeStage.java',
+    'sync/setup/Constants.java',
+    'sync/setup/InvalidSyncKeyException.java',
+    'sync/setup/SyncAccounts.java',
+    'sync/setup/SyncAuthenticatorService.java',
+    'sync/stage/AbstractNonRepositorySyncStage.java',
+    'sync/stage/AbstractSessionManagingSyncStage.java',
+    'sync/stage/AndroidBrowserBookmarksServerSyncStage.java',
+    'sync/stage/AndroidBrowserHistoryServerSyncStage.java',
+    'sync/stage/CheckPreconditionsStage.java',
+    'sync/stage/CompletedStage.java',
+    'sync/stage/EnsureClusterURLStage.java',
+    'sync/stage/EnsureCrypto5KeysStage.java',
+    'sync/stage/FennecTabsServerSyncStage.java',
+    'sync/stage/FetchInfoCollectionsStage.java',
+    'sync/stage/FetchMetaGlobalStage.java',
+    'sync/stage/FormHistoryServerSyncStage.java',
+    'sync/stage/GlobalSyncStage.java',
+    'sync/stage/NoSuchStageException.java',
+    'sync/stage/NoSyncIDException.java',
+    'sync/stage/PasswordsServerSyncStage.java',
+    'sync/stage/SafeConstrainedServer11Repository.java',
+    'sync/stage/ServerSyncStage.java',
+    'sync/stage/SyncClientsEngineStage.java',
+    'sync/stage/UploadMetaGlobalStage.java',
+    'sync/syncadapter/SyncAdapter.java',
+    'sync/syncadapter/SyncService.java',
+    'sync/SyncConfiguration.java',
+    'sync/SyncConfigurationException.java',
+    'sync/SyncException.java',
+    'sync/synchronizer/ConcurrentRecordConsumer.java',
+    'sync/synchronizer/RecordConsumer.java',
+    'sync/synchronizer/RecordsChannel.java',
+    'sync/synchronizer/RecordsChannelDelegate.java',
+    'sync/synchronizer/RecordsConsumerDelegate.java',
+    'sync/synchronizer/SerialRecordConsumer.java',
+    'sync/synchronizer/ServerLocalSynchronizer.java',
+    'sync/synchronizer/ServerLocalSynchronizerSession.java',
+    'sync/synchronizer/SessionNotBegunException.java',
+    'sync/synchronizer/Synchronizer.java',
+    'sync/synchronizer/SynchronizerDelegate.java',
+    'sync/synchronizer/SynchronizerSession.java',
+    'sync/synchronizer/SynchronizerSessionDelegate.java',
+    'sync/synchronizer/UnbundleError.java',
+    'sync/synchronizer/UnexpectedSessionException.java',
+    'sync/SynchronizerConfiguration.java',
+    'sync/ThreadPool.java',
+    'sync/UnexpectedJSONException.java',
+    'sync/UnknownSynchronizerConfigurationVersionException.java',
+    'sync/Utils.java',
+]
+
+sync_generated_java_files = [
+    'background/common/GlobalConstants.java',
+    'sync/SyncConstants.java',
+    'background/announcements/AnnouncementsConstants.java',
+    'background/healthreport/HealthReportConstants.java',
+]
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -3,16 +3,351 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['locales']
 
 include('android-services.mozbuild')
 
+thirdparty_source_dir = TOPSRCDIR + '/mobile/android/thirdparty/'
+
+mgjar = add_java_jar('gecko-mozglue')
+mgjar.sources += [
+    'mozglue/ByteBufferInputStream.java',
+    'mozglue/DirectBufferAllocator.java',
+    'mozglue/GeneratableAndroidBridgeTarget.java',
+    'mozglue/NativeReference.java',
+    'mozglue/NativeZip.java',
+    'mozglue/OptionalGeneratedParameter.java',
+]
+mgjar.generated_sources += [
+    'mozglue/GeckoLoader.java',
+]
+mgjar.javac_flags = '-Xlint:all'
+
+wsjar = add_java_jar('websockets')
+wsjar.sources += [ thirdparty_source_dir + f for f in [
+    'com/codebutler/android_websockets/HybiParser.java',
+    'com/codebutler/android_websockets/WebSocketClient.java',
+] ]
+wsjar.javac_flags = '-Xlint:all,-serial'
+
+gujar = add_java_jar('gecko-util')
+gujar.sources += [
+    'util/ActivityResultHandler.java',
+    'util/ActivityResultHandlerMap.java',
+    'util/Clipboard.java',
+    'util/EventDispatcher.java',
+    'util/FloatUtils.java',
+    'util/GamepadUtils.java',
+    'util/GeckoBackgroundThread.java',
+    'util/GeckoEventListener.java',
+    'util/GeckoEventResponder.java',
+    'util/GeckoJarReader.java',
+    'util/HardwareUtils.java',
+    'util/INIParser.java',
+    'util/INISection.java',
+    'util/JSONUtils.java',
+    'util/StringUtils.java',
+    'util/ThreadUtils.java',
+    'util/UiAsyncTask.java',
+]
+gujar.extra_jars=[
+    'gecko-mozglue.jar'
+]
+gujar.javac_flags = '-Xlint:all,-deprecation'
+
+stjar = add_java_jar('sync-thirdparty')
+stjar.sources += [ thirdparty_source_dir + f for f in sync_thirdparty_java_files ]
+stjar.javac_flags = '-Xlint:none'
+
+if CONFIG['MOZ_WEBRTC']:
+    video_root = TOPSRCDIR + '/media/webrtc/trunk/webrtc/modules/video_capture/android/java/org/webrtc/videoengine/'
+    audio_root = TOPSRCDIR + '/media/webrtc/trunk/webrtc/modules/audio_device/android/org/webrtc/voiceengine/'
+    wrjar = add_java_jar('webrtc')
+    wrjar.sources += [
+        video_root + 'CaptureCapabilityAndroid.java',
+        video_root + 'VideoCaptureAndroid.java',
+        video_root + 'VideoCaptureDeviceInfoAndroid.java',
+        audio_root + 'WebRTCAudioDevice.java',
+    ]
+    wrjar.extra_jars = [
+        'gecko-browser.jar',
+        'gecko-util.jar',
+        'gecko-mozglue.jar',
+    ]
+    wrjar.javac_flags = '-Xlint:all,-deprecation,-cast'
+
+gbjar = add_java_jar('gecko-browser')
+gbjar.sources += [
+    'ANRReporter.java',
+    'ActivityHandlerHelper.java',
+    'AlertNotification.java',
+    'AlignRightLinkPreference.java',
+    'AllCapsTextView.java',
+    'AndroidImport.java',
+    'AndroidImportPreference.java',
+    'AnimatedHeightLayout.java',
+    'AppNotificationClient.java',
+    'AutocompleteHandler.java',
+    'animation/AnimatorProxy.java',
+    'animation/HeightChangeAnimation.java',
+    'animation/PropertyAnimator.java',
+    'animation/Rotate3DAnimation.java',
+    'animation/ViewHelper.java',
+    'BackButton.java',
+    'BaseGeckoInterface.java',
+    'BrowserApp.java',
+    'BrowserToolbar.java',
+    'BrowserToolbarBackground.java',
+    'CameraImageResultHandler.java',
+    'CameraVideoResultHandler.java',
+    'CanvasDelegate.java',
+    'CheckableLinearLayout.java',
+    'ClickableWhenDisabledEditText.java',
+    'ContactService.java',
+    'ContextGetter.java',
+    'CustomEditText.java',
+    'db/BrowserDB.java',
+    'db/LocalBrowserDB.java',
+    'db/DBUtils.java',
+    'DataReportingNotification.java',
+    'Distribution.java',
+    'DoorHanger.java',
+    'DoorHangerPopup.java',
+    'EditBookmarkDialog.java',
+    'favicons/cache/FaviconCache.java',
+    'favicons/cache/FaviconCacheElement.java',
+    'favicons/cache/FaviconsForURL.java',
+    'favicons/Favicons.java',
+    'favicons/LoadFaviconTask.java',
+    'favicons/OnFaviconLoadedListener.java',
+    'FilePickerResultHandler.java',
+    'FilePickerResultHandlerSync.java',
+    'FindInPageBar.java',
+    'FlowLayout.java',
+    'FontSizePreference.java',
+    'FormAssistPopup.java',
+    'ForwardButton.java',
+    'GeckoAccessibility.java',
+    'GeckoApplication.java',
+    'GeckoApp.java',
+    'GeckoAppShell.java',
+    'GeckoActivity.java',
+    'GeckoBatteryManager.java',
+    'GeckoConnectivityReceiver.java',
+    'GeckoEditable.java',
+    'GeckoEvent.java',
+    'GeckoHalDefines.java',
+    'GeckoInputConnection.java',
+    'GeckoMessageReceiver.java',
+    'GeckoPreferences.java',
+    'GeckoPreferenceFragment.java',
+    'GeckoProfile.java',
+    'GeckoSmsManager.java',
+    'GeckoThread.java',
+    'GeckoJavaSampler.java',
+    'GlobalHistory.java',
+    'GeckoView.java',
+    'health/BrowserHealthRecorder.java',
+    'health/BrowserHealthReporter.java',
+    'InputMethods.java',
+    'JavaAddonManager.java',
+    'LightweightTheme.java',
+    'LightweightThemeDrawable.java',
+    'LinkPreference.java',
+    'MemoryMonitor.java',
+    'MotionEventInterceptor.java',
+    'MultiChoicePreference.java',
+    'NotificationClient.java',
+    'NotificationHandler.java',
+    'NotificationHelper.java',
+    'NotificationService.java',
+    'NSSBridge.java',
+    'OrderedBroadcastHelper.java',
+    'PageActionLayout.java',
+    'PrefsHelper.java',
+    'PrivateDataPreference.java',
+    'PrivateTab.java',
+    'prompts/Prompt.java',
+    'prompts/PromptInput.java',
+    'prompts/PromptService.java',
+    'prompts/IconGridInput.java',
+    'Restarter.java',
+    'sqlite/ByteBufferInputStream.java',
+    'sqlite/MatrixBlobCursor.java',
+    'sqlite/SQLiteBridge.java',
+    'sqlite/SQLiteBridgeException.java',
+    'ReaderModeUtils.java',
+    'RemoteTabs.java',
+    'RobocopAPI.java',
+    'ServiceNotificationClient.java',
+    'ScrollAnimator.java',
+    'SessionParser.java',
+    'ShapedButton.java',
+    'SharedPreferencesHelper.java',
+    'SiteIdentityPopup.java',
+    'SmsManager.java',
+    'SurfaceBits.java',
+    'SyncPreference.java',
+    'Tab.java',
+    'TabCounter.java',
+    'Tabs.java',
+    'TabsPanel.java',
+    'TabsTray.java',
+    'TabsAccessor.java',
+    'Telemetry.java',
+    'TextSelection.java',
+    'TextSelectionHandle.java',
+    'ThumbnailHelper.java',
+    'TouchEventInterceptor.java',
+    'VideoPlayer.java',
+    'WebAppAllocator.java',
+    'WebAppImpl.java',
+    'ZoomConstraints.java',
+    'db/BrowserContract.java',
+    'db/BrowserProvider.java',
+    'db/FormHistoryProvider.java',
+    'db/PerProfileContentProvider.java',
+    'db/PasswordsProvider.java',
+    'db/TabsProvider.java',
+    'gfx/Axis.java',
+    'gfx/BitmapUtils.java',
+    'gfx/BufferedCairoImage.java',
+    'gfx/CairoGLInfo.java',
+    'gfx/CairoImage.java',
+    'gfx/CairoUtils.java',
+    'gfx/DisplayPortCalculator.java',
+    'gfx/DisplayPortMetrics.java',
+    'gfx/DrawTimingQueue.java',
+    'gfx/FloatSize.java',
+    'gfx/GeckoLayerClient.java',
+    'gfx/GfxInfoThread.java',
+    'gfx/GLController.java',
+    'gfx/ImmutableViewportMetrics.java',
+    'gfx/InputConnectionHandler.java',
+    'gfx/IntSize.java',
+    'gfx/JavaPanZoomController.java',
+    'gfx/Layer.java',
+    'gfx/LayerMarginsAnimator.java',
+    'gfx/LayerRenderer.java',
+    'gfx/LayerView.java',
+    'gfx/NativePanZoomController.java',
+    'gfx/NinePatchTileLayer.java',
+    'gfx/Overscroll.java',
+    'gfx/PanningPerfAPI.java',
+    'gfx/PanZoomController.java',
+    'gfx/PanZoomTarget.java',
+    'gfx/PluginLayer.java',
+    'gfx/PointUtils.java',
+    'gfx/ProgressiveUpdateData.java',
+    'gfx/RectUtils.java',
+    'gfx/RenderTask.java',
+    'gfx/ScrollbarLayer.java',
+    'gfx/SimpleScaleGestureDetector.java',
+    'gfx/SingleTileLayer.java',
+    'gfx/SubdocumentScrollHelper.java',
+    'gfx/TextLayer.java',
+    'gfx/TextureGenerator.java',
+    'gfx/TextureReaper.java',
+    'gfx/TileLayer.java',
+    'gfx/TouchEventHandler.java',
+    'gfx/ViewTransform.java',
+    'gfx/VirtualLayer.java',
+    'home/BookmarksListAdapter.java',
+    'home/BookmarksListView.java',
+    'home/BookmarksPage.java',
+    'home/BookmarkFolderView.java',
+    'home/BrowserSearch.java',
+    'home/HistoryPage.java',
+    'home/HomeFragment.java',
+    'home/HomeListView.java',
+    'home/HomePager.java',
+    'home/HomePagerTabStrip.java',
+    'home/HomeBanner.java',
+    'home/FadedTextView.java',
+    'home/LastTabsPage.java',
+    'home/MostRecentPage.java',
+    'home/MultiTypeCursorAdapter.java',
+    'home/PinSiteDialog.java',
+    'home/ReadingListPage.java',
+    'home/SearchEngine.java',
+    'home/SearchEngineRow.java',
+    'home/SearchLoader.java',
+    'home/SimpleCursorLoader.java',
+    'home/SuggestClient.java',
+    'home/TabMenuStrip.java',
+    'home/TopSitesGridItemView.java',
+    'home/TopSitesGridView.java',
+    'home/TopSitesPage.java',
+    'home/TopSitesThumbnailView.java',
+    'home/TwoLinePageRow.java',
+    'menu/GeckoMenu.java',
+    'menu/GeckoMenuInflater.java',
+    'menu/GeckoMenuItem.java',
+    'menu/GeckoSubMenu.java',
+    'menu/MenuItemActionBar.java',
+    'menu/MenuItemActionView.java',
+    'menu/MenuItemDefault.java',
+    'menu/MenuPanel.java',
+    'menu/MenuPopup.java',
+    'preferences/SearchPreferenceCategory.java',
+    'preferences/SearchEnginePreference.java',
+    'updater/UpdateServiceHelper.java',
+    'updater/UpdateService.java',
+    'widget/ActivityChooserModel.java',
+    'widget/ButtonToast.java',
+    'widget/ArrowPopup.java',
+    'widget/DateTimePicker.java',
+    'widget/Divider.java',
+    'widget/FaviconView.java',
+    'widget/GeckoPopupMenu.java',
+    'widget/GeckoActionProvider.java',
+    'widget/IconTabWidget.java',
+    'widget/TabRow.java',
+    'widget/ThumbnailView.java',
+    'widget/TwoWayView.java',
+    'GeckoNetworkManager.java',
+    'GeckoScreenOrientationListener.java',
+    'GeckoUpdateReceiver.java',
+    'ReferrerReceiver.java',
+]
+gbjar.sources += [ thirdparty_source_dir + f for f in [
+    'com/googlecode/eyesfree/braille/selfbraille/ISelfBrailleService.java',
+    'com/googlecode/eyesfree/braille/selfbraille/SelfBrailleClient.java',
+    'com/googlecode/eyesfree/braille/selfbraille/WriteData.java',
+] ]
+gbjar.generated_sources += [
+    'App.java',
+    'AppConstants.java',
+    'R.java',
+    'SysInfo.java',
+    'WebApp.java',
+    'WebApps.java',
+    'widget/GeckoEditText.java',
+    'widget/GeckoImageButton.java',
+    'widget/GeckoImageView.java',
+    'widget/GeckoLinearLayout.java',
+    'widget/GeckoRelativeLayout.java',
+    'widget/GeckoTextSwitcher.java',
+    'widget/GeckoTextView.java',
+]
+if CONFIG['MOZ_CRASHREPORTER']:
+    gbjar.sources += [ 'CrashReporter.java ']
+gbjar.sources += sync_java_files
+gbjar.generated_sources += sync_generated_java_files
+gbjar.extra_jars=[
+    'gecko-mozglue.jar',
+    'gecko-util.jar',
+    'sync-thirdparty.jar',
+    'websockets.jar',
+]
+gbjar.javac_flags = '-Xlint:all,-deprecation,-fallthrough'
+
 ANDROID_GENERATED_RESFILES += [
     'res/drawable-hdpi/icon.png',
     'res/drawable-mdpi/icon.png',
     'res/drawable-xhdpi/icon.png',
     'res/drawable-xxhdpi/icon.png',
     'res/values/strings.xml',
 ]
 
--- a/mobile/android/geckoview_library/Makefile.in
+++ b/mobile/android/geckoview_library/Makefile.in
@@ -20,17 +20,17 @@ package:
 	# Zip the assets
 	cd $(DIST)/fennec; \
 	$(ZIP) -r ../geckoview_library/geckoview_assets.zip assets
 
 	# Make empty directories to fit an Android project structure
 	$(MKDIR) -p bin gen libs/$(ABI_DIR) src
 
 	# Copy the JARs
-	cp ../base/jars/*.jar libs/
+	cp ../base/*.jar libs/
 
 	# Copy the SOs
 	cp $(DIST)/bin/libmozglue.so $(DIST)/bin/lib/libplugin-container.so libs/$(ABI_DIR)/
 
 	# Copy the resources
 	cp -R ../base/res .
 
 	# Zip the directory
--- a/mobile/android/tests/background/junit3/Makefile.in
+++ b/mobile/android/tests/background/junit3/Makefile.in
@@ -20,17 +20,17 @@ GARBAGE += AndroidManifest.xml
 include $(srcdir)/android-services-files.mk
 
 # BACKGROUND_TESTS_{JAVA,RES}_FILES are defined in android-services-files.mk.
 JAVAFILES := $(BACKGROUND_TESTS_JAVA_FILES)
 
 # The test APK needs to know the contents of the target APK while not
 # being linked against them.  This is a best effort to avoid getting
 # out of sync with base's build config.
-JARS_DIR := $(DEPTH)/mobile/android/base/jars
+JARS_DIR := $(DEPTH)/mobile/android/base
 JAVA_BOOTCLASSPATH := $(JAVA_BOOTCLASSPATH):$(subst $(NULL) ,:,$(wildcard $(JARS_DIR)/*.jar))
 # We also want to re-compile classes.dex when the associated base
 # content changes.
 classes.dex: $(wildcard $(JARS_DIR)/*.jar)
 
 tools:: $(ANDROID_APK_NAME).apk
 
 include $(topsrcdir)/config/rules.mk
--- a/modules/libbz2/src/Makefile.in
+++ b/modules/libbz2/src/Makefile.in
@@ -1,15 +1,14 @@
 # vim:set ts=8 sw=8 sts=8 noet:
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB= 1
 ifeq ($(OS_ARCH),WINNT)
 USE_STATIC_LIBS = 1
 endif
 
 # This is defined by the bzip2-1.0.3 Makefile.  It appears to be used to
 # configure GLIBC to support large files.  This isn't something we care about
 # at this stage, since we're only interested in the streaming API, but we
 # define it here anyways for consistency.
--- a/modules/libbz2/src/moz.build
+++ b/modules/libbz2/src/moz.build
@@ -31,8 +31,9 @@ SOURCES += [
     'bzlib.c',
     'compress.c',
     'crctable.c',
     'decompress.c',
     'huffman.c',
     'randtable.c',
 ]
 
+FORCE_STATIC_LIB = True
--- a/modules/libmar/sign/Makefile.in
+++ b/modules/libmar/sign/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 ifeq ($(OS_ARCH),WINNT)
 USE_STATIC_LIBS = 1
 endif
 
 # This makefile just builds support for reading archives.
 LOCAL_INCLUDES += -I$(srcdir)/../src \
   -I$(srcdir)/../verify \
   -I$(topsrcdir)/dist/include \
--- a/modules/libmar/sign/moz.build
+++ b/modules/libmar/sign/moz.build
@@ -8,8 +8,9 @@ MODULE = 'signmar'
 
 LIBRARY_NAME = 'signmar'
 
 SOURCES += [
     'mar_sign.c',
     'nss_secutil.c',
 ]
 
+FORCE_STATIC_LIB = True
--- a/modules/libmar/src/Makefile.in
+++ b/modules/libmar/src/Makefile.in
@@ -1,15 +1,14 @@
 # vim:set ts=8 sw=8 sts=8 noet:
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 ifeq ($(OS_ARCH),WINNT)
 USE_STATIC_LIBS = 1
 endif
 
 # This makefile just builds support for reading archives.
 
 include $(topsrcdir)/config/rules.mk
 
--- a/modules/libmar/src/moz.build
+++ b/modules/libmar/src/moz.build
@@ -21,8 +21,9 @@ HOST_LIBRARY_NAME = 'hostmar'
 LIBRARY_NAME = 'mar'
 
 SOURCES += [
     'mar_create.c',
     'mar_extract.c',
     'mar_read.c',
 ]
 
+FORCE_STATIC_LIB = True
--- a/modules/libmar/verify/Makefile.in
+++ b/modules/libmar/verify/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 ifeq ($(OS_ARCH),WINNT)
 USE_STATIC_LIBS = 1
 endif
 
 # This makefile just builds support for reading archives.
 LOCAL_INCLUDES += -I$(srcdir)/../src
 
 ifneq ($(OS_ARCH),WINNT)
--- a/modules/libmar/verify/moz.build
+++ b/modules/libmar/verify/moz.build
@@ -8,8 +8,9 @@ MODULE = 'verifymar'
 
 LIBRARY_NAME = 'verifymar'
 
 SOURCES += [
     'cryptox.c',
     'mar_verify.c',
 ]
 
+FORCE_STATIC_LIB = True
--- a/mozglue/android/Makefile.in
+++ b/mozglue/android/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 STL_FLAGS=
 DEFINES += \
   -DANDROID_PACKAGE_NAME='"$(ANDROID_PACKAGE_NAME)"' \
   $(NULL)
 
 ifdef MOZ_FOLD_LIBS
 DEFINES += -DMOZ_FOLD_LIBS
 endif
--- a/mozglue/android/moz.build
+++ b/mozglue/android/moz.build
@@ -16,8 +16,9 @@ SOURCES += [
     'NSSBridge.cpp',
     'SQLiteBridge.cpp',
 ]
 
 LIBRARY_NAME = 'android'
 
 FAIL_ON_WARNINGS = True
 
+FORCE_STATIC_LIB = True
--- a/mozglue/build/Makefile.in
+++ b/mozglue/build/Makefile.in
@@ -4,18 +4,16 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIST_INSTALL = 1
 
 # Build mozglue as a shared lib on Windows, OSX and Android.
 # If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
 ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET)))
 FORCE_SHARED_LIB = 1
-else
-FORCE_STATIC_LIB = 1
 endif
 
 # Keep jemalloc separated when mozglue is statically linked
 ifeq (1_1,$(MOZ_MEMORY)_$(or $(MOZ_NATIVE_JEMALLOC),$(FORCE_SHARED_LIB)))
 SHARED_LIBRARY_LIBS = $(call EXPAND_LIBNAME_PATH,memory,$(DEPTH)/memory/build)
 else
 # Temporary, until bug 662814 lands
 VISIBILITY_FLAGS =
--- a/mozglue/build/moz.build
+++ b/mozglue/build/moz.build
@@ -7,20 +7,19 @@
 MODULE = 'mozglue'
 
 # Build mozglue as a shared lib on Windows, OSX and Android.
 # If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
 if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'):
     # TODO: These should be the all-caps variables when FORCE_SHARED_LIB and
     # FORCE_STATIC_LIB are ported over
     force_shared_lib = 1
-    force_static_lib = 0
 else:
     force_shared_lib = 0
-    force_static_lib = 1
+    FORCE_STATIC_LIB = True
 
 if CONFIG['MOZ_MEMORY'] and (CONFIG['MOZ_NATIVE_JEMALLOC'] or force_shared_lib):
     pass
     # TODO: SHARED_LIBRARY_LIBS go here
 else:
     SOURCES += [
         'dummy.cpp',
     ]
--- a/mozglue/linker/Makefile.in
+++ b/mozglue/linker/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB= 1
 STL_FLAGS =
 
 HOST_PROGRAM = szip
 
 HOST_LIBS = -lz
 
 DEFINES += -DIMPL_MFBT
 
--- a/mozglue/linker/moz.build
+++ b/mozglue/linker/moz.build
@@ -15,8 +15,10 @@ SOURCES += [
 ]
 
 LIBRARY_NAME = 'linker'
 
 HOST_SOURCES += [
     'SeekableZStream.cpp',
     'szip.cpp',
 ]
+
+FORCE_STATIC_LIB = True
--- a/netwerk/base/src/nsIncrementalDownload.cpp
+++ b/netwerk/base/src/nsIncrementalDownload.cpp
@@ -758,18 +758,21 @@ nsIncrementalDownload::OnDataAvailable(n
     if (NS_FAILED(rv))
       return rv;
     if (n != len)
       return NS_ERROR_UNEXPECTED;
 
     count -= n;
     mChunkLen += n;
 
-    if (mChunkLen == mChunkSize)
-      FlushChunk();
+    if (mChunkLen == mChunkSize) {
+      rv = FlushChunk();
+      if (NS_FAILED(rv))
+        return rv;
+    }
   }
 
   if (PR_Now() > mLastProgressUpdate + UPDATE_PROGRESS_INTERVAL)
     UpdateProgress();
 
   return NS_OK;
 }
 
--- a/netwerk/dns/effective_tld_names.dat
+++ b/netwerk/dns/effective_tld_names.dat
@@ -6846,16 +6846,20 @@ cloudcontrolapp.com
 
 // co.ca : http://registry.co.ca/
 co.ca
 
 // CoDNS B.V.
 co.nl
 co.no
 
+// Cupcake : https://cupcake.io/
+// Requested by Jonathan Rudenberg <jonathan@cupcake.io> 2013-10-08
+cupcake.is
+
 // DreamHost : http://www.dreamhost.com/
 // Requested by Andrew Farmer <andrew.farmer@dreamhost.com> 2012-10-02
 dreamhosters.com
 
 // DynDNS.com : http://www.dyndns.com/services/dns/dyndns/
 dyndns-at-home.com
 dyndns-at-work.com
 dyndns-blog.com
deleted file mode 100644
--- a/other-licenses/android/Makefile.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-FORCE_STATIC_LIB = 1
--- a/other-licenses/android/moz.build
+++ b/other-licenses/android/moz.build
@@ -22,8 +22,9 @@ SOURCES += [
     'res_data.c',
     'res_debug.c',
     'res_init.c',
     'res_mkquery.c',
     'res_send.c',
     'res_state.c',
 ]
 
+FORCE_STATIC_LIB = True
--- a/parser/expat/lib/Makefile.in
+++ b/parser/expat/lib/Makefile.in
@@ -1,12 +1,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-# We want only the static lib, not the shared lib
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 xmltok.$(OBJ_SUFFIX): moz_extensions.c
 
 DEFINES += -DHAVE_EXPAT_CONFIG_H
--- a/parser/expat/lib/moz.build
+++ b/parser/expat/lib/moz.build
@@ -16,8 +16,10 @@ LIBRARY_NAME = 'mozexpat_s'
 SOURCES += [
     'xmlparse.c',
     'xmlrole.c',
     'xmltok.c',
 ]
 
 MSVC_ENABLE_PGO = True
 
+# We want only the static lib, not the shared lib
+FORCE_STATIC_LIB = True
--- a/profile/dirserviceprovider/src/Makefile.in
+++ b/profile/dirserviceprovider/src/Makefile.in
@@ -1,9 +1,6 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 
 MOZILLA_INTERNAL_API = 1
-
-# we don't want the shared lib
-FORCE_STATIC_LIB = 1
--- a/profile/dirserviceprovider/src/moz.build
+++ b/profile/dirserviceprovider/src/moz.build
@@ -6,8 +6,11 @@
 
 MODULE = 'profdirserviceprovider'
 
 include('objs.mozbuild')
 
 SOURCES += modules_profiledirservice_src_csrcs
 
 LIBRARY_NAME = 'profdirserviceprovider_s'
+
+# we don't want the shared lib
+FORCE_STATIC_LIB = True
--- a/profile/dirserviceprovider/standalone/Makefile.in
+++ b/profile/dirserviceprovider/standalone/Makefile.in
@@ -1,13 +1,10 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 LOCAL_INCLUDES = -I$(srcdir)/../src
 
 DEFINES += -DXPCOM_GLUE
 STL_FLAGS =
--- a/profile/dirserviceprovider/standalone/moz.build
+++ b/profile/dirserviceprovider/standalone/moz.build
@@ -6,8 +6,10 @@
 
 MODULE = 'profdirserviceprovider'
 
 include('../src/objs.mozbuild')
 
 SOURCES += modules_profiledirservice_src_csrcs
 
 LIBRARY_NAME = 'profdirserviceprovidersa_s'
+
+FORCE_STATIC_LIB = True
--- a/python/mozbuild/mozbuild/backend/recursivemake.py
+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
@@ -26,21 +26,23 @@ from ..frontend.data import (
     Defines,
     DirectoryTraversal,
     Exports,
     GeneratedEventWebIDLFile,
     GeneratedInclude,
     GeneratedWebIDLFile,
     InstallationTarget,
     IPDLFile,
+    JavaJarData,
     LocalInclude,
     PreprocessedTestWebIDLFile,
     PreprocessedWebIDLFile,
     Program,
     SandboxDerived,
+    SandboxWrapped,
     TestWebIDLFile,
     VariablePassthru,
     XPIDLFile,
     TestManifest,
     WebIDLFile,
 )
 from ..util import (
     ensureParentDir,
@@ -412,16 +414,25 @@ class RecursiveMakeBackend(CommonBackend
             self._process_local_include(obj.path, backend_file)
 
         elif isinstance(obj, GeneratedInclude):
             self._process_generated_include(obj.path, backend_file)
 
         elif isinstance(obj, InstallationTarget):
             self._process_installation_target(obj, backend_file)
 
+        elif isinstance(obj, SandboxWrapped):
+            # Process a rich build system object from the front-end
+            # as-is.  Please follow precedent and handle CamelCaseData
+            # in a function named _process_camel_case_data.  At some
+            # point in the future, this unwrapping process may be
+            # automated.
+            if isinstance(obj.wrapped, JavaJarData):
+                self._process_java_jar_data(obj.wrapped, backend_file)
+
         self._backend_files[obj.srcdir] = backend_file
 
     def _fill_root_mk(self):
         """
         Create two files, root.mk and root-deps.mk, the first containing
         convenience variables, and the other dependency definitions for a
         hopefully proper directory traversal.
         """
@@ -999,16 +1010,33 @@ class RecursiveMakeBackend(CommonBackend
 
     def _process_generated_include(self, generated_include, backend_file):
         if generated_include.startswith('/'):
             path = self.environment.topobjdir.replace('\\', '/')
         else:
             path = ''
         backend_file.write('LOCAL_INCLUDES += -I%s%s\n' % (path, generated_include))
 
+    def _process_java_jar_data(self, jar, backend_file):
+        target = jar.name
+        backend_file.write('JAVA_JAR_TARGETS += %s\n' % target)
+        backend_file.write('%s_DEST := %s.jar\n' % (target, jar.name))
+        if jar.sources:
+            backend_file.write('%s_JAVAFILES := %s\n' %
+                (target, ' '.join(jar.sources)))
+        if jar.generated_sources:
+            backend_file.write('%s_PP_JAVAFILES := %s\n' %
+                (target, ' '.join(jar.generated_sources)))
+        if jar.extra_jars:
+            backend_file.write('%s_EXTRA_JARS := %s\n' %
+                (target, ' '.join(jar.extra_jars)))
+        if jar.javac_flags:
+            backend_file.write('%s_JAVAC_FLAGS := %s\n' %
+                (target, jar.javac_flags))
+
     def _write_manifests(self, dest, manifests):
         man_dir = os.path.join(self.environment.topobjdir, '_build_manifests',
             dest)
 
         # We have a purger for the manifests themselves to ensure legacy
         # manifests are deleted.
         purger = FilePurger()
 
--- a/python/mozbuild/mozbuild/frontend/data.py
+++ b/python/mozbuild/mozbuild/frontend/data.py
@@ -366,16 +366,64 @@ class GeneratedInclude(SandboxDerived):
         'path',
     )
 
     def __init__(self, sandbox, path):
         SandboxDerived.__init__(self, sandbox)
 
         self.path = path
 
+
+class SandboxWrapped(SandboxDerived):
+    """Generic sandbox container object for a wrapped rich object.
+
+    Use this wrapper class to shuttle a rich build system object
+    completely defined in moz.build files through the tree metadata
+    emitter to the build backend for processing as-is.
+    """
+
+    __slots__ = (
+        'wrapped',
+    )
+
+    def __init__(self, sandbox, wrapped):
+        SandboxDerived.__init__(self, sandbox)
+
+        self.wrapped = wrapped
+
+
+class JavaJarData(object):
+    """Represents a Java JAR file.
+
+    A Java JAR has the following members:
+        * sources - list of input java sources
+        * generated_sources - list of generated input java sources
+        * extra_jars - list of JAR file dependencies to include on the
+          javac compiler classpath
+        * javac_flags - string containing extra flags passed to the
+          javac compiler
+    """
+
+    __slots__ = (
+        'name',
+        'sources',
+        'generated_sources',
+        'extra_jars',
+        'javac_flags',
+    )
+
+    def __init__(self, name, sources=[], generated_sources=[],
+            extra_jars=[], javac_flags=None):
+        self.name = name
+        self.sources = list(sources)
+        self.generated_sources = list(generated_sources)
+        self.extra_jars = list(extra_jars)
+        self.javac_flags = javac_flags
+
+
 class InstallationTarget(SandboxDerived):
     """Describes the rules that affect where files get installed to."""
 
     __slots__ = (
         'xpiname',
         'subdir',
         'target',
         'enabled'
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -27,16 +27,17 @@ from .data import (
     GeneratedWebIDLFile,
     InstallationTarget,
     IPDLFile,
     LocalInclude,
     PreprocessedTestWebIDLFile,
     PreprocessedWebIDLFile,
     Program,
     ReaderSummary,
+    SandboxWrapped,
     TestWebIDLFile,
     TestManifest,
     VariablePassthru,
     WebIDLFile,
     XPIDLFile,
 )
 
 from .reader import (
@@ -253,16 +254,19 @@ class TreeMetadataEmitter(LoggingMixin):
             XPCSHELL_TESTS=('xpcshell', 'xpcshell', False),
         )
 
         for prefix, info in test_manifests.items():
             for path in sandbox.get('%s_MANIFESTS' % prefix, []):
                 for obj in self._process_test_manifest(sandbox, info, path):
                     yield obj
 
+        for name, jar in sandbox.get('JAVA_JAR_TARGETS', {}).items():
+            yield SandboxWrapped(sandbox, jar)
+
     def _process_test_manifest(self, sandbox, info, manifest_path):
         flavor, install_prefix, filter_inactive = info
 
         manifest_path = os.path.normpath(manifest_path)
         path = mozpath.normpath(mozpath.join(sandbox['SRCDIR'], manifest_path))
         manifest_dir = mozpath.dirname(path)
         manifest_reldir = mozpath.dirname(mozpath.relpath(path,
             sandbox['TOPSRCDIR']))
--- a/python/mozbuild/mozbuild/frontend/reader.py
+++ b/python/mozbuild/mozbuild/frontend/reader.py
@@ -35,16 +35,20 @@ from io import StringIO
 
 from mozbuild.util import (
     ReadOnlyDefaultDict,
     ReadOnlyDict,
 )
 
 from mozbuild.backend.configenvironment import ConfigEnvironment
 
+from .data import (
+    JavaJarData,
+)
+
 from .sandbox import (
     SandboxError,
     SandboxExecutionError,
     SandboxLoadError,
     Sandbox,
 )
 
 from .sandbox_symbols import (
@@ -217,16 +221,32 @@ class MozbuildSandbox(Sandbox):
         # protection, so it is omitted.
         normalized_path = os.path.normpath(path)
         if not is_read_allowed(normalized_path, self.config):
             raise SandboxLoadError(list(self._execution_stack),
                 sys.exc_info()[2], illegal_path=path)
 
         Sandbox.exec_file(self, path)
 
+    def _add_java_jar(self, name):
+        """Add a Java JAR build target."""
+        if not name:
+            raise Exception('Java JAR cannot be registered without a name')
+
+        if '/' in name or '\\' in name or '.jar' in name:
+            raise Exception('Java JAR names must not include slashes or'
+                ' .jar: %s' % name)
+
+        if self['JAVA_JAR_TARGETS'].has_key(name):
+            raise Exception('Java JAR has already been registered: %s' % name)
+
+        jar = JavaJarData(name)
+        self['JAVA_JAR_TARGETS'][name] = jar
+        return jar
+
     def _add_tier_directory(self, tier, reldir, static=False, external=False):
         """Register a tier directory with the build."""
         if isinstance(reldir, text_type):
             reldir = [reldir]
 
         if not tier in self['TIERS']:
             self['TIERS'][tier] = {
                 'regular': [],
--- a/python/mozbuild/mozbuild/frontend/sandbox_symbols.py
+++ b/python/mozbuild/mozbuild/frontend/sandbox_symbols.py
@@ -204,16 +204,23 @@ VARIABLES = {
         converted to not use Makefile's for the build frontend, this will
         likely go away.
         """, None),
 
     'HOST_LIBRARY_NAME': (unicode, unicode, "",
         """Name of target library generated when cross compiling.
         """, 'binaries'),
 
+    'JAVA_JAR_TARGETS': (dict, dict, {},
+        """Defines Java JAR targets to be built.
+
+        This variable should not be populated directly. Instead, it should
+        populated by calling add_java_jar().
+        """, 'binaries'),
+
     'JS_MODULES_PATH': (unicode, unicode, "",
         """Sub-directory of ``$(FINAL_TARGET)`` to install
         ``EXTRA_JS_MODULES``.
 
         ``EXTRA_JS_MODULES`` files are copied to
         ``$(FINAL_TARGET)/$(JS_MODULES_PATH)``. This variable does not
         need to be defined if the desired destination directory is
         ``$(FINAL_TARGET)/modules``.
@@ -530,16 +537,29 @@ FUNCTIONS = {
 
            include('sibling.build')
 
         Include ``foo.build`` from a path within the top source directory::
 
            include('/elsewhere/foo.build')
         """),
 
+    'add_java_jar': ('_add_java_jar', (str,),
+        """Declare a Java JAR target to be built.
+
+        This is the supported way to populate the JAVA_JAR_TARGETS
+        variable.
+
+        The parameters are:
+        * dest - target name, without the trailing .jar. (required)
+
+        This returns a rich Java JAR type, described at
+        :py:class:`mozbuild.frontend.data.JavaJarData`.
+        """),
+
     'add_tier_dir': ('_add_tier_directory', (str, [str, list], bool, bool),
         """Register a directory for tier traversal.
 
         This is the preferred way to populate the TIERS variable.
 
         Tiers are how the build system is organized. The build process is
         divided into major phases called tiers. The most important tiers are
         "platform" and "apps." The platform tier builds the Gecko platform
--- a/rdf/util/src/Makefile.in
+++ b/rdf/util/src/Makefile.in
@@ -3,11 +3,8 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # This makefile builds the rdfutil_external_s library which should be 
 # used by frozen (dependent) linkage components. The internal-linkage code should use
 # rdfutil_s which is built in the internal/ subdirectory. 
 
 DIST_INSTALL = 1
-
-# we don't want the shared lib, but we want to force the creation of a static lib.
-FORCE_STATIC_LIB = 1
--- a/rdf/util/src/internal/Makefile.in
+++ b/rdf/util/src/internal/Makefile.in
@@ -4,12 +4,9 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # This makefile builds the version of unicharutils_s static library which uses
 # internal linkage. Components that use frozen (external) linkage should use
 # rdfutil_external_s.
 
 MOZILLA_INTERNAL_API = 1
 
-# we don't want the shared lib, but we want to force the creation of a static lib.
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
--- a/rdf/util/src/internal/moz.build
+++ b/rdf/util/src/internal/moz.build
@@ -7,8 +7,10 @@
 MODULE = 'rdfutil'
 
 include('../objs.mozbuild')
 
 SOURCES += rdf_util_src_cppsrcs
 
 LIBRARY_NAME = 'rdfutil_s'
 
+# we don't want the shared lib, but we want to force the creation of a static lib.
+FORCE_STATIC_LIB = True
--- a/rdf/util/src/moz.build
+++ b/rdf/util/src/moz.build
@@ -9,8 +9,10 @@ DIRS += ['internal']
 MODULE = 'rdfutil'
 
 include('objs.mozbuild')
 
 SOURCES += rdf_util_src_cppsrcs
 
 LIBRARY_NAME = 'rdfutil_external_s'
 
+# we don't want the shared lib, but we want to force the creation of a static lib.
+FORCE_STATIC_LIB = True
--- a/testing/mochitest/b2g.json
+++ b/testing/mochitest/b2g.json
@@ -204,16 +204,17 @@
     "content/base/test/test_bug827160.html": "needs plugin support",
 
     "content/base/test/csp/test_CSP_evalscript.html":"observer not working",
     "content/base/test/csp/test_CSP_evalscript_getCRMFRequest.html":"observer not working",
     "content/base/test/csp/test_CSP_frameancestors.html":"observer not working",
     "content/base/test/csp/test_CSP.html":"observer not working",
     "content/base/test/csp/test_bug836922_npolicies.html":"observer not working",
     "content/base/test/csp/test_CSP_bug916446.html":"observer not working",
+    "content/base/test/csp/test_CSP_bug909029.html":"observer not working",
 
     "content/base/test/test_CrossSiteXHR_origin.html":"https not working, bug 907770",
     "content/base/test/test_plugin_freezing.html":"",
     "content/base/test/test_bug466409.html":"",
     "content/base/test/test_bug482935.html":"",
     "content/base/test/test_bug498433.html":"",
     "content/base/test/test_bug650386_redirect_301.html":"",
     "content/base/test/test_bug650386_redirect_302.html":"",
--- a/toolkit/components/protobuf/Makefile.in
+++ b/toolkit/components/protobuf/Makefile.in
@@ -5,17 +5,15 @@
 
 VPATH = \
   @srcdir@ \
   @srcdir@/google/protobuf \
   @srcdir@/google/protobuf/io \
   @srcdir@/google/protobuf/stubs \
   $(NULL)
 
-FORCE_STATIC_LIB = 1
-
 LOCAL_INCLUDES = \
   -I$(srcdir) \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 CXXFLAGS += $(TK_CFLAGS) -DGOOGLE_PROTOBUF_NO_RTTI
--- a/toolkit/components/protobuf/moz.build
+++ b/toolkit/components/protobuf/moz.build
@@ -42,8 +42,9 @@ SOURCES += [
     'google/protobuf/repeated_field.cc',
     'google/protobuf/stubs/common.cc',
     'google/protobuf/stubs/once.cc',
     'google/protobuf/wire_format_lite.cc',
 ]
 
 LIBRARY_NAME = 'protobuf_s'
 
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/breakpad-windows-libxul/Makefile.in
+++ b/toolkit/crashreporter/breakpad-windows-libxul/Makefile.in
@@ -1,14 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
-
 STL_FLAGS =
 
 LOCAL_INCLUDES = -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src
 
 include $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/windows/objs.mk
 include $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/client/windows/handler/objs.mk
 include $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/client/windows/sender/objs.mk
 include $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/client/windows/crash_generation/objs.mk
--- a/toolkit/crashreporter/breakpad-windows-libxul/moz.build
+++ b/toolkit/crashreporter/breakpad-windows-libxul/moz.build
@@ -5,8 +5,9 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SOURCES += [
     '../google-breakpad/src/common/windows/http_upload.cc',
 ]
 
 LIBRARY_NAME = 'google_breakpad_libxul_s'
 
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/breakpad-windows-standalone/Makefile.in
+++ b/toolkit/crashreporter/breakpad-windows-standalone/Makefile.in
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-FORCE_STATIC_LIB = 1
 USE_STATIC_LIBS = 1
 MOZ_GLUE_LDFLAGS =
 
 STL_FLAGS =
 
 LOCAL_INCLUDES = -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src
 
 include $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/windows/objs.mk
--- a/toolkit/crashreporter/breakpad-windows-standalone/moz.build
+++ b/toolkit/crashreporter/breakpad-windows-standalone/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LIBRARY_NAME = 'google_breakpad_standalone_s'
 
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/client/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/client/Makefile.in
@@ -1,8 +1,5 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LOCAL_INCLUDES 	= -I$(srcdir)/..
-
-# need static lib
-FORCE_STATIC_LIB = 1
--- a/toolkit/crashreporter/google-breakpad/src/client/linux/crash_generation/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/client/linux/crash_generation/Makefile.in
@@ -1,16 +1,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LOCAL_INCLUDES = \
   -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src \
   $(NULL)
 
-# need static lib
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 ifeq ($(OS_TARGET),Android)
 LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/android/include/
 endif
--- a/toolkit/crashreporter/google-breakpad/src/client/linux/crash_generation/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/client/linux/crash_generation/moz.build
@@ -8,8 +8,10 @@ MODULE = 'crash_generation'
 
 SOURCES += [
     'crash_generation_client.cc',
     'crash_generation_server.cc',
 ]
 
 LIBRARY_NAME = 'crash_generation_s'
 
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/client/linux/handler/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/client/linux/handler/Makefile.in
@@ -17,16 +17,13 @@ MOZ_FRAMEPTR_FLAGS := -fomit-frame-point
 endif #}
 
 VPATH += $(srcdir)/../log
 
 LOCAL_INCLUDES = \
   -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src \
   $(NULL)
 
-# need static lib
-FORCE_STATIC_LIB = 1
-
 ifeq ($(OS_TARGET),Android)
 # NDK5 workarounds
 DEFINES += -D_STLP_CONST_CONSTRUCTOR_BUG -D_STLP_NO_MEMBER_TEMPLATES
 LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/android/include/
 endif
--- a/toolkit/crashreporter/google-breakpad/src/client/linux/handler/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/client/linux/handler/moz.build
@@ -10,8 +10,11 @@ SOURCES += [
     '../log/log.cc',
     'exception_handler.cc',
     'minidump_descriptor.cc',
 ]
 
 LIBRARY_NAME = 'exception_handler_s'
 
 XPI_NAME = 'crashreporter'
+
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/client/linux/minidump_writer/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/client/linux/minidump_writer/Makefile.in
@@ -1,18 +1,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LOCAL_INCLUDES = \
   -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src \
   $(NULL)
 
-# need static lib
-FORCE_STATIC_LIB = 1
-
 ifeq ($(OS_TARGET),Android)
 LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/android/include/
 endif
 
 ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
 DEFINES += -DELFSIZE=32
 endif
--- a/toolkit/crashreporter/google-breakpad/src/client/linux/minidump_writer/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/client/linux/minidump_writer/moz.build
@@ -10,8 +10,11 @@ SOURCES += [
     'linux_dumper.cc',
     'linux_ptrace_dumper.cc',
     'minidump_writer.cc',
 ]
 
 LIBRARY_NAME = 'minidump_writer_s'
 
 XPI_NAME = 'crashreporter'
+
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/client/mac/crash_generation/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/client/mac/crash_generation/Makefile.in
@@ -1,8 +1,5 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LOCAL_INCLUDES 	= -I$(srcdir)/../../..
-
-# need static lib
-FORCE_STATIC_LIB = 1
--- a/toolkit/crashreporter/google-breakpad/src/client/mac/crash_generation/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/client/mac/crash_generation/moz.build
@@ -9,8 +9,11 @@ MODULE = 'crash_generation'
 SOURCES += [
     'crash_generation_client.cc',
     'crash_generation_server.cc',
 ]
 
 LIBRARY_NAME = 'crash_generation_s'
 
 XPI_NAME = 'crashreporter'
+
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/client/mac/handler/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/client/mac/handler/Makefile.in
@@ -1,8 +1,5 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LOCAL_INCLUDES 	= -I$(srcdir)/../../..
-
-# need static lib
-FORCE_STATIC_LIB = 1
--- a/toolkit/crashreporter/google-breakpad/src/client/mac/handler/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/client/mac/handler/moz.build
@@ -11,8 +11,11 @@ SOURCES += [
     'dynamic_images.cc',
     'exception_handler.cc',
     'minidump_generator.cc',
 ]
 
 LIBRARY_NAME = 'exception_handler_s'
 
 XPI_NAME = 'crashreporter'
+
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/client/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/client/moz.build
@@ -8,8 +8,11 @@ MODULE = 'minidump_file_writer'
 
 SOURCES += [
     'minidump_file_writer.cc',
 ]
 
 LIBRARY_NAME = 'minidump_file_writer_s'
 
 XPI_NAME = 'crashreporter'
+
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/client/solaris/handler/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/client/solaris/handler/Makefile.in
@@ -1,8 +1,5 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LOCAL_INCLUDES 	= -I$(srcdir)/../../..
-
-# need static lib
-FORCE_STATIC_LIB = 1
--- a/toolkit/crashreporter/google-breakpad/src/client/solaris/handler/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/client/solaris/handler/moz.build
@@ -11,8 +11,10 @@ SOURCES += [
     'minidump_generator.cc',
     'solaris_lwp.cc',
 ]
 
 LIBRARY_NAME = 'exception_handler_s'
 
 XPI_NAME = 'crashreporter'
 
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/common/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/common/Makefile.in
@@ -24,24 +24,16 @@ ifeq (Linux,$(OS_ARCH))
 HOST_CXXFLAGS += -DHAVE_A_OUT_H
 OS_CXXFLAGS += -DHAVE_A_OUT_H
 endif
 ifeq (Darwin,$(OS_ARCH))
 HOST_CXXFLAGS += -DHAVE_MACH_O_NLIST_H
 OS_CXXFLAGS += -DHAVE_MACH_O_NLIST_H
 endif
 
-ifneq (WINNT,$(OS_TARGET))
-ifdef MOZ_CRASHREPORTER
-endif
-endif
-
-# need static lib
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 ifneq (WINNT,$(OS_TARGET))
 # Headers from this directory are included as "common/header.h". Having
 # -I$(srcdir) on the command line makes us use common/memory.h when
 # <memory.h> is included from system headers, which is not intended.
 INCLUDES = $(LOCAL_INCLUDES) -I$(DIST)/include
 endif
--- a/toolkit/crashreporter/google-breakpad/src/common/dwarf/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/common/dwarf/Makefile.in
@@ -6,11 +6,8 @@ ifdef MOZ_CRASHREPORTER
 
 LOCAL_INCLUDES 	= -I$(srcdir)/../..
 
 endif
 
 # This code is only compiled for build-time tools,
 # so enabling RTTI should be fine.
 HOST_CXXFLAGS += -funsigned-char -frtti
-
-# need static lib
-FORCE_STATIC_LIB = 1
--- a/toolkit/crashreporter/google-breakpad/src/common/dwarf/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/common/dwarf/moz.build
@@ -9,8 +9,11 @@ MODULE = 'breakpad_dwarf'
 if CONFIG['MOZ_CRASHREPORTER']:
     HOST_LIBRARY_NAME = 'host_breakpad_dwarf_s'
     HOST_SOURCES += [
         'bytereader.cc',
         'dwarf2diehandler.cc',
         'dwarf2reader.cc',
         'functioninfo.cc',
     ]
+
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/common/linux/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/common/linux/Makefile.in
@@ -12,15 +12,12 @@ TARGET_LOCAL_INCLUDES += -I$(topsrcdir)/
 endif
 
 ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
 DEFINES += -DELFSIZE=32
 endif
 
 DEFINES += -DNO_STABS_SUPPORT
 
-# need static lib
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 # See https://bugzilla.mozilla.org/show_bug.cgi?id=741348#c11
 file_id.$(OBJ_SUFFIX): STL_FLAGS=
--- a/toolkit/crashreporter/google-breakpad/src/common/linux/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/common/linux/moz.build
@@ -29,8 +29,10 @@ if CONFIG['MOZ_CRASHREPORTER']:
         'file_id.cc',
         'guid_creator.cc',
         'linux_libc_support.cc',
         'memory_mapped_file.cc',
     ]
 
 LIBRARY_NAME = 'breakpad_linux_common_s'
 
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/common/mac/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/common/mac/Makefile.in
@@ -10,14 +10,11 @@ LOCAL_INCLUDES 	= -I$(srcdir)/../..
 CMSRCS = \
   HTTPMultipartUpload.m \
   $(NULL)
 
 HOST_CMMSRCS = \
   dump_syms.mm \
   $(NULL)
 
-# need static lib
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 COMPILE_CMFLAGS += -std=c99
--- a/toolkit/crashreporter/google-breakpad/src/common/mac/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/common/mac/moz.build
@@ -21,8 +21,10 @@ HOST_SOURCES += SOURCES
 
 HOST_LIBRARY_NAME = 'host_breakpad_mac_common_s'
 SOURCES += [
     'MachIPC.mm',
 ]
 
 LIBRARY_NAME = 'breakpad_mac_common_s'
 
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/common/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/common/moz.build
@@ -79,8 +79,10 @@ if CONFIG['OS_TARGET'] == 'Android':
     SOURCES += [
         'android/breakpad_getcontext.S',
     ]
 
 LIBRARY_NAME = 'breakpad_common_s'
 
 MSVC_ENABLE_PGO = True
 
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/common/solaris/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/common/solaris/Makefile.in
@@ -1,8 +1,5 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LOCAL_INCLUDES 	= -I$(srcdir)/../..
-
-# need static lib
-FORCE_STATIC_LIB = 1
--- a/toolkit/crashreporter/google-breakpad/src/common/solaris/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/common/solaris/moz.build
@@ -19,8 +19,10 @@ LIBRARY_NAME = 'breakpad_solaris_common_
 # not compiling http_upload.cc currently
 # since it depends on libcurl
 HOST_SOURCES += [
     'dump_symbols.cc',
     'file_id.cc',
     'guid_creator.cc',
 ]
 
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/crashreporter/google-breakpad/src/processor/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/processor/Makefile.in
@@ -1,8 +1,5 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LOCAL_INCLUDES 	= -I$(srcdir)/../.. -I$(srcdir)/..
-
-# need static lib
-FORCE_STATIC_LIB = 1
--- a/toolkit/crashreporter/google-breakpad/src/processor/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/processor/moz.build
@@ -20,8 +20,10 @@ SOURCES += [
     'stackwalker_ppc.cc',
     'stackwalker_sparc.cc',
     'stackwalker_x86.cc',
     'tokenize.cc',
 ]
 
 LIBRARY_NAME = 'breakpad_sps_common_s'
 
+# need static lib
+FORCE_STATIC_LIB = True
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -68,29 +68,34 @@ ifndef LIBXUL_SDK
 JSSHELL_BINS  = \
   $(DIST)/bin/js$(BIN_SUFFIX) \
   $(DIST)/bin/$(DLL_PREFIX)mozglue$(DLL_SUFFIX) \
   $(NULL)
 ifndef MOZ_NATIVE_NSPR
 ifeq ($(_MSC_VER),1400)
 JSSHELL_BINS += $(DIST)/bin/Microsoft.VC80.CRT.manifest
 JSSHELL_BINS += $(DIST)/bin/msvcr80.dll
+JSSHELL_BINS += $(DIST)/bin/msvcp80.dll
 endif
 ifeq ($(_MSC_VER),1500)
 JSSHELL_BINS += $(DIST)/bin/Microsoft.VC90.CRT.manifest
 JSSHELL_BINS += $(DIST)/bin/msvcr90.dll
+JSSHELL_BINS += $(DIST)/bin/msvcp90.dll
 endif
 ifeq ($(_MSC_VER),1600)
 JSSHELL_BINS += $(DIST)/bin/msvcr100.dll
+JSSHELL_BINS += $(DIST)/bin/msvcp100.dll
 endif
 ifeq ($(_MSC_VER),1700)
 JSSHELL_BINS += $(DIST)/bin/msvcr110.dll
+JSSHELL_BINS += $(DIST)/bin/msvcp110.dll
 endif
 ifeq ($(_MSC_VER),1800)
 JSSHELL_BINS += $(DIST)/bin/msvcr120.dll
+JSSHELL_BINS += $(DIST)/bin/msvcp120.dll
 endif
 ifdef MOZ_FOLD_LIBS
 JSSHELL_BINS += $(DIST)/bin/$(DLL_PREFIX)nss3$(DLL_SUFFIX)
 else
 JSSHELL_BINS += \
   $(DIST)/bin/$(DLL_PREFIX)nspr4$(DLL_SUFFIX) \
   $(DIST)/bin/$(DLL_PREFIX)plds4$(DLL_SUFFIX) \
   $(DIST)/bin/$(DLL_PREFIX)plc4$(DLL_SUFFIX) \
--- a/tools/mercurial/hgsetup/config.py
+++ b/tools/mercurial/hgsetup/config.py
@@ -4,17 +4,17 @@
 
 from __future__ import unicode_literals
 
 from configobj import ConfigObj
 import re
 import os
 
 
-BUGZILLA_FINGERPRINT = '45:77:35:fd:6f:2c:1c:c2:90:4b:f7:b4:4d:60:c6:97:c5:5c:47:27'
+BUGZILLA_FINGERPRINT = '47:13:a2:14:0c:46:45:53:12:0d:e5:36:16:a5:60:26:3e:da:3a:60'
 HG_FINGERPRINT = '10:78:e8:57:2d:95:de:7c:de:90:bd:22:e1:38:17:67:c5:a7:9c:14'
 
 
 class MercurialConfig(object):
     """Interface for manipulating a Mercurial config file."""
 
     def __init__(self, infiles=None):
         """Create a new instance, optionally from an existing hgrc file."""
--- a/widget/gonk/libdisplay/Makefile.in
+++ b/widget/gonk/libdisplay/Makefile.in
@@ -11,17 +11,16 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 VPATH           = \
   $(srcdir) \
   $(NULL)
 
-FORCE_STATIC_LIB= 1
 STL_FLAGS=
 
 include $(topsrcdir)/config/rules.mk
 
 DEFINES += -DXPCOM_GLUE
 
 LOCAL_INCLUDES += \
 	-I$(ANDROID_SOURCE)/hardware/libhardware/include \
--- a/widget/gonk/libdisplay/moz.build
+++ b/widget/gonk/libdisplay/moz.build
@@ -37,8 +37,9 @@ elif CONFIG['ANDROID_VERSION'] == '15':
     ]
 else:
     error('Unsupported platform version: %s' % (CONFIG['ANDROID_VERSION']))
 
 LIBRARY_NAME = 'display'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+FORCE_STATIC_LIB = True
--- a/widget/qt/faststartupqt/Makefile.in
+++ b/widget/qt/faststartupqt/Makefile.in
@@ -1,14 +1,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIST_INSTALL = 1
-FORCE_STATIC_LIB = 1
 STL_FLAGS=
 
 EXTRA_DSO_LDOPTS = \
 	$(XPCOM_GLUE_LDOPTS) \
 	$(XPCOM_FROZEN_LDOPTS) \
 	$(MOZ_QT_LIBS) \
 	$(NULL)
 
--- a/widget/qt/faststartupqt/moz.build
+++ b/widget/qt/faststartupqt/moz.build
@@ -12,8 +12,9 @@ SOURCES += [
     'mozqglwidgetwrapper.cpp',
     'mozqwidgetfast.cpp',
     'nsFastStartupQt.cpp',
     'nsQAppInstance.cpp',
 ]
 
 LIBRARY_NAME = 'faststartupqt'
 
+FORCE_STATIC_LIB = True
--- a/widget/xremoteclient/Makefile.in
+++ b/widget/xremoteclient/Makefile.in
@@ -2,18 +2,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # NOTE: This directory is part of tier 50, and is linked directly into
 # the application binaries. The fact that it's under mozilla/widget is a fluke
 # of tree history.
 
-FORCE_STATIC_LIB = 1
-
 DEFINES += -DXPCOM_GLUE
 
 LIBCPPSRCS = XRemoteClient.cpp
 
 OBJS = $(LIBCPPSRCS:.cpp=.$(OBJ_SUFFIX))
 
 EXTRA_DSO_LDOPTS = \
 		$(XLIBS) $(XLDFLAGS)  \
--- a/widget/xremoteclient/moz.build
+++ b/widget/xremoteclient/moz.build
@@ -5,8 +5,9 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'xremoteclient'
 
 PROGRAM = 'mozilla-xremote-client'
 
 LIBRARY_NAME = 'xremote_client_s'
 
+FORCE_STATIC_LIB = True
--- a/xpcom/glue/Makefile.in
+++ b/xpcom/glue/Makefile.in
@@ -5,18 +5,16 @@
 
 
 DIST_INSTALL	= 1
 
 LOCAL_INCLUDES	= \
 		-I$(srcdir)/../build \
 		$(NULL)
 
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 ifdef _MSC_VER
 # Don't include directives about which CRT to use
 OS_COMPILE_CXXFLAGS += -Zl
 OS_COMPILE_CFLAGS += -Zl
 DEFINES += -D_USE_ANSI_CPP
 endif
--- a/xpcom/glue/moz.build
+++ b/xpcom/glue/moz.build
@@ -97,8 +97,10 @@ SOURCES += [
     'nsStringAPI.cpp',
 ]
 
 LIBRARY_NAME = 'xpcomglue_s'
 
 SDK_LIBRARY = [
     "%s%s.%s" % (CONFIG['LIB_PREFIX'], 'xpcomglue_s', CONFIG['LIB_SUFFIX']),
 ]
+
+FORCE_STATIC_LIB = True
--- a/xpcom/glue/nomozalloc/Makefile.in
+++ b/xpcom/glue/nomozalloc/Makefile.in
@@ -5,19 +5,16 @@
 
 
 DIST_INSTALL	= 1
 
 LOCAL_INCLUDES	= \
 		-I$(srcdir)/../../build \
 		$(NULL)
 
-# we don't want the shared lib, but we want to force the creation of a static lib.
-FORCE_STATIC_LIB = 1
-
 # Pretend we're statically linking the CRT, even though we might not be: this
 # avoids "msvcrp" and assembly dependencies from creeping into the directives
 # for this library on Windows.
 USE_STATIC_LIBS = 1
 
 # Don't use STL wrappers here (i.e. wrapped <new>); they require mozalloc
 STL_FLAGS       =
 
--- a/xpcom/glue/nomozalloc/moz.build
+++ b/xpcom/glue/nomozalloc/moz.build
@@ -16,8 +16,11 @@ SOURCES += [
     '../nsStringAPI.cpp',
 ]
 
 LIBRARY_NAME = 'xpcomglue_s_nomozalloc'
 
 SDK_LIBRARY = [
     "%s%s.%s" % (CONFIG['LIB_PREFIX'], 'xpcomglue_s_nomozalloc', CONFIG['LIB_SUFFIX']),
 ]
+
+# we don't want the shared lib, but we want to force the creation of a static lib.
+FORCE_STATIC_LIB = True
--- a/xpcom/glue/standalone/Makefile.in
+++ b/xpcom/glue/standalone/Makefile.in
@@ -5,18 +5,16 @@
 
 
 DIST_INSTALL	= 1
 
 LOCAL_INCLUDES	= \
 	-I$(srcdir)/../../build \
 	$(NULL)
 
-FORCE_STATIC_LIB = 1
-
 # Don't use STL wrappers here (i.e. wrapped <new>); they require mozalloc
 STL_FLAGS	=
 
 include $(topsrcdir)/config/rules.mk
 
 ifdef _MSC_VER
 # Don't include directives in obj files about which CRT to use
 OS_COMPILE_CXXFLAGS += -Zl
--- a/xpcom/glue/standalone/moz.build
+++ b/xpcom/glue/standalone/moz.build
@@ -24,8 +24,10 @@ LIBRARY_NAME = 'xpcomglue'
 
 EXPORTS += [
     'nsXPCOMGlue.h',
 ]
 
 SDK_LIBRARY = [
     "%s%s.%s" % (CONFIG['LIB_PREFIX'], 'xpcomglue', CONFIG['LIB_SUFFIX']),
 ]
+
+FORCE_STATIC_LIB = True
--- a/xpcom/glue/standalone/staticruntime/Makefile.in
+++ b/xpcom/glue/standalone/staticruntime/Makefile.in
@@ -4,19 +4,16 @@
 
 
 DIST_INSTALL	= 1
 
 LOCAL_INCLUDES	= \
 	-I$(srcdir)/../../../build \
 	$(NULL)
 
-# create a static lib
-FORCE_STATIC_LIB = 1
-
 # Statically link to the CRT on Windows
 USE_STATIC_LIBS = 1
 
 # Don't use STL wrappers here (i.e. wrapped <new>); they require mozalloc
 STL_FLAGS	=
 
 include $(topsrcdir)/config/rules.mk
 
--- a/xpcom/glue/standalone/staticruntime/moz.build
+++ b/xpcom/glue/standalone/staticruntime/moz.build
@@ -15,8 +15,11 @@ SOURCES += [
     '../nsXPCOMGlue.cpp',
 ]
 
 LIBRARY_NAME = 'xpcomglue_staticruntime'
 
 SDK_LIBRARY = [
     "%s%s.%s" % (CONFIG['LIB_PREFIX'], 'xpcomglue_staticruntime', CONFIG['LIB_SUFFIX']),
 ]
+
+# create a static lib
+FORCE_STATIC_LIB = True
--- a/xpcom/glue/staticruntime/Makefile.in
+++ b/xpcom/glue/staticruntime/Makefile.in
@@ -5,18 +5,16 @@
 
 
 DIST_INSTALL	= 1
 
 LOCAL_INCLUDES	= \
 	-I$(srcdir)/../../build \
 	$(NULL)
 
-FORCE_STATIC_LIB = 1
-
 # Statically link to the CRT on Windows
 USE_STATIC_LIBS = 1
 
 # Don't use STL wrappers here (i.e. wrapped <new>); they require mozalloc
 STL_FLAGS	=
 
 include $(topsrcdir)/config/rules.mk
 
--- a/xpcom/glue/staticruntime/moz.build
+++ b/xpcom/glue/staticruntime/moz.build
@@ -17,8 +17,9 @@ SOURCES += [
 ]
 
 LIBRARY_NAME = 'xpcomglue_staticruntime_s'
 
 SDK_LIBRARY = [
     "%s%s.%s" % (CONFIG['LIB_PREFIX'], 'xpcomglue_staticruntime_s', CONFIG['LIB_SUFFIX']),
 ]
 
+FORCE_STATIC_LIB = True
--- a/xpcom/reflect/xptcall/src/md/os2/Makefile.in
+++ b/xpcom/reflect/xptcall/src/md/os2/Makefile.in
@@ -7,17 +7,13 @@ EXPORT_LIBRARY	= ../..
 MOZILLA_INTERNAL_API = 1
 
 LOCAL_INCLUDES = \
 		-I$(srcdir)/../unix \
 		-I$(srcdir)/../../../../xptinfo/src \
 		$(NULL)
 DEFINES		+= -DMOZ_NEED_LEADING_UNDERSCORE
 
-
-# we don't want the shared lib, but we want to force the creation of a static lib.
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 DEFINES		+= -DIMPL_LIBXUL
 
 LOCAL_INCLUDES	+= -I$(srcdir)/../..
--- a/xpcom/reflect/xptcall/src/md/os2/moz.build
+++ b/xpcom/reflect/xptcall/src/md/os2/moz.build
@@ -8,8 +8,10 @@ MODULE = 'xpcom'
 
 SOURCES += [
     '../unix/xptcinvoke_gcc_x86_unix.cpp',
     'xptcstubs_gcc_x86_os2.cpp',
 ]
 
 LIBRARY_NAME = 'xptcmd'
 
+# we don't want the shared lib, but we want to force the creation of a static lib.
+FORCE_STATIC_LIB = True
--- a/xpcom/reflect/xptcall/src/md/unix/Makefile.in
+++ b/xpcom/reflect/xptcall/src/md/unix/Makefile.in
@@ -257,20 +257,16 @@ endif
 ifeq ($(OS_ARCH)$(OS_TEST),Linuxs390)
 CXXFLAGS	+= -fno-strict-aliasing -fno-inline -fomit-frame-pointer -mbackchain
 endif
 
 ifeq ($(OS_ARCH)$(OS_TEST),Linuxs390x)
 CXXFLAGS	+= -fno-strict-aliasing -fno-inline -fomit-frame-pointer -mbackchain
 endif
 
-
-# we don't want the shared lib, but we want to force the creation of a static lib.
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 DEFINES		+= -DIMPL_LIBXUL
 
 LOCAL_INCLUDES += \
 	-I$(srcdir)/../.. \
 	-I$(srcdir)/../../../../xptinfo/src \
 	$(NULL)
--- a/xpcom/reflect/xptcall/src/md/unix/moz.build
+++ b/xpcom/reflect/xptcall/src/md/unix/moz.build
@@ -249,8 +249,10 @@ if CONFIG['OS_ARCH'] == 'Linux':
     elif CONFIG['OS_TEST'] == 's390x':
         SOURCES += [
             'xptcinvoke_linux_s390x.cpp',
             'xptcstubs_linux_s390x.cpp',
         ]
 
 LIBRARY_NAME = 'xptcmd'
 
+# we don't want the shared lib, but we want to force the creation of a static lib.
+FORCE_STATIC_LIB = True
--- a/xpcom/reflect/xptcall/src/md/win32/Makefile.in
+++ b/xpcom/reflect/xptcall/src/md/win32/Makefile.in
@@ -11,16 +11,13 @@ LOCAL_INCLUDES += -I$(srcdir)/../../../.
 
 ifneq ($(TARGET_CPU),x86_64)
 ifndef GNU_CXX
 # FIXME: bug 413019
 OS_COMPILE_CXXFLAGS += -GL-
 endif #!GNU_CXX
 endif #!x86_64
 
-# we don't want the shared lib, but we want to force the creation of a static lib.
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 DEFINES		+= -DIMPL_LIBXUL
 
 LOCAL_INCLUDES	+= -I$(srcdir)/../..
--- a/xpcom/reflect/xptcall/src/md/win32/moz.build
+++ b/xpcom/reflect/xptcall/src/md/win32/moz.build
@@ -33,8 +33,10 @@ else:
     else:
         SOURCES += [
             'xptcinvoke.cpp',
             'xptcstubs.cpp',
         ]
 
 LIBRARY_NAME = 'xptcmd'
 
+# we don't want the shared lib, but we want to force the creation of a static lib.
+FORCE_STATIC_LIB = True
--- a/xpcom/string/src/Makefile.in
+++ b/xpcom/string/src/Makefile.in
@@ -1,20 +1,16 @@
 # vim:set ts=8 sw=8 sts=8 noet:
 # 
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MOZILLA_INTERNAL_API = 1
 
-# we don't want the shared lib, but we want to force the creation of a
-# static lib.
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
 
 ifneq (,$(INTEL_ARCHITECTURE))
 # gcc requires -msse2 on nsUTF8UtilsSSE2.cpp since it uses SSE2 intrinsics.
 # (See bug 585538 comment 12.)
 ifdef GNU_CC
 nsUTF8UtilsSSE2.$(OBJ_SUFFIX): CXXFLAGS+=-msse2
 endif
--- a/xpcom/string/src/moz.build
+++ b/xpcom/string/src/moz.build
@@ -24,8 +24,11 @@ if CONFIG['INTEL_ARCHITECTURE']:
     SOURCES += [
         'nsUTF8UtilsSSE2.cpp',
     ]
 
 LIBRARY_NAME = 'string_s'
 
 MSVC_ENABLE_PGO = True
 
+# we don't want the shared lib, but we want to force the creation of a
+# static lib.
+FORCE_STATIC_LIB = True