Merge mozilla-central and inbound
authorEd Morley <emorley@mozilla.com>
Fri, 25 Oct 2013 17:55:18 +0100
changeset 152265 3cb5ccf394bc4b7b8862c4a809e6a6ecede5deee
parent 152235 2f2a45f04e7c1452d4b61f7d98df02fbd570618b (current diff)
parent 152264 e3a2d93fb173cdc45b8211f6105593491bfa4132 (diff)
child 152266 b569edfd98c25fda87d00cf53143cf4b7ad6b9c2
push id25523
push userphilringnalda@gmail.com
push dateSat, 26 Oct 2013 02:09:15 +0000
treeherdermozilla-central@ac49a4f5bf04 [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 mozilla-central and inbound
config/config.mk
configure.in
js/src/config/config.mk
other-licenses/android/Makefile.in
xpcom/build/mozPoisonWrite.h
xpcom/build/mozPoisonWriteBase.cpp
xpcom/build/mozPoisonWriteBase.h
xpcom/build/mozPoisonWriteMac.cpp
xpcom/build/mozPoisonWriteStub.cpp
xpcom/build/mozPoisonWriteWin.cpp
--- 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/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/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,16 +36,17 @@ 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 \
   JS_MODULES_PATH \
   LIBRARY_NAME \
--- a/configure.in
+++ b/configure.in
@@ -9140,17 +9140,20 @@ MOZ_ARG_WITH_STRING(intl-api,
     Determine the status of the ECMAScript Internationalization API.  The first
     (or lack of any of these) builds and exposes the API.  The second builds it
     but doesn't use ICU or expose the API to script.  The third doesn't build
     ICU at all.],
     WITH_INTL="--with-intl-api=$withval"
 ])
 if test -z "$WITH_INTL"; then
 if test "$MOZ_BUILD_APP" = "browser"; then
-    WITH_INTL="--with-intl-api"
+    # Don't build the Intl API til we can update ICU (bug 924839).  Don't take
+    # the smaller step of building but not exposing it, either, as we also
+    # don't want dead code in shipping builds.
+    WITH_INTL="--without-intl-api"
 else
     # Internationalization isn't built or exposed by default in non-desktop
     # builds.  Bugs to enable:
     #
     #   Android:  bug 864843
     #   B2G:      bug 866301
     WITH_INTL="--without-intl-api"
 fi
--- 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;
 };
 
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/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,16 +36,17 @@ 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 \
   JS_MODULES_PATH \
   LIBRARY_NAME \
--- 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/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/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/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/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/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/nsTHashtable.h
+++ b/xpcom/glue/nsTHashtable.h
@@ -437,17 +437,17 @@ template<class EntryType>
 void
 nsTHashtable<EntryType>::s_CopyEntry(PLDHashTable          *table,
                                      const PLDHashEntryHdr *from,
                                      PLDHashEntryHdr       *to)
 {
   EntryType* fromEntry =
     const_cast<EntryType*>(reinterpret_cast<const EntryType*>(from));
 
-  new(to) EntryType(mozilla::Move(*fromEntry));
+  new(to) EntryType(*fromEntry);
 
   fromEntry->~EntryType();
 }
 
 template<class EntryType>
 void
 nsTHashtable<EntryType>::s_ClearEntry(PLDHashTable    *table,
                                       PLDHashEntryHdr *entry)
--- 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