Merge tips of mozilla-central and mozilla-inbound
authorEd Morley <bmo@edmorley.co.uk>
Thu, 22 Sep 2011 01:46:53 +0100
changeset 77296 4495e1f795c218d562205f3364ac1f84aecee220
parent 77264 50b36274e6896899e9b3e1de6b4e0ad75ed60a37 (current diff)
parent 77295 1d490722d3331e6bdfc17a40beab470410dec36a (diff)
child 77297 6935f0893612179d466e9b4e41da98418702ac2e
child 77300 adceb7fb0fceea8c7c31889764fefd55d608c5e4
push id21191
push userbmo@edmorley.co.uk
push dateThu, 22 Sep 2011 00:52:59 +0000
treeherdermozilla-central@4495e1f795c2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone9.0a1
first release with
nightly linux32
4495e1f795c2 / 9.0a1 / 20110922030907 / files
nightly linux64
4495e1f795c2 / 9.0a1 / 20110922030907 / files
nightly mac
4495e1f795c2 / 9.0a1 / 20110922030907 / files
nightly win32
4495e1f795c2 / 9.0a1 / 20110922030907 / files
nightly win64
4495e1f795c2 / 9.0a1 / 20110922030907 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge tips of mozilla-central and mozilla-inbound
--- a/browser/base/content/test/Makefile.in
+++ b/browser/base/content/test/Makefile.in
@@ -48,16 +48,18 @@ DIRS += \
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES = \
 		test_feed_discovery.html \
 		feed_discovery.html \
 		test_bug395533.html \
 		bug395533-data.txt \
+		test_contextmenu.html \
+		subtst_contextmenu.html \
 		ctxmenu-image.png \
 		video.ogg \
 		test_offlineNotification.html \
 		offlineChild.html \
 		offlineChild.cacheManifest \
 		offlineChild.cacheManifest^headers^ \
 		offlineChild2.html \
 		offlineChild2.cacheManifest \
@@ -70,26 +72,16 @@ include $(topsrcdir)/config/rules.mk
 		bug364677-data.xml^headers^ \
 		test_offline_gzip.html \
 		gZipOfflineChild.html \
 		gZipOfflineChild.html^headers^ \
 		gZipOfflineChild.cacheManifest \
 		gZipOfflineChild.cacheManifest^headers^ \
 		$(NULL)
 
-ifeq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
-_TEST_FILES += \
-		test_contextmenu.html \
-		subtst_contextmenu.html \
-		$(NULL)
-
-else
-$(warning test_contextmenu.html disabled because of intermittent failures; bug 513558)
-endif
-
 # The following tests are disabled because they are unreliable:
 #   browser_bug423833.js is bug 428712
 #   browser_sanitize-download-history.js is bug 432425
 #
 # browser_sanitizeDialog_treeView.js is disabled until the tree view is added
 # back to the clear recent history dialog (santize.xul), if it ever is (bug
 # 480169)
 
--- a/browser/base/content/test/browser_sanitizeDialog.js
+++ b/browser/base/content/test/browser_sanitizeDialog.js
@@ -733,25 +733,30 @@ function blankSlate() {
  *       this is a problem only across different connections.
  */
 function waitForAsyncUpdates(aCallback, aScope, aArguments)
 {
   let scope = aScope || this;
   let args = aArguments || [];
   let db = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
                               .DBConnection;
-  db.createAsyncStatement("BEGIN EXCLUSIVE").executeAsync();
-  db.createAsyncStatement("COMMIT").executeAsync({
+  let begin = db.createAsyncStatement("BEGIN EXCLUSIVE");
+  begin.executeAsync();
+  begin.finalize();
+
+  let commit = db.createAsyncStatement("COMMIT");
+  commit.executeAsync({
     handleResult: function() {},
     handleError: function() {},
     handleCompletion: function(aReason)
     {
       aCallback.apply(scope, args);
     }
   });
+  commit.finalize();
 }
 
 /**
  * Ensures that the given pref is the expected value.
  *
  * @param aPrefName
  *        The pref's sub-branch under the privacy branch
  * @param aExpectedVal
--- a/browser/base/content/test/browser_sanitizeDialog_treeView.js
+++ b/browser/base/content/test/browser_sanitizeDialog_treeView.js
@@ -537,25 +537,30 @@ function blankSlate() {
  *       this is a problem only across different connections.
  */
 function waitForAsyncUpdates(aCallback, aScope, aArguments)
 {
   let scope = aScope || this;
   let args = aArguments || [];
   let db = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
                               .DBConnection;
-  db.createAsyncStatement("BEGIN EXCLUSIVE").executeAsync();
-  db.createAsyncStatement("COMMIT").executeAsync({
+  let begin = db.createAsyncStatement("BEGIN EXCLUSIVE");
+  begin.executeAsync();
+  begin.finalize();
+
+  let commit = db.createAsyncStatement("COMMIT");
+  commit.executeAsync({
     handleResult: function() {},
     handleError: function() {},
     handleCompletion: function(aReason)
     {
       aCallback.apply(scope, args);
     }
   });
+  commit.finalize();
 }
 
 /**
  * Checks to see if the download with the specified ID exists.
  *
  * @param  aID
  *         The ID of the download to check
  * @return True if the download exists, false otherwise
--- a/browser/components/places/tests/browser/head.js
+++ b/browser/components/places/tests/browser/head.js
@@ -62,18 +62,23 @@ function waitForClearHistory(aCallback) 
  *       this is a problem only across different connections.
  */
 function waitForAsyncUpdates(aCallback, aScope, aArguments)
 {
   let scope = aScope || this;
   let args = aArguments || [];
   let db = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
                               .DBConnection;
-  db.createAsyncStatement("BEGIN EXCLUSIVE").executeAsync();
-  db.createAsyncStatement("COMMIT").executeAsync({
+  let begin = db.createAsyncStatement("BEGIN EXCLUSIVE");
+  begin.executeAsync();
+  begin.finalize();
+
+  let commit = db.createAsyncStatement("COMMIT");
+  commit.executeAsync({
     handleResult: function() {},
     handleError: function() {},
     handleCompletion: function(aReason)
     {
       aCallback.apply(scope, args);
     }
   });
+  commit.finalize();
 }
--- a/browser/components/places/tests/unit/test_clearHistory_shutdown.js
+++ b/browser/components/places/tests/unit/test_clearHistory_shutdown.js
@@ -47,17 +47,16 @@ const URIS = [
 , "http://c.example3.com/"
 ];
 
 const TOPIC_CONNECTION_CLOSED = "places-connection-closed";
 
 let EXPECTED_NOTIFICATIONS = [
   "places-shutdown"
 , "places-will-close-connection"
-, "places-connection-closing"
 , "places-expiration-finished"
 , "places-connection-closed"
 ];
 
 const UNEXPECTED_NOTIFICATIONS = [
   "xpcom-shutdown"
 ];
 
--- a/browser/components/sessionstore/src/nsSessionStore.js
+++ b/browser/components/sessionstore/src/nsSessionStore.js
@@ -3009,34 +3009,27 @@ SessionStoreService.prototype = {
     browser.__SS_restoreState = TAB_STATE_RESTORING;
 
     // Remove the history listener, since we no longer need it once we start restoring
     this._removeSHistoryListener(aTab);
 
     let activeIndex = (tabData.index || tabData.entries.length) - 1;
     if (activeIndex >= tabData.entries.length)
       activeIndex = tabData.entries.length - 1;
-
     // Reset currentURI.  This creates a new session history entry with a new
     // doc identifier, so we need to explicitly save and restore the old doc
     // identifier (corresponding to the SHEntry at activeIndex) below.
     browser.webNavigation.setCurrentURI(this._getURIFromString("about:blank"));
-
     // Attach data that will be restored on "load" event, after tab is restored.
     if (activeIndex > -1) {
-      let curSHEntry = browser.webNavigation.sessionHistory.
-                       getEntryAtIndex(activeIndex, false).
-                       QueryInterface(Ci.nsISHEntry);
-
       // restore those aspects of the currently active documents which are not
       // preserved in the plain history entries (mainly scroll state and text data)
       browser.__SS_restore_data = tabData.entries[activeIndex] || {};
       browser.__SS_restore_pageStyle = tabData.pageStyle || "";
       browser.__SS_restore_tab = aTab;
-
       didStartLoad = true;
       try {
         // In order to work around certain issues in session history, we need to
         // force session history to update its internal index and call reload
         // instead of gotoIndex. See bug 597315.
         browser.webNavigation.sessionHistory.getEntryAtIndex(activeIndex, true);
         browser.webNavigation.sessionHistory.reloadCurrentEntry();
       }
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -1402,19 +1402,20 @@ ifneq ($(PREF_JS_EXPORTS),)
 ifeq (WINNT,$(OS_ARCH))
 PREF_PPFLAGS = --line-endings=crlf
 endif
 
 ifndef NO_DIST_INSTALL
 $(FINAL_TARGET)/$(PREF_DIR):
 	$(NSINSTALL) -D $@
 
-libs:: $(FINAL_TARGET)/$(PREF_DIR) $(PREF_JS_EXPORTS)
+libs:: $(FINAL_TARGET)/$(PREF_DIR)
+libs:: $(PREF_JS_EXPORTS)
 	$(EXIT_ON_ERROR)  \
-	for i in $(PREF_JS_EXPORTS); do \
+	for i in $^; do \
 	  dest=$(FINAL_TARGET)/$(PREF_DIR)/`basename $$i`; \
 	  $(RM) -f $$dest; \
 	  $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $$i > $$dest; \
 	done
 endif
 endif
 
 ################################################################################
@@ -1647,36 +1648,37 @@ ifndef NO_DIST_INSTALL
 	  $(JAR_MANIFEST)
 endif
 endif
 
 ifneq ($(DIST_FILES),)
 $(DIST)/bin:
 	$(NSINSTALL) -D $@
 
-libs:: $(DIST_FILES) $(DIST)/bin
+libs:: $(DIST)/bin
+libs:: $(DIST_FILES)
 	@$(EXIT_ON_ERROR) \
-	for f in $(DIST_FILES); do \
+	for f in $^; do \
 	  dest=$(FINAL_TARGET)/`basename $$f`; \
 	  $(RM) -f $$dest; \
 	  $(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py \
 	    $(XULAPP_DEFINES) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) \
-	    $(srcdir)/$$f > $$dest; \
+	    $$f > $$dest; \
 	done
 endif
 
 ifneq ($(DIST_CHROME_FILES),)
 libs:: $(DIST_CHROME_FILES)
 	@$(EXIT_ON_ERROR) \
-	for f in $(DIST_CHROME_FILES); do \
+	for f in $^; do \
 	  dest=$(FINAL_TARGET)/chrome/`basename $$f`; \
 	  $(RM) -f $$dest; \
 	  $(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py \
 	    $(XULAPP_DEFINES) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) \
-	    $(srcdir)/$$f > $$dest; \
+	    $$f > $$dest; \
 	done
 endif
 
 ifneq ($(XPI_PKGNAME),)
 libs realchrome::
 ifdef STRIP_XPI
 ifndef MOZ_DEBUG
 	@echo "Stripping $(XPI_PKGNAME) package directory..."
--- a/content/html/content/test/Makefile.in
+++ b/content/html/content/test/Makefile.in
@@ -276,12 +276,14 @@ include $(topsrcdir)/config/rules.mk
 		test_bug617528.html \
 		test_checked.html \
 		test_bug677658.html \
 		test_bug677463.html \
 		test_bug682886.html \
 		file_fullscreen-api.html \
 		file_fullscreen-api-keys.html \
 		test_fullscreen-api.html \
+		test_li_attributes_reflection.html \
+		test_ol_attributes_reflection.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/content/html/content/test/forms/test_input_attributes_reflection.html
+++ b/content/html/content/test/forms/test_input_attributes_reflection.html
@@ -103,17 +103,22 @@ reflectString({
 
 // .indeterminate doesn't reflect a content attribute.
 
 // TODO: list (HTMLElement)
 
 // .max
 todo("max" in document.createElement("input"), "max isn't implemented yet");
 
-// TODO: maxLength (long)
+// .maxLength
+reflectInt({
+  element: document.createElement("input"),
+  attribute: "maxLength",
+  nonNegative: true,
+});
 
 // .min
 todo("min" in document.createElement("input"), "min isn't implemented yet");
 
 // .multiple
 reflectBoolean({
   element: document.createElement("input"),
   attribute: "multiple",
--- a/content/html/content/test/forms/test_textarea_attributes_reflection.html
+++ b/content/html/content/test/forms/test_textarea_attributes_reflection.html
@@ -32,17 +32,23 @@ todo("dirName" in document.createElement
 
 // .disabled
 reflectBoolean({
   element: document.createElement("textarea"),
   attribute: "disabled",
 });
 
 // TODO: form (HTMLFormElement)
-// TODO: maxLength (long)
+
+// .maxLength
+reflectInt({
+  element: document.createElement("textarea"),
+  attribute: "maxLength",
+  nonNegative: true,
+});
 
 // .name
 reflectString({
   element: document.createElement("textarea"),
   attribute: "name",
   otherValues: [ "isindex", "_charset_" ],
 });
 
--- a/content/html/content/test/reflect.js
+++ b/content/html/content/test/reflect.js
@@ -444,8 +444,179 @@ function reflectBoolean(aParameters)
   });
 
   // Tests after removeAttribute() is called. Should be equivalent with not set.
   is(element.getAttribute(contentAttr), null,
      "When not set, the content attribute should be null.");
   is(element[contentAttr], false,
      "When not set, the IDL attribute should return false");
 }
+
+/**
+ * Checks that a given attribute name for a given element is correctly reflected
+ * as an signed integer.
+ *
+ * @param aParameters   Object    object containing the parameters, which are:
+ *  - element           Element   node to test on
+ *  - attribute         String    name of the attribute
+ *  - nonNegative       Boolean   true if the attribute is limited to 'non-negative numbers', false otherwise
+ *  - defaultValue      Integer   [optional] default value, if one exists
+ */
+function reflectInt(aParameters)
+{
+  //TBD: Bug 673820: .setAttribute(exponential) -> incorrect reflection for element[attr]
+  function testExponential(value) {
+    return !!/^[ \t\n\f\r]*[\+\-]?[0-9]+e[0-9]+/.exec(value);
+  }
+
+  // Expected value returned by .getAttribute() when |value| has been previously passed to .setAttribute().
+  function expectedGetAttributeResult(value) {
+    return (value !== null) ? String(value) : "";
+  }
+
+  function stringToInteger(value, nonNegative, defaultValue) {
+    if (nonNegative === false) {
+      // Parse: Ignore leading whitespace, find [+/-][numbers]
+      var result = /^[ \t\n\f\r]*([\+\-]?[0-9]+)/.exec(value);
+      if (result) {
+        if (-0x80000000 <= result[1] && result[1] <= 0x7FFFFFFF) {
+          // If the value is within allowed value range for signed integer, return value
+          return result[1];
+        }
+      }
+    } else {
+      var result = /^[ \t\n\f\r]*(\+?[0-9]+)/.exec(value);
+      if (result) {
+        if (0 <= result[1] && result[1] <= 0x7FFFFFFF) {
+          // If the value is within allowed value range for non-negative integer, return value
+          return result[1];
+        }
+      }
+    }
+    return defaultValue;
+  }
+
+  // Expected value returned by .getAttribute(attr) or .attr if |value| has been set via the IDL attribute.
+  function expectedIdlAttributeResult(value) {
+    // This returns the result of calling the ES ToInt32 algorithm on value.
+    return value << 0;
+  }
+
+  var element = aParameters.element;
+  var attr = aParameters.attribute;
+  var nonNegative = aParameters.nonNegative;
+
+  var defaultValue = aParameters.defaultValue !== undefined
+                      ? aParameters.defaultValue
+                      : nonNegative ? -1 : 0;
+
+  ok(attr in element, attr + " should be an IDL attribute of this element");
+  is(typeof element[attr], "number", attr + " IDL attribute should be a number");
+
+  // Check default value.
+  is(element[attr], defaultValue, "default value should be " + defaultValue);
+  ok(!element.hasAttribute(attr), attr + " shouldn't be present");
+
+  /**
+   * Test various values.
+   * value: The test value that will be set using both setAttribute(value) and
+   *        element[attr] = value
+   */
+  var valuesToTest = [
+    // Test numeric inputs up to max signed integer
+    0, 1, 55555, 2147483647, +42,
+    // Test string inputs up to max signed integer
+    "0", "1", "777777", "2147483647", "+42",
+    // Test negative numeric inputs up to min signed integer
+    -0, -1, -3333, -2147483648,
+    // Test negative string inputs up to min signed integer
+    "-0", "-1", "-222", "-2147483647", "-2147483648",
+    // Test numeric inputs that are outside legal 32 bit signed values
+    -2147483649, -3000000000, -4294967296, 2147483649, 4000000000, -4294967297,
+    // Test string inputs with extra padding
+    "     1111111", "  23456   ",
+    // Test non-numeric string inputs
+    "", " ", "+", "-", "foo", "+foo", "-foo", "+     foo", "-     foo", "+-2", "-+2", "++2", "--2", "hello1234", "1234hello",
+    "444 world 555", "why 567 what", "-3 nots", "2e5", "300e2", "42+-$", "+42foo", "-514not", "\vblah", "0x10FFFF", "-0xABCDEF",
+    // Test decimal numbers
+    1.2345, 42.0, 3456789.1, -2.3456, -6789.12345, -2147483649.1234,
+    // Test decimal strings
+    "1.2345", "42.0", "3456789.1", "-2.3456", "-6789.12345", "-2147483649.1234",
+    // Test special values
+    undefined, null, NaN, Infinity, -Infinity,
+  ];
+
+  valuesToTest.forEach(function(v) {
+    var intValue = stringToInteger(v, nonNegative, defaultValue);
+
+    element.setAttribute(attr, v);
+
+    is(element.getAttribute(attr), expectedGetAttributeResult(v), element.localName + ".setAttribute(" +
+      attr + ", " + v + "), " + element.localName + ".getAttribute(" + attr + ") ");
+
+    if (intValue == -2147483648 && element[attr] == defaultValue) {
+      //TBD: Bug 586761: .setAttribute(attr, -2147483648) --> element[attr] == defaultValue instead of -2147483648
+      todo_is(element[attr], intValue, "Bug 586761: " + element.localName +
+        ".setAttribute(value, " + v + "), " + element.localName + "[" + attr + "] ");
+    } else if (testExponential(v)) {
+      //TBD: Bug 673820: .setAttribute(exponential) -> incorrect reflection for element[attr]
+      todo_is(element[attr], intValue, "Bug 673820: " + element.localName +
+        ".setAttribute(" + attr + ", " + v + "), " + element.localName + "[" + attr + "] ");
+    } else if (v == "why 567 what") {
+      //TBD: Bug 679672: .setAttribute() is somehow able to parse "why 567 what" into "567"
+      todo_is(element[attr], intValue, "Bug 679672: " + element.localName +
+        ".setAttribute(" + attr + ", " + v + "), " + element.localName + "[" + attr + "] ");
+    } else if (v === "-0" && nonNegative) {
+      //TBD: Bug 688093: Non-negative integers should return defaultValue when attempting to reflect "-0"
+      todo_is(element[attr], intValue, "Bug 688093: " + element.localName +
+        ".setAttribute(" + attr + ", " + v + "), " + element.localName + "[" + attr + "] ");
+    } else if (v == "+42foo") {
+      //TBD: Bug: Unable to correctly parse "+" character in front of string
+      todo_is(element[attr], intValue, "Bug: " + element.localName +
+        ".setAttribute(" + attr + ", " + v + "), " + element.localName + "[" + attr + "] ");
+    } else if (v == "0x10FFFF" && defaultValue != 0) {
+      //TBD: Bug: Integer attributes should parse "0x10FFFF" as 0, but instead incorrectly return defaultValue
+      todo_is(element[attr], intValue, "Bug: " + element.localName +
+        ".setAttribute(" + attr + ", " + v + "), " + element.localName + "[" + attr + "] ");
+    } else if (v == "-0xABCDEF" && !nonNegative && defaultValue != 0) {
+      //TBD: Bug: Signed integer attributes should parse "-0xABCDEF" as -0, but instead incorrectly return defaultValue
+      todo_is(element[attr], intValue, "Bug: " + element.localName +
+        ".setAttribute(" + attr + ", " + v + "), " + element.localName + "[" + attr + "] ");
+    } else if ((v == "++2" || v == "+-2" || v == "--2" || v == "-+2") && element[attr] != defaultValue)  {
+      //TBD: Bug: Should not be able to parse strings with multiple sign characters, should return defaultValue
+      todo_is(element[attr], intValue, "Bug: " + element.localName +
+        ".setAttribute(" + attr + ", " + v + "), " + element.localName + "[" + attr + "] ");
+    } else {
+      is(element[attr], intValue, element.localName +
+        ".setAttribute(" + attr + ", " + v + "), " + element.localName + "[" + attr + "] ");
+    }
+    element.removeAttribute(attr);
+
+    if (nonNegative && expectedIdlAttributeResult(v) < 0) {
+      try {
+        element[attr] = v;
+        ok(false, element.localName + "[" + attr + "] = " + v + " should throw NS_ERROR_DOM_INDEX_SIZE_ERR");
+      } catch(e) {
+        is(e.code, DOMException.INDEX_SIZE_ERR, element.localName + "[" + attr + "] = " + v +
+          " should throw NS_ERROR_DOM_INDEX_SIZE_ERR");
+      }
+    } else {
+      element[attr] = v;
+      if (expectedIdlAttributeResult(v) == -2147483648 && element[attr] == defaultValue) {
+        //TBD: Bug 586761: .setAttribute(attr, -2147483648) --> element[attr] == defaultValue instead of -2147483648
+        todo_is(element[attr], expectedIdlAttributeResult(v), "Bug 586761: " + element.localName + "[" +
+          attr + "] = " + v + ", " + element.localName + "[" + attr + "] ");
+      } else {
+        is(element[attr], expectedIdlAttributeResult(v), element.localName + "[" + attr + "] = " + v +
+          ", " + element.localName + "[" + attr + "] ");
+        is(element.getAttribute(attr), expectedIdlAttributeResult(v), element.localName + "[" + attr +
+          "] = " + v + ", " + element.localName + ".getAttribute(" + attr + ") ");
+      }
+    }
+    element.removeAttribute(attr);
+  });
+
+  // Tests after removeAttribute() is called. Should be equivalent with not set.
+  is(element.getAttribute(attr), null,
+     "When not set, the content attribute should be null.");
+  is(element[attr], defaultValue,
+     "When not set, the IDL attribute should return default value.");
+}
new file mode 100644
--- /dev/null
+++ b/content/html/content/test/test_li_attributes_reflection.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+  <title>Test for HTMLLIElement attributes reflection</title>
+  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="application/javascript" src="reflect.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+</head>
+<body>
+<p id="display"></p>
+<div id="content" style="display: none">
+</div>
+<pre id="test">
+<script type="application/javascript">
+
+/** Test for HTMLLIElement attributes reflection **/
+
+// .value
+reflectInt({
+  element: document.createElement("li"),
+  attribute: "value",
+  nonNegative: false,
+});
+
+</script>
+</pre>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/content/html/content/test/test_ol_attributes_reflection.html
@@ -0,0 +1,52 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+  <title>Test for HTMLOLElement attributes reflection</title>
+  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="application/javascript" src="reflect.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+</head>
+<body>
+<p id="display"></p>
+<div id="content" style="display: none">
+</div>
+<pre id="test">
+<script type="application/javascript">
+
+/** Test for HTMLOLElement attributes reflection **/
+
+// TODO: .reversed (boolean), bug 601912
+todo("reversed" in document.createElement("ol"), "reversed is not yet implemented");
+
+// .start
+reflectInt({
+  element: document.createElement("ol"),
+  attribute: "start",
+  nonNegative: false,
+  defaultValue: 1,
+});
+
+// TODO: .type (String)
+
+// Additional tests for ol.start behavior when li elements are added
+var ol = document.createElement("ol");
+var li = document.createElement("li");
+li.value = 42;
+ol.appendChild(li);
+is(ol.start, 1, "ol.start with one li child, li.value = 42:");
+li.value = -42;
+is(ol.start, 1, "ol.start with one li child, li.value = 42:");
+ol.removeAttribute("start");
+li.removeAttribute("value");
+ol.appendChild(document.createElement("li"));
+ol.reversed = true;
+todo_is(ol.start, 2, "ol.start with two li children, ol.reversed == true:");
+li.value = 42;
+todo_is(ol.start, 2, "ol.start with two li childern, ol.reversed == true:");
+ol.start = 42;
+is(ol.start, 42, "ol.start = 42:");
+
+</script>
+</pre>
+</body>
+</html>
--- a/editor/libeditor/html/nsHTMLDataTransfer.cpp
+++ b/editor/libeditor/html/nsHTMLDataTransfer.cpp
@@ -134,17 +134,18 @@ static NS_DEFINE_CID(kCParserCID,     NS
 // private clipboard data flavors for html copy/paste
 #define kHTMLContext   "text/_moz_htmlcontext"
 #define kHTMLInfo      "text/_moz_htmlinfo"
 #define kInsertCookie  "_moz_Insert Here_moz_"
 
 #define NS_FOUND_TARGET NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_EDITOR, 3)
 
 // some little helpers
-static PRInt32 FindPositiveIntegerAfterString(const char *aLeadingString, nsCString &aCStr);
+static PRBool FindIntegerAfterString(const char *aLeadingString, 
+                                     nsCString &aCStr, PRInt32 &foundNumber);
 static nsresult RemoveFragComments(nsCString &theStr);
 static void RemoveBodyAndHead(nsIDOMNode *aNode);
 static nsresult FindTargetNode(nsIDOMNode *aStart, nsCOMPtr<nsIDOMNode> &aResult);
 
 static nsCOMPtr<nsIDOMNode> GetListParent(nsIDOMNode* aNode)
 {
   NS_ENSURE_TRUE(aNode, nsnull);
   nsCOMPtr<nsIDOMNode> parent, tmp;
@@ -1144,32 +1145,34 @@ NS_IMETHODIMP nsHTMLEditor::PrepareHTMLT
     }
     (*aTransferable)->AddDataFlavor(kUnicodeMime);
     (*aTransferable)->AddDataFlavor(kMozTextInternal);
   }
   
   return NS_OK;
 }
 
-PRInt32
-FindPositiveIntegerAfterString(const char *aLeadingString, nsCString &aCStr)
+PRBool
+FindIntegerAfterString(const char *aLeadingString, 
+                       nsCString &aCStr, PRInt32 &foundNumber)
 {
   // first obtain offsets from cfhtml str
   PRInt32 numFront = aCStr.Find(aLeadingString);
   if (numFront == -1)
-    return -1;
+    return PR_FALSE;
   numFront += strlen(aLeadingString); 
   
   PRInt32 numBack = aCStr.FindCharInSet(CRLF, numFront);
   if (numBack == -1)
-    return -1;
+    return PR_FALSE;
    
   nsCAutoString numStr(Substring(aCStr, numFront, numBack-numFront));
   PRInt32 errorCode;
-  return numStr.ToInteger(&errorCode);
+  foundNumber = numStr.ToInteger(&errorCode);
+  return PR_TRUE;
 }
 
 nsresult
 RemoveFragComments(nsCString & aStr)
 {
   // remove the StartFragment/EndFragment comments from the str, if present
   PRInt32 startCommentIndx = aStr.Find("<!--StartFragment");
   if (startCommentIndx >= 0)
@@ -1186,25 +1189,47 @@ RemoveFragComments(nsCString & aStr)
       aStr.Cut(endCommentIndx, (endCommentEnd+3)-endCommentIndx);
   }  
   return NS_OK;
 }
 
 nsresult
 nsHTMLEditor::ParseCFHTML(nsCString & aCfhtml, PRUnichar **aStuffToPaste, PRUnichar **aCfcontext)
 {
-  // first obtain offsets from cfhtml str
-  PRInt32 startHTML     = FindPositiveIntegerAfterString("StartHTML:", aCfhtml);
-  PRInt32 endHTML       = FindPositiveIntegerAfterString("EndHTML:", aCfhtml);
-  PRInt32 startFragment = FindPositiveIntegerAfterString("StartFragment:", aCfhtml);
-  PRInt32 endFragment   = FindPositiveIntegerAfterString("EndFragment:", aCfhtml);
+  // First obtain offsets from cfhtml str.
+  PRInt32 startHTML, endHTML, startFragment, endFragment;
+  if (!FindIntegerAfterString("StartHTML:", aCfhtml, startHTML) || 
+      startHTML < -1)
+    return NS_ERROR_FAILURE;
+  if (!FindIntegerAfterString("EndHTML:", aCfhtml, endHTML) || 
+      endHTML < -1) 
+    return NS_ERROR_FAILURE;
+  if (!FindIntegerAfterString("StartFragment:", aCfhtml, startFragment) || 
+      startFragment < 0) 
+    return NS_ERROR_FAILURE;
+  if (!FindIntegerAfterString("EndFragment:", aCfhtml, endFragment) || 
+      startFragment < 0)
+    return NS_ERROR_FAILURE;
 
-  if ((startHTML<0) || (endHTML<0) || (startFragment<0) || (endFragment<0))
-    return NS_ERROR_FAILURE;
- 
+  // The StartHTML and EndHTML markers are allowed to be -1 to include everything.
+  //   See Reference: MSDN doc entitled "HTML Clipboard Format"
+  //   http://msdn.microsoft.com/en-us/library/aa767917(VS.85).aspx#unknown_854
+  if (startHTML == -1) {
+    startHTML = aCfhtml.Find("<!--StartFragment-->");
+    if (startHTML == -1)
+      return PR_FALSE;
+  }
+  if (endHTML == -1) {
+    const char endFragmentMarker[] = "<!--EndFragment-->";
+    endHTML = aCfhtml.Find(endFragmentMarker);
+    if (endHTML == -1)
+      return PR_FALSE;
+    endHTML += NS_ARRAY_LENGTH(endFragmentMarker) - 1;
+  }
+
   // create context string
   nsCAutoString contextUTF8(Substring(aCfhtml, startHTML, startFragment - startHTML) +
                             NS_LITERAL_CSTRING("<!--" kInsertCookie "-->") +
                             Substring(aCfhtml, endFragment, endHTML - endFragment));
 
   // validate startFragment
   // make sure it's not in the middle of a HTML tag
   // see bug #228879 for more details
--- a/editor/libeditor/html/tests/Makefile.in
+++ b/editor/libeditor/html/tests/Makefile.in
@@ -98,16 +98,17 @@ include $(topsrcdir)/config/rules.mk
 		test_root_element_replacement.html \
 		$(NULL)
 
 _DATA_FILES = \
 		data/cfhtml-chromium.txt \
 		data/cfhtml-firefox.txt \
 		data/cfhtml-ie.txt \
 		data/cfhtml-ooo.txt \
+		data/cfhtml-nocontext.txt \
 		$(NULL)
 
 _CHROME_TEST_FILES = \
 		test_contenteditable_text_input_handling.html \
 		test_bug489202.xul \
 		test_bug490879.xul \
 		test_bug607584.xul \
 		test_bug616590.xul \
new file mode 100644
--- /dev/null
+++ b/editor/libeditor/html/tests/data/cfhtml-nocontext.txt
@@ -0,0 +1,18 @@
+Version:0.9
+StartHTML:-1
+EndHTML:-1
+StartFragment:0000000111
+EndFragment:0000000246
+<!--StartFragment-->
+<html>
+  <head>
+    <title>Test</title>
+    
+  </head>
+  <body>
+    <p>
+      3.<b>1415926535897932</b>
+    </p>
+  </body>
+</html>
+<!--EndFragment-->
--- a/editor/libeditor/html/tests/test_CF_HTML_clipboard.html
+++ b/editor/libeditor/html/tests/test_CF_HTML_clipboard.html
@@ -84,16 +84,18 @@ var gTests = [
   // Copied from Firefox
   {fileName: "cfhtml-firefox.txt", expected: "Firefox"},
   // Copied from OpenOffice.org
   {fileName: "cfhtml-ooo.txt", expected: "hello"},
   // Copied from IE
   {fileName: "cfhtml-ie.txt", expected: "browser"},
   // Copied from Chromium
   {fileName: "cfhtml-chromium.txt", expected: "Pacific"},
+  // CF_HTML with no context specified (StartHTML and EndHTML set to -1)
+  {fileName: "cfhtml-nocontext.txt", expected: "3.1415926535897932"},
 ];
 var gTestIndex = 0;
 
 SimpleTest.waitForExplicitFinish();
 
 for (var i = 0; i < gTests.length; ++i) {
   gTests[i].data = loadCF_HTMLdata("data/" + gTests[i].fileName);
 }
--- a/embedding/android/GeckoApp.java
+++ b/embedding/android/GeckoApp.java
@@ -289,19 +289,23 @@ abstract public class GeckoApp
             intent = getIntent();
         final Intent i = intent;
         new Thread() {
             public void run() {
                 try {
                     if (mLibLoadThread != null)
                         mLibLoadThread.join();
                 } catch (InterruptedException ie) {}
-                surfaceView.mSplashStatusMsg =
-                    getResources().getString(R.string.splash_screen_loading);
+
+                // Show the URL we are about to load, if the intent has one
+                if (Intent.ACTION_VIEW.equals(i.getAction())) {
+                    surfaceView.mSplashURL = i.getDataString();
+                }
                 surfaceView.drawSplashScreen();
+
                 // unpack files in the components directory
                 try {
                     unpackComponents();
                 } catch (FileNotFoundException fnfe) {
                     Log.e(LOG_FILE_NAME, "error unpacking components", fnfe);
                     Looper.prepare();
                     showErrorDialog(getString(R.string.error_loading_file));
                     Looper.loop();
@@ -408,21 +412,17 @@ abstract public class GeckoApp
                 Locale locale = Locale.getDefault();
                 GeckoAppShell.loadGeckoLibs(
                     getApplication().getPackageResourcePath());
                 Locale.setDefault(locale);
                 Resources res = getBaseContext().getResources();
                 Configuration config = res.getConfiguration();
                 config.locale = locale;
                 res.updateConfiguration(config, res.getDisplayMetrics());
-
-
             }});
-        surfaceView.mSplashStatusMsg =
-            getResources().getString(R.string.splash_screen_loading);
         mLibLoadThread.start();
     }
 
     @Override
     protected void onNewIntent(Intent intent) {
         if (checkLaunchState(LaunchState.GeckoExiting)) {
             // We're exiting and shouldn't try to do anything else just incase
             // we're hung for some reason we'll force the process to exit
@@ -591,20 +591,16 @@ abstract public class GeckoApp
         File applicationPackage = new File(getApplication().getPackageResourcePath());
         File componentsDir = new File(sGREDir, "components");
         if (componentsDir.lastModified() == applicationPackage.lastModified())
             return;
 
         componentsDir.mkdir();
         componentsDir.setLastModified(applicationPackage.lastModified());
 
-        surfaceView.mSplashStatusMsg =
-                    getResources().getString(R.string.splash_firstrun);
-        surfaceView.drawSplashScreen();
-
         GeckoAppShell.killAnyZombies();
 
         ZipFile zip = new ZipFile(applicationPackage);
 
         byte[] buf = new byte[32768];
         try {
             if (unpackFile(zip, buf, null, "removed-files"))
                 removeFiles();
--- a/embedding/android/GeckoSurfaceView.java
+++ b/embedding/android/GeckoSurfaceView.java
@@ -102,36 +102,89 @@ class GeckoSurfaceView
         super.finalize();
     }
 
     void drawSplashScreen() {
         this.drawSplashScreen(getHolder(), mWidth, mHeight);
     }
 
     void drawSplashScreen(SurfaceHolder holder, int width, int height) {
+        // No splash screen for Honeycomb or greater
+        if (Build.VERSION.SDK_INT >= 11) {
+            Log.i(LOG_FILE_NAME, "skipping splash screen");
+            return;
+        }
+
         Canvas c = holder.lockCanvas();
         if (c == null) {
             Log.i(LOG_FILE_NAME, "canvas is null");
             return;
         }
+
         Resources res = getResources();
-        c.drawColor(res.getColor(R.color.splash_background));
-        Drawable drawable = res.getDrawable(R.drawable.splash);
-        int w = drawable.getIntrinsicWidth();
-        int h = drawable.getIntrinsicHeight();
-        int x = (width - w)/2;
-        int y = (height - h)/2 - 16;
-        drawable.setBounds(x, y, x + w, y + h);
-        drawable.draw(c);
-        Paint p = new Paint();
-        p.setTextAlign(Paint.Align.CENTER);
-        p.setTextSize(32f);
-        p.setAntiAlias(true);
-        p.setColor(res.getColor(R.color.splash_font));
-        c.drawText(GeckoSurfaceView.mSplashStatusMsg, width/2, y + h + 16, p);
+
+        File profiles = new File(GeckoApp.sGREDir, "files/mozilla/profiles.ini");
+        if (profiles.exists() == false) {
+            // Just show the simple splash screen for "new profile" startup
+            c.drawColor(res.getColor(R.color.splash_background));
+            Drawable drawable = res.getDrawable(R.drawable.splash);
+            int w = drawable.getIntrinsicWidth();
+            int h = drawable.getIntrinsicHeight();
+            int x = (width - w) / 2;
+            int y = (height - h) / 2 - 16;
+            drawable.setBounds(x, y, x + w, y + h);
+            drawable.draw(c);
+
+            Paint p = new Paint();
+            p.setTextAlign(Paint.Align.CENTER);
+            p.setTextSize(32f);
+            p.setAntiAlias(true);
+            p.setColor(res.getColor(R.color.splash_msgfont));
+            c.drawText(res.getString(R.string.splash_firstrun), width / 2, y + h + 16, p);
+        } else {
+            // Show the static UI for normal startup
+            DisplayMetrics metrics = new DisplayMetrics();
+            GeckoApp.mAppContext.getWindowManager().getDefaultDisplay().getMetrics(metrics);
+    
+            // Default to DENSITY_HIGH sizes
+            int toolbarHeight = 80;
+            int faviconOffset = 25;
+            float urlHeight = 24f;
+            int urlOffsetX = 80;
+            int urlOffsetY = 48;
+            if (metrics.densityDpi == DisplayMetrics.DENSITY_MEDIUM) {
+                toolbarHeight = 53;
+                faviconOffset = 10;
+                urlHeight = 16f;
+                urlOffsetX = 53;
+                urlOffsetY = 32;
+            }
+    
+            c.drawColor(res.getColor(R.color.splash_content));
+            Drawable toolbar = res.getDrawable(Build.VERSION.SDK_INT > 8 ?
+                                               R.drawable.splash_v9 :
+                                               R.drawable.splash_v8);
+            toolbar.setBounds(0, 0, width, toolbarHeight);
+            toolbar.draw(c);
+    
+            // XUL/CSS always uses 32px width and height for favicon
+            Drawable favicon = res.getDrawable(R.drawable.favicon32);
+            favicon.setBounds(faviconOffset, faviconOffset, 32 + faviconOffset, 32 + faviconOffset);
+            favicon.draw(c);
+    
+            if (GeckoSurfaceView.mSplashURL != "") {
+                TextPaint p = new TextPaint();
+                p.setTextAlign(Paint.Align.LEFT);
+                p.setTextSize(urlHeight);
+                p.setAntiAlias(true);
+                p.setColor(res.getColor(R.color.splash_urlfont));
+                String url = TextUtils.ellipsize(GeckoSurfaceView.mSplashURL, p, width - urlOffsetX * 2, TextUtils.TruncateAt.END).toString();
+                c.drawText(url, urlOffsetX, urlOffsetY, p);
+            }
+        }
         holder.unlockCanvasAndPost(c);
     }
 
     /*
      * Called on main thread
      */
 
     public void draw(SurfaceHolder holder, ByteBuffer buffer) {
@@ -729,17 +782,17 @@ class GeckoSurfaceView
 
     // Are we waiting for a buffer to draw in surfaceChanged?
     boolean mSyncDraw;
 
     // True if gecko requests a buffer
     int mDrawMode;
 
     static boolean mShowingSplashScreen = true;
-    static String  mSplashStatusMsg = "";
+    static String  mSplashURL = "";
 
     // let's not change stuff around while we're in the middle of
     // starting drawing, ending drawing, or changing surface
     // characteristics
     ReentrantLock mSurfaceLock;
 
     // Surface format, from surfaceChanged.  Largely
     // useless.
--- a/embedding/android/locales/en-US/android_strings.dtd
+++ b/embedding/android/locales/en-US/android_strings.dtd
@@ -1,10 +1,9 @@
 
-<!ENTITY  splash_screen_loading "Loading">
 <!ENTITY  splash_firstrun "Setting up &brandShortName;\u2026">
 
 <!ENTITY  no_space_to_start_error "There is not enough space available for &brandShortName; to start.">
 <!ENTITY  error_loading_file "An error occurred when trying to load files required to run &brandShortName;">
 
 <!ENTITY  crash_reporter_title "&brandShortName; Crash Reporter">
 <!ENTITY  crash_message "&brandShortName; has crashed. Your tabs should be listed on the &brandShortName; Start page when you restart.">
 <!ENTITY  crash_help_message "Please help us fix this problem!">
--- a/embedding/android/resources/values/colors.xml
+++ b/embedding/android/resources/values/colors.xml
@@ -1,6 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
   <color name="splash_background">#000000</color>
-  <color name="splash_font">#ffffff</color>
+  <color name="splash_msgfont">#ffffff</color>
+  <color name="splash_urlfont">#000000</color>
+  <color name="splash_content">#ffffff</color>
 </resources>
 
--- a/embedding/android/strings.xml.in
+++ b/embedding/android/strings.xml.in
@@ -1,16 +1,15 @@
 #filter substitution
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE resources [
 #includesubst @BRANDPATH@
 #includesubst @STRINGSPATH@
 ]>
 <resources>
-  <string name="splash_screen_loading">&splash_screen_loading;</string>
   <string name="splash_firstrun">&splash_firstrun;</string>
   <string name="no_space_to_start_error">&no_space_to_start_error;</string>
   <string name="error_loading_file">&error_loading_file;</string>
 
   <string name="crash_reporter_title">&crash_reporter_title;</string>
   <string name="crash_message">&crash_message;</string>
   <string name="crash_help_message">&crash_help_message;</string>
   <string name="crash_send_report_message">&crash_send_report_message;</string>
new file mode 100644
--- /dev/null
+++ b/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/edit-dictionary
@@ -0,0 +1,30 @@
+#!/bin/bash
+#
+# edit-dictionary
+
+# input files:
+HUNSPELL_START=hunspell-en_US-20081205.dic
+HUNSPELL_DIFF=upstream-hunspell.diff
+HUNSPELL_PATCHED=$HUNSPELL_START-patched
+HUNSPELL_PATCHED_STRIPPED=$HUNSPELL_PATCHED-stripped
+
+if [ -z "$EDITOR" ]; then
+  echo 'Need to set the $EDITOR environment variable to your favorite editor!'
+  exit 1
+fi
+
+# Patch Hunspell ($HUNSPELL_START --> $HUNSPELL_PATCHED)
+echo Patching Hunspell dictionary
+cp $HUNSPELL_START $HUNSPELL_PATCHED
+patch $HUNSPELL_PATCHED $HUNSPELL_DIFF
+
+# Open the patched hunspell editor and let the user edit it
+echo "Now the dictionary is going to be opened for you to edit.  When you're done, just quit the editor"
+echo -n "Press Enter to begin."
+read foo
+$EDITOR $HUNSPELL_PATCHED
+# Now, store the hunspell diff in the original diff file
+diff $HUNSPELL_START $HUNSPELL_PATCHED > $HUNSPELL_DIFF
+
+# Clean up
+rm -f $HUNSPELL_PATCHED
--- a/extensions/spellcheck/locales/en-US/hunspell/en-US.aff
+++ b/extensions/spellcheck/locales/en-US/hunspell/en-US.aff
@@ -105,17 +105,17 @@ SFX M   0     's         .
 SFX B Y 3
 SFX B   0     able       [^aeiou]
 SFX B   0     able       ee
 SFX B   e     able       [^aeiou]e
 
 SFX L Y 1
 SFX L   0     ment       .
 
-REP 89
+REP 90
 REP a ei
 REP ei a
 REP a ey
 REP ey a
 REP ai ie
 REP ie ai
 REP alot a_lot
 REP are air
@@ -195,8 +195,9 @@ REP ear air
 REP air ear
 REP w qu
 REP qu w
 REP z ss
 REP ss z
 REP shun tion
 REP shun sion
 REP shun cion
+REP size cise
--- a/gfx/cairo/libpixman/src/pixman-arm-neon-asm-bilinear.S
+++ b/gfx/cairo/libpixman/src/pixman-arm-neon-asm-bilinear.S
@@ -61,16 +61,17 @@
 .text
 .fpu neon
 .arch armv7a
 .object_arch armv4
 .eabi_attribute 10, 0
 .eabi_attribute 12, 0
 .arm
 .altmacro
+.p2align 2
 
 #include "pixman-arm-neon-asm.h"
 
 /*
  * Bilinear macros from pixman-arm-neon-asm.S
  */
 
 /* Supplementary macro for setting function attributes */
--- a/gfx/cairo/libpixman/src/pixman-arm-neon-asm.S
+++ b/gfx/cairo/libpixman/src/pixman-arm-neon-asm.S
@@ -42,16 +42,17 @@
     .text
     .fpu neon
     .arch armv7a
     .object_arch armv4
     .eabi_attribute 10, 0 /* suppress Tag_FP_arch */
     .eabi_attribute 12, 0 /* suppress Tag_Advanced_SIMD_arch */
     .arm
     .altmacro
+    .p2align 2
 
 #include "pixman-arm-neon-asm.h"
 
 /* Global configuration options and preferences */
 
 /*
  * The code can optionally make use of unaligned memory accesses to improve
  * performance of handling leading/trailing pixels for each scanline.
--- a/gfx/cairo/libpixman/src/pixman-arm-simd-asm.S
+++ b/gfx/cairo/libpixman/src/pixman-arm-simd-asm.S
@@ -30,16 +30,17 @@
 .section .note.GNU-stack,"",%progbits
 #endif
 
 	.text
 	.arch armv6
 	.object_arch armv4
 	.arm
 	.altmacro
+	.p2align 2
 
 /* Supplementary macro for setting function attributes */
 .macro pixman_asm_function fname
 	.func fname
 	.global fname
 #ifdef __ELF__
 	.hidden fname
 	.type fname, %function
--- a/ipc/chromium/src/base/atomicops.h
+++ b/ipc/chromium/src/base/atomicops.h
@@ -40,17 +40,21 @@ namespace subtle {
 #endif
 typedef __w64 int32 Atomic32;
 #ifdef ARCH_CPU_64_BITS
 typedef int64 Atomic64;
 #endif
 
 // Use AtomicWord for a machine-sized pointer.  It will use the Atomic32 or
 // Atomic64 routines below, depending on your architecture.
+#if defined(OS_OPENBSD) && !defined(ARCH_CPU_64_BITS)
+typedef Atomic32 AtomicWord;
+#else
 typedef intptr_t AtomicWord;
+#endif
 
 // Atomically execute:
 //      result = *ptr;
 //      if (*ptr == old_value)
 //        *ptr = new_value;
 //      return result;
 //
 // I.e., replace "*ptr" with "new_value" if "*ptr" used to be "old_value".
--- a/ipc/chromium/src/base/debug_util_posix.cc
+++ b/ipc/chromium/src/base/debug_util_posix.cc
@@ -1,22 +1,26 @@
 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 #include "build/build_config.h"
 #include "base/debug_util.h"
 
+#define MOZ_HAVE_EXECINFO_H (!defined(ANDROID) && !defined(__OpenBSD__))
+
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
+#include <limits.h>
 #include <sys/stat.h>
+#include <sys/param.h>
 #include <sys/types.h>
 #include <unistd.h>
-#ifndef ANDROID
+#if MOZ_HAVE_EXECINFO_H
 #include <execinfo.h>
 #include <sys/sysctl.h>
 #endif
 
 #include "base/basictypes.h"
 #include "base/eintr_wrapper.h"
 #include "base/logging.h"
 #include "base/scoped_ptr.h"
@@ -114,17 +118,17 @@ void DebugUtil::BreakDebugger() {
   asm ("int3");
 #endif
 }
 
 StackTrace::StackTrace() {
   const int kMaxCallers = 256;
 
   void* callers[kMaxCallers];
-#ifndef ANDROID
+#if MOZ_HAVE_EXECINFO_H
   int count = backtrace(callers, kMaxCallers);
 #else
   int count = 0;
 #endif
 
   // Though the backtrace API man page does not list any possible negative
   // return values, we still still exclude them because they would break the
   // memcpy code below.
@@ -133,16 +137,16 @@ StackTrace::StackTrace() {
     memcpy(&trace_[0], callers, sizeof(callers[0]) * count);
   } else {
     trace_.resize(0);
   }
 }
 
 void StackTrace::PrintBacktrace() {
   fflush(stderr);
-#ifndef ANDROID
+#if MOZ_HAVE_EXECINFO_H
   backtrace_symbols_fd(&trace_[0], trace_.size(), STDERR_FILENO);
 #endif
 }
 
 void StackTrace::OutputToStream(std::ostream* os) {
   return;
 }
--- a/ipc/chromium/src/base/platform_file_posix.cc
+++ b/ipc/chromium/src/base/platform_file_posix.cc
@@ -1,14 +1,15 @@
 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 #include "base/platform_file.h"
 
+#include <sys/stat.h>
 #include <fcntl.h>
 #include <errno.h>
 #ifdef ANDROID
 #include <linux/stat.h>
 #endif
 
 #include "base/logging.h"
 #include "base/string_util.h"
--- a/ipc/chromium/src/chrome/common/ipc_message_utils.h
+++ b/ipc/chromium/src/chrome/common/ipc_message_utils.h
@@ -163,18 +163,44 @@ struct ParamTraits<unsigned long> {
   }
   static bool Read(const Message* m, void** iter, param_type* r) {
     return m->ReadULong(iter, r);
   }
   static void Log(const param_type& p, std::wstring* l) {
     l->append(StringPrintf(L"%ul", p));
   }
 };
+#if (defined(OS_OPENBSD) && defined(ARCH_CPU_64_BITS))
+// On OpenBSD, uint64_t is unsigned long long
+// see https://bugzilla.mozilla.org/show_bug.cgi?id=648735#c27
+template <>
+struct ParamTraits<unsigned long long> {
+  typedef unsigned long long param_type;
+  static void Write(Message* m, const param_type& p) {
+    m->WriteData(reinterpret_cast<const char*>(&p), sizeof(param_type));
+ }
+  static bool Read(const Message* m, void** iter, param_type* r) {
+    const char *data;
+    int data_size = 0;
+    bool result = m->ReadData(iter, &data, &data_size);
+    if (result && data_size == sizeof(param_type)) {
+      memcpy(r, data, sizeof(param_type));
+    } else {
+      result = false;
+      NOTREACHED();
+    }
+    return result;
+  }
+  static void Log(const param_type& p, std::wstring* l) {
+    l->append(StringPrintf(L"%ull", p));
+  }
+};
+#endif
 
-#if !(defined(OS_MACOSX) || defined(OS_WIN) || (defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)))
+#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)))
 // There size_t is a synonym for |unsigned long| ...
 template <>
 struct ParamTraits<size_t> {
   typedef size_t param_type;
   static void Write(Message* m, const param_type& p) {
     m->WriteSize(p);
   }
   static bool Read(const Message* m, void** iter, param_type* r) {
--- a/js/src/config/rules.mk
+++ b/js/src/config/rules.mk
@@ -1402,19 +1402,20 @@ ifneq ($(PREF_JS_EXPORTS),)
 ifeq (WINNT,$(OS_ARCH))
 PREF_PPFLAGS = --line-endings=crlf
 endif
 
 ifndef NO_DIST_INSTALL
 $(FINAL_TARGET)/$(PREF_DIR):
 	$(NSINSTALL) -D $@
 
-libs:: $(FINAL_TARGET)/$(PREF_DIR) $(PREF_JS_EXPORTS)
+libs:: $(FINAL_TARGET)/$(PREF_DIR)
+libs:: $(PREF_JS_EXPORTS)
 	$(EXIT_ON_ERROR)  \
-	for i in $(PREF_JS_EXPORTS); do \
+	for i in $^; do \
 	  dest=$(FINAL_TARGET)/$(PREF_DIR)/`basename $$i`; \
 	  $(RM) -f $$dest; \
 	  $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $$i > $$dest; \
 	done
 endif
 endif
 
 ################################################################################
@@ -1647,36 +1648,37 @@ ifndef NO_DIST_INSTALL
 	  $(JAR_MANIFEST)
 endif
 endif
 
 ifneq ($(DIST_FILES),)
 $(DIST)/bin:
 	$(NSINSTALL) -D $@
 
-libs:: $(DIST_FILES) $(DIST)/bin
+libs:: $(DIST)/bin
+libs:: $(DIST_FILES)
 	@$(EXIT_ON_ERROR) \
-	for f in $(DIST_FILES); do \
+	for f in $^; do \
 	  dest=$(FINAL_TARGET)/`basename $$f`; \
 	  $(RM) -f $$dest; \
 	  $(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py \
 	    $(XULAPP_DEFINES) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) \
-	    $(srcdir)/$$f > $$dest; \
+	    $$f > $$dest; \
 	done
 endif
 
 ifneq ($(DIST_CHROME_FILES),)
 libs:: $(DIST_CHROME_FILES)
 	@$(EXIT_ON_ERROR) \
-	for f in $(DIST_CHROME_FILES); do \
+	for f in $^; do \
 	  dest=$(FINAL_TARGET)/chrome/`basename $$f`; \
 	  $(RM) -f $$dest; \
 	  $(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py \
 	    $(XULAPP_DEFINES) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) \
-	    $(srcdir)/$$f > $$dest; \
+	    $$f > $$dest; \
 	done
 endif
 
 ifneq ($(XPI_PKGNAME),)
 libs realchrome::
 ifdef STRIP_XPI
 ifndef MOZ_DEBUG
 	@echo "Stripping $(XPI_PKGNAME) package directory..."
--- a/js/src/xpconnect/src/xpccomponents.cpp
+++ b/js/src/xpconnect/src/xpccomponents.cpp
@@ -2994,16 +2994,17 @@ SandboxDump(JSContext *cx, uintN argc, j
     while (c < cEnd) {
         if (*c == '\r')
             *c = '\n';
         c++;
     }
 #endif
 
     fputs(cstr, stderr);
+    fflush(stderr);
     NS_Free(cstr);
     JS_SET_RVAL(cx, vp, JSVAL_TRUE);
     return JS_TRUE;
 }
 
 static JSBool
 SandboxDebug(JSContext *cx, uintN argc, jsval *vp)
 {
--- a/js/src/yarr/pcre/pcre_exec.cpp
+++ b/js/src/yarr/pcre/pcre_exec.cpp
@@ -40,17 +40,16 @@ POSSIBILITY OF SUCH DAMAGE.
 
 /* This module contains jsRegExpExecute(), the externally visible function
 that does pattern matching using an NFA algorithm, following the rules from
 the JavaScript specification. There are also some supporting functions. */
 
 #include "pcre_internal.h"
 
 #include <limits.h>
-#include "yarr/jswtfbridge.h"
 #include "yarr/ASCIICType.h"
 #include "jsarena.h"
 #include "jscntxt.h"
 
 using namespace WTF;
 
 #if !WTF_COMPILER_MSVC && !WTF_COMPILER_SUNPRO
 #define USE_COMPUTED_GOTO_FOR_MATCH_RECURSION
--- a/layout/reftests/svg/dynamic-clipPath-02.svg
+++ b/layout/reftests/svg/dynamic-clipPath-02.svg
@@ -24,14 +24,14 @@
     function startTest() {
       document.addEventListener("MozReftestInvalidate", doTest, false);
       // in case we're not gecko
       setTimeout(doTest, 5000);
     }
 
     function doTest() {
       var clip1 = document.getElementById("clip1");
-      clip1.setAttribute("clipPathUnits", "userSpaceOnUse");
+      clip1.clipPathUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE;
 
       document.documentElement.removeAttribute("class");
     }
   </script>
 </svg>
--- a/layout/reftests/svg/dynamic-marker-03.svg
+++ b/layout/reftests/svg/dynamic-marker-03.svg
@@ -1,9 +1,8 @@
-<?xml version="1.0" encoding="Windows-1252"?>
 <!--
      Any copyright is dedicated to the Public Domain.
      http://creativecommons.org/publicdomain/zero/1.0/
 -->
 <svg xmlns="http://www.w3.org/2000/svg" class="reftest-wait"
   onload="startTest()">
 
   <title>Testing that dynamic changes to preserveAspectRatio are reflected in the marker</title>
--- a/layout/reftests/svg/dynamic-mask-01.svg
+++ b/layout/reftests/svg/dynamic-mask-01.svg
@@ -1,38 +1,49 @@
-<?xml version="1.0" encoding="Windows-1252"?>
 <!--
      Any copyright is dedicated to the Public Domain.
      http://creativecommons.org/publicdomain/zero/1.0/
 -->
 <svg xmlns="http://www.w3.org/2000/svg" version="1.1"
      class="reftest-wait"
      onload="startTest()"
      xmlns:xlink="http://www.w3.org/1999/xlink">
   <title>Testing that dynamic changes to mask attributes are reflected in the mask</title>
 
   <defs>
     <mask id="mask1" width="1" height="1">
       <rect width="1" height="1" fill="white"/>
     </mask>
+    <mask id="mask2" width="1" height="1">
+      <rect width="1" height="1" fill="white"/>
+    </mask>
+    <mask id="mask3" width="1" height="1">
+      <rect width="1" height="1" fill="white"/>
+    </mask>
   </defs>
 
   <rect width="100%" height="100%" fill="lime"/>
 
   <g transform="scale(500)">
     <rect x=".2" y=".2" width=".2" height=".2" fill="red" mask="url(#mask1)"/>
+    <rect x=".4" y=".2" width=".2" height=".2" fill="red" mask="url(#mask2)"/>
+    <rect x=".2" y=".4" width=".2" height=".2" fill="red" mask="url(#mask3)" />
   </g>
 
   <script>
     function startTest() {
       document.addEventListener("MozReftestInvalidate", doTest, false);
       // in case we're not gecko
       setTimeout(doTest, 5000);
     }
 
     function doTest() {
       var mask1 = document.getElementById("mask1");
-      mask1.maskUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE;
+      mask1.width.baseVal.value = 0;
+      var mask2 = document.getElementById("mask2");
+      mask2.height.baseVal.value = 0;
+      var mask3 = document.getElementById("mask3");
+      mask3.maskUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE;
 
       document.documentElement.removeAttribute("class");
     }
   </script>
 </svg>
--- a/layout/reftests/svg/reftest.list
+++ b/layout/reftests/svg/reftest.list
@@ -139,18 +139,17 @@ fails == inline-in-xul-basic-01.xul pass
 == invalid-text-01.svg pass.svg
 == linearGradient-basic-01.svg pass.svg
 == linearGradient-basic-02.svg pass.svg
 == markers-and-group-opacity-01.svg markers-and-group-opacity-01-ref.svg
 == marker-attribute-01.svg pass.svg
 == marker-viewBox-01.svg marker-viewBox-01-ref.svg
 == mask-basic-01.svg pass.svg
 == mask-containing-masked-content-01.svg pass.svg
-# Bug 456323
-# == mask-transformed-01.svg mask-transformed-01-ref.svg
+== mask-transformed-01.svg mask-transformed-01-ref.svg
 == nested-viewBox-01.svg pass.svg
 == nesting-invalid-01.svg nesting-invalid-01-ref.svg
 == objectBoundingBox-and-clipPath.svg pass.svg
 # Bug 588684
 random-if(gtk2Widget) == objectBoundingBox-and-fePointLight-01.svg objectBoundingBox-and-fePointLight-01-ref.svg
 random-if(gtk2Widget) == objectBoundingBox-and-fePointLight-02.svg objectBoundingBox-and-fePointLight-02-ref.svg
 == objectBoundingBox-and-mask.svg pass.svg
 == objectBoundingBox-and-mask-02.svg pass.svg
--- a/layout/svg/base/src/nsSVGMaskFrame.cpp
+++ b/layout/svg/base/src/nsSVGMaskFrame.cpp
@@ -76,23 +76,23 @@ nsSVGMaskFrame::ComputeMaskAlpha(nsSVGRe
     mask->mEnumAttributes[nsSVGMaskElement::MASKUNITS].GetAnimValue();
   gfxRect bbox;
   if (units == nsIDOMSVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
     bbox = nsSVGUtils::GetBBox(aParent);
   }
 
   gfxRect maskArea = nsSVGUtils::GetRelativeRect(units,
     &mask->mLengthAttributes[nsSVGMaskElement::X], bbox, aParent);
-  maskArea.RoundOut();
 
   gfxContext *gfx = aContext->GetGfxContext();
 
   gfx->Save();
   nsSVGUtils::SetClipRect(gfx, aMatrix, maskArea);
   gfxRect clipExtents = gfx->GetClipExtents();
+  clipExtents.RoundOut();
   gfx->Restore();
 
 #ifdef DEBUG_tor
   fprintf(stderr, "clip extent: %f,%f %fx%f\n",
           clipExtents.X(), clipExtents.Y(),
           clipExtents.Width(), clipExtents.Height());
 #endif
 
--- a/mobile/branding/aurora/android-resources.mn
+++ b/mobile/branding/aurora/android-resources.mn
@@ -1,3 +1,6 @@
 mobile/app/android/drawable/alertaddons.png
 mobile/app/android/drawable/alertdownloads.png
 mobile/branding/aurora/content/splash.png
+mobile/branding/aurora/content/splash_v9.9.png
+mobile/branding/aurora/content/splash_v8.9.png
+mobile/branding/aurora/content/favicon32.png
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..418337f7de31d8031764941a54bfe00b78e2681a
GIT binary patch
literal 868
zc%17D@N?(olHy`uVBq!ia0vp^r9f=X!3HFarm)^-U|`nvba4!+xb^nVUGK?-BJ2hK
z4?CQlb8h-t?U##`vc4sGmWfN;EzvEx%6+4?BZJe+F>ylI7R}<keK}XXQZL)yI&ZtY
zc-}LK)D6q)j@|rb`yn-azy6%(j~}o5mYtO~XW=rpS$!8Oon9$Buxc@du&g*y@0QEQ
z^3o^TA@SDArN%F6U%lHh{aN3G{R_91w!e7xKwznn=OwH6_x7yq^oyPx<zJ<i^jO+d
zfa~(!g}<K~T`vvQvoy917M^Ri?2^JEGufOF)2s#NJ`cHTR~bqReht4<5I;XXRP@!&
z1asA}>np^T2?nnGGEenU_Po%mE23xm{4@wCJ=Aq^e!xqYD<y3Ct3C-TFJKZ~0d!nI
zBUcDM<|^JRx^A{gcUQ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@
 mobile/app/android/drawable/alertaddons.png
 mobile/app/android/drawable/alertdownloads.png
 mobile/branding/beta/content/splash.png
+mobile/branding/beta/content/splash_v9.9.png
+mobile/branding/beta/content/splash_v8.9.png
+mobile/branding/beta/content/favicon32.png
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..418337f7de31d8031764941a54bfe00b78e2681a
GIT binary patch
literal 868
zc%17D@N?(olHy`uVBq!ia0vp^r9f=X!3HFarm)^-U|`nvba4!+xb^nVUGK?-BJ2hK
z4?CQlb8h-t?U##`vc4sGmWfN;EzvEx%6+4?BZJe+F>ylI7R}<keK}XXQZL)yI&ZtY
zc-}LK)D6q)j@|rb`yn-azy6%(j~}o5mYtO~XW=rpS$!8Oon9$Buxc@du&g*y@0QEQ
z^3o^TA@SDArN%F6U%lHh{aN3G{R_91w!e7xKwznn=OwH6_x7yq^oyPx<zJ<i^jO+d
zfa~(!g}<K~T`vvQvoy917M^Ri?2^JEGufOF)2s#NJ`cHTR~bqReht4<5I;XXRP@!&
z1asA}>np^T2?nnGGEenU_Po%mE23xm{4@wCJ=Aq^e!xqYD<y3Ct3C-TFJKZ~0d!nI
zBUcDM<|^JRx^A{gcUQ7pxKrsRs9e87x+lw{ypJ)adu|@<s!xB9o)FKHTJh?;|8G~{
z4~<OnS7dJHPGaoI-gsHJRA}XW`-jq|Qx%^#gd7)<d?3m!6ZytQt5nSM@4uuc{H7;Y
z@U857xc}P8m6Gp+i=St@_A~(Py(a(am6c`n{m|nwyX+bHy2Y%!m->Z6bj(}gbT3f$
zu>{);)#8LVrE*iOWEa=f8-8k)ddhseCZM?J&x7R>3G)?mO1-9+cy0gocX3@{a!rEz
z^A&#kn68FBH(XVcec%3>bm`2%?Xp)-K9@{r3jE%?)$ipbzn9nc?U(rJez!1Wc~6wV
zHLInodsfxdFJRibEr44rkh`?0>XH7*@W+wArs!UHzP|5P&23YYa|}Celh+3CS`xg=
z^u3<h#vf^4S3IwBGWqj?G52|gQKWnBChN9i5((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6Pseh1}ZY!z|P&Nvb<?{nhj?jrb<HR70D(?pHxu_)T(xW+L7s4`4TCl*n&B
zY;SK<4*|vn%meh63GFsKJbD<FQR3*^`Fke+=0hUv-QV@~b=x-|zP<Zh_sTbof87TC
z|6k{i2b+bKYp-7aGc=YLFB^Ece}wH0KxH4`V(^b=eKeab+}+uOW~+?^Em*N6#11YG
zvTbGMQ`;wZKKuL&d{jHZ-NPqjyT4as&lREN+7G+G3?2KibL`&zU93NQo~(~-qI~_$
z_jvHAo&-x-*q<K1!pm2020ytobn?ru?&9+X;_=DfWc%aU8}^)*w*F^BeUB&gm+n3s
zpEU4k{RPx&zhm}Qp}=^+(nq%4`{@u*{%RG*9Ye3c-fgEH^|W+*MPzDD{l5F&`*{7v
zZM<^rrrSW+_s@mSyEHy6FtoYrE?v0}7cXAIrCZBz`Ra{OAJUlm_rvAoJNUteAHlVc
zmo#`m(I?e6cOUL~_%!&*tvh((!aI6LssACz>eH~3|7qABuc}YO&eI1ct2P_0lGIt2
d)M}fd?SHXM2uC(l9k~Di002ovPDHLkV1iVPXY~L8
--- a/mobile/branding/nightly/android-resources.mn
+++ b/mobile/branding/nightly/android-resources.mn
@@ -1,3 +1,6 @@
 mobile/app/android/drawable/alertaddons.png
 mobile/app/android/drawable/alertdownloads.png
 mobile/branding/nightly/content/splash.png
+mobile/branding/nightly/content/splash_v9.9.png
+mobile/branding/nightly/content/splash_v8.9.png
+mobile/branding/nightly/content/favicon32.png
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..418337f7de31d8031764941a54bfe00b78e2681a
GIT binary patch
literal 868
zc%17D@N?(olHy`uVBq!ia0vp^r9f=X!3HFarm)^-U|`nvba4!+xb^nVUGK?-BJ2hK
z4?CQlb8h-t?U##`vc4sGmWfN;EzvEx%6+4?BZJe+F>ylI7R}<keK}XXQZL)yI&ZtY
zc-}LK)D6q)j@|rb`yn-azy6%(j~}o5mYtO~XW=rpS$!8Oon9$Buxc@du&g*y@0QEQ
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@mSyEHy6FtoYrE?v0}7cXAIrCZBz`Ra{OAJUlm_rvAoJNUteAHlVc
zmo#`m(I?e6cOUL~_%!&*tvh((!aI6LssACz>eH~3|7qABuc}YO&eI1ct2P_0lGIt2
d)M}fd?SHXM2uC(l9k~Di002ovPDHLkV1iVPXY~L8
--- a/mobile/branding/official/android-resources.mn
+++ b/mobile/branding/official/android-resources.mn
@@ -1,3 +1,6 @@
 mobile/app/android/drawable/alertaddons.png
 mobile/app/android/drawable/alertdownloads.png
 mobile/branding/official/content/splash.png
+mobile/branding/official/content/splash_v9.9.png
+mobile/branding/official/content/splash_v8.9.png
+mobile/branding/official/content/favicon32.png
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..418337f7de31d8031764941a54bfe00b78e2681a
GIT binary patch
literal 868
zc%17D@N?(olHy`uVBq!ia0vp^r9f=X!3HFarm)^-U|`nvba4!+xb^nVUGK?-BJ2hK
z4?CQlb8h-t?U##`vc4sGmWfN;EzvEx%6+4?BZJe+F>ylI7R}<keK}XXQZL)yI&ZtY
zc-}LK)D6q)j@|rb`yn-azy6%(j~}o5mYtO~XW=rpS$!8Oon9$Buxc@du&g*y@0QEQ
z^3o^TA@SDArN%F6U%lHh{aN3G{R_91w!e7xKwznn=OwH6_x7yq^oyPx<zJ<i^jO+d
zfa~(!g}<K~T`vvQvoy917M^Ri?2^JEGufOF)2s#NJ`cHTR~bqReht4<5I;XXRP@!&
z1asA}>np^T2?nnGGEenU_Po%mE23xm{4@wCJ=Aq^e!xqYD<y3Ct3C-TFJKZ~0d!nI
zBUcDM<|^JRx^A{gcUQ7pxKrsRs9e87x+lw{ypJ)adu|@<s!xB9o)FKHTJh?;|8G~{
z4~<OnS7dJHPGaoI-gsHJRA}XW`-jq|Qx%^#gd7)<d?3m!6ZytQt5nSM@4uuc{H7;Y
z@U857xc}P8m6Gp+i=St@_A~(Py(a(am6c`n{m|nwyX+bHy2Y%!m->Z6bj(}gbT3f$
zu>{);)#8LVrE*iOW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d&n
z#oRz7^pmLH&?=3q@-<~C)_67KhXfp@a_fGB5{7c@sdXGeOK-{=r6{Jl&(orMW0L+U
znVLLJ7*i%WuaysFdB3GFwS-u0YC@XWI^l`T{aS2F(fnujN}nS4i=)W>#@NzP<bGME
zYSvY?PEd>uN>QP&?IXn07%Zu<Q`=Z7^h>PfpW6!k<mxvvzKWvN0Hl`QG?E&+w^sdH
zv82L2l6Pseh1}ZY!z|P&Nvb<?{nhj?jrb<HR70D(?pHxu_)T(xW+L7s4`4TCl*n&B
zY;SK<4*|vn%meh63GFsKJbD<FQR3*^`Fke+=0hUv-QV@~b=x-|zP<Zh_sTbof87TC
z|6k{i2b+bKYp-7aGc=YLFB^Ece}wH0KxH4`V(^b=eKeab+}+uOW~+?^Em*N6#11YG
zvTbGMQ`;wZKKuL&d{jHZ-NPqjyT4as&lREN+7G+G3?2KibL`&zU93NQo~(~-qI~_$
z_jvHAo&-x-*q<K1!pm2020ytobn?ru?&9+X;_=DfWc%aU8}^)*w*F^BeUB&gm+n3s
zpEU4k{RPx&zhm}Qp}=^+(nq%4`{@u*{%RG*9Ye3c-fgEH^|W+*MPzDD{l5F&`*{7v
zZM<^rrrSW+_s@mSyEHy6FtoYrE?v0}7cXAIrCZBz`Ra{OAJUlm_rvAoJNUteAHlVc
zmo#`m(I?e6cOUL~_%!&*tvh((!aI6LssACz>eH~3|7qABuc}YO&eI1ct2P_0lGIt2
d)M}fd?SHXM2uC(l9k~Di002ovPDHLkV1iVPXY~L8
--- a/mobile/branding/unofficial/android-resources.mn
+++ b/mobile/branding/unofficial/android-resources.mn
@@ -1,3 +1,6 @@
 mobile/app/android/drawable/alertaddons.png
 mobile/app/android/drawable/alertdownloads.png
 mobile/branding/unofficial/content/splash.png
+mobile/branding/unofficial/content/splash_v9.9.png
+mobile/branding/unofficial/content/splash_v8.9.png
+mobile/branding/unofficial/content/favicon32.png
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..418337f7de31d8031764941a54bfe00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#11YG
zvTbGMQ`;wZKKuL&d{jHZ-NPqjyT4as&lREN+7G+G3?2KibL`&zU93NQo~(~-qI~_$
z_jvHAo&-x-*q<K1!pm2020ytobn?ru?&9+X;_=DfWc%aU8}^)*w*F^BeUB&gm+n3s
zpEU4k{RPx&zhm}Qp}=^+(nq%4`{@u*{%RG*9Ye3c-fgEH^|W+*MPzDD{l5F&`*{7v
zZM<^rrrSW+_s@mSyEHy6FtoYrE?v0}7cXAIrCZBz`Ra{OAJUlm_rvAoJNUteAHlVc
zmo#`m(I?e6cOUL~_%!&*tvh((!aI6LssACz>eH~3|7qABuc}YO&eI1ct2P_0lGIt2
d)M}fd?SHXM2uC(l9k~Di002ovPDHLkV1iVPXY~L8
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -470,22 +470,16 @@ var BrowserUI = {
       Elements.tabs.addEventListener("TabOpen", BrowserUI, true);
       Elements.tabs.addEventListener("TabRemove", BrowserUI, true);
 
       // Init the tool panel views
       ExtensionsView.init();
       DownloadsView.init();
       ConsoleView.init();
 
-      if (Services.prefs.getBoolPref("browser.tabs.remote")) {
-          // Pre-start the content process
-          Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime)
-                                           .ensureContentProcess();
-      }
-
 #ifdef MOZ_SERVICES_SYNC
       // Init the sync system
       WeaveGlue.init();
 #endif
 
       Services.prefs.addObserver("browser.ui.layout.tablet", BrowserUI, false);
       Services.obs.addObserver(BrowserSearch, "browser-search-engine-modified", false);
       messageManager.addMessageListener("Browser:MozApplicationManifest", OfflineApps);
--- a/mobile/themes/core/honeycomb/browser.css
+++ b/mobile/themes/core/honeycomb/browser.css
@@ -201,18 +201,19 @@ toolbarbutton.urlbar-button {
 
 /* Main urlbar textbox */
 #urlbar-title.placeholder {
   color: @color_text_placeholder@;
 }
 
 #urlbar-edit,
 #urlbar-title {
+  font-size: @font_snormal@ !important;
   background: @color_toolbar_background@;
-  padding: @padding_xxxnormal@ 0px @padding_xsmall@ 0px;
+  padding: @padding_xxnormal@ @padding_normal@;
   margin: 0px !important;
   min-height: @urlbar_edit_height@ !important;
   max-height: @urlbar_edit_height@;
 }
 
 #urlbar-title {
   background-image: url("chrome://browser/skin/images/urlbar-border-side.png"),
                     url("chrome://browser/skin/images/urlbar-border-bottom.png");
--- a/netwerk/base/src/nsIOService.cpp
+++ b/netwerk/base/src/nsIOService.cpp
@@ -229,17 +229,17 @@ nsIOService::Init()
     }
     
     // Register for profile change notifications
     nsCOMPtr<nsIObserverService> observerService =
         mozilla::services::GetObserverService();
     if (observerService) {
         observerService->AddObserver(this, kProfileChangeNetTeardownTopic, PR_TRUE);
         observerService->AddObserver(this, kProfileChangeNetRestoreTopic, PR_TRUE);
-        observerService->AddObserver(this, NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID, PR_TRUE);
+        observerService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_TRUE);
         observerService->AddObserver(this, NS_NETWORK_LINK_TOPIC, PR_TRUE);
     }
     else
         NS_WARNING("failed to get observer service");
         
     NS_TIME_FUNCTION_MARK("Registered observers");
 
     // Get the allocator ready
@@ -964,17 +964,17 @@ nsIOService::Observe(nsISupports *subjec
         if (mOfflineForProfileChange) {
             mOfflineForProfileChange = PR_FALSE;
             if (!mManageOfflineStatus ||
                 NS_FAILED(TrackNetworkLinkStatusForOffline())) {
                 SetOffline(PR_FALSE);
             }
         } 
     }
-    else if (!strcmp(topic, NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID)) {
+    else if (!strcmp(topic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) {
         // Remember we passed XPCOM shutdown notification to prevent any
         // changes of the offline status from now. We must not allow going
         // online after this point.
         mShutdown = PR_TRUE;
 
         SetOffline(PR_TRUE);
 
         // Break circular reference.
--- a/netwerk/base/src/nsProtocolProxyService.cpp
+++ b/netwerk/base/src/nsProtocolProxyService.cpp
@@ -301,17 +301,18 @@ NS_IMPL_QUERY_INTERFACE3_CI(nsProtocolPr
                             nsIProtocolProxyService,
                             nsIProtocolProxyService2,
                             nsIObserver)
 NS_IMPL_CI_INTERFACE_GETTER2(nsProtocolProxyService,
                              nsIProtocolProxyService,
                              nsIProtocolProxyService2)
 
 nsProtocolProxyService::nsProtocolProxyService()
-    : mFilters(nsnull)
+    : mFilterLocalHosts(PR_FALSE)
+    , mFilters(nsnull)
     , mProxyConfig(PROXYCONFIG_DIRECT)
     , mHTTPProxyPort(-1)
     , mFTPProxyPort(-1)
     , mHTTPSProxyPort(-1)
     , mSOCKSProxyPort(-1)
     , mSOCKSProxyVersion(4)
     , mSOCKSProxyRemoteDNS(PR_FALSE)
     , mPACMan(nsnull)
@@ -538,16 +539,22 @@ nsProtocolProxyService::CanUseProxy(nsIU
             memcpy(&ipv6, &addr.ipv6.ip, sizeof(PRIPv6Addr));
         }
         else {
             NS_WARNING("unknown address family");
             return PR_TRUE; // allow proxying
         }
     }
     
+    // Don't use proxy for local hosts (plain hostname, no dots)
+    if (!is_ipaddr && mFilterLocalHosts && (kNotFound == host.FindChar('.'))) {
+        LOG(("Not using proxy for this local host [%s]!\n", host.get()));
+        return PR_FALSE; // don't allow proxying
+    }
+
     PRInt32 index = -1;
     while (++index < PRInt32(mHostFiltersArray.Length())) {
         HostInfo *hinfo = mHostFiltersArray[index];
 
         if (is_ipaddr != hinfo->is_ipaddr)
             continue;
         if (hinfo->port && hinfo->port != port)
             continue;
@@ -844,18 +851,20 @@ nsProtocolProxyService::Resolve(nsIURI *
 {
     nsProtocolInfo info;
     nsresult rv = GetProtocolInfo(uri, &info);
     if (NS_FAILED(rv))
         return rv;
 
     PRBool usePAC;
     rv = Resolve_Internal(uri, info, flags, &usePAC, result);
-    if (NS_FAILED(rv))
+    if (NS_FAILED(rv)) {
+        LOG(("Resolve_Internal returned rv(0x%08x)\n", rv));
         return rv;
+    }
 
     if (usePAC && mPACMan) {
         NS_ASSERTION(*result == nsnull, "we should not have a result yet");
 
         // If the caller didn't want us to invoke PAC, then error out.
         if (flags & RESOLVE_NON_BLOCKING)
             return NS_BASE_STREAM_WOULD_BLOCK;
 
@@ -1064,16 +1073,18 @@ nsProtocolProxyService::LoadHostFilters(
 
     if (!filters)
         return; // fail silently...
 
     //
     // filter  = ( host | domain | ipaddr ["/" mask] ) [":" port] 
     // filters = filter *( "," LWS filter)
     //
+    // Reset mFilterLocalHosts - will be set to true if "<local>" is in pref string
+    mFilterLocalHosts = PR_FALSE;
     while (*filters) {
         // skip over spaces and ,
         while (*filters && (*filters == ',' || IS_ASCII_SPACE(*filters)))
             filters++;
 
         const char *starthost = filters;
         const char *endhost = filters + 1; // at least that...
         const char *portLocation = 0; 
@@ -1086,28 +1097,37 @@ nsProtocolProxyService::LoadHostFilters(
                 maskLocation = endhost;
             else if (*endhost == ']') // IPv6 address literals
                 portLocation = 0;
             endhost++;
         }
 
         filters = endhost; // advance iterator up front
 
-        HostInfo *hinfo = new HostInfo();
-        if (!hinfo)
-            return; // fail silently
-        hinfo->port = portLocation ? atoi(portLocation + 1) : 0;
-
         // locate end of host
         const char *end = maskLocation ? maskLocation :
                           portLocation ? portLocation :
                           endhost;
 
         nsCAutoString str(starthost, end - starthost);
 
+        // If the current host filter is "<local>", then all local (i.e.
+        // no dots in the hostname) hosts should bypass the proxy
+        if (str.EqualsIgnoreCase("<local>")) {
+            mFilterLocalHosts = PR_TRUE;
+            LOG(("loaded filter for local hosts "
+                 "(plain host names, no dots)\n"));
+            // Continue to next host filter;
+            continue;
+        }
+
+        // For all other host filters, create HostInfo object and add to list
+        HostInfo *hinfo = new HostInfo();
+        hinfo->port = portLocation ? atoi(portLocation + 1) : 0;
+
         PRNetAddr addr;
         if (PR_StringToNetAddr(str.get(), &addr) == PR_SUCCESS) {
             hinfo->is_ipaddr   = PR_TRUE;
             hinfo->ip.family   = PR_AF_INET6; // we always store address as IPv6
             hinfo->ip.mask_len = maskLocation ? atoi(maskLocation + 1) : 128;
 
             if (hinfo->ip.mask_len == 0) {
                 NS_WARNING("invalid mask");
--- a/netwerk/base/src/nsProtocolProxyService.h
+++ b/netwerk/base/src/nsProtocolProxyService.h
@@ -348,16 +348,19 @@ protected:
 
       FilterLink(PRUint32 p, nsIProtocolProxyFilter *f)
         : next(nsnull), position(p), filter(f) {}
 
       // Chain deletion to simplify cleaning up the filter links
       ~FilterLink() { if (next) delete next; }
     };
 
+    // Indicates if local hosts (plain hostnames, no dots) should use the proxy
+    PRBool mFilterLocalHosts;
+
     // Holds an array of HostInfo objects
     nsTArray<nsAutoPtr<HostInfo> > mHostFiltersArray;
 
     // Points to the start of a sorted by position, singly linked list
     // of FilterLink objects.
     FilterLink                  *mFilters;
 
     PRUint32                     mProxyConfig;
--- a/netwerk/base/src/nsStandardURL.cpp
+++ b/netwerk/base/src/nsStandardURL.cpp
@@ -850,21 +850,33 @@ nsStandardURL::ParsePath(const char *spe
         mExtension.mPos += mFilepath.mPos;
     }
     return NS_OK;
 }
 
 char *
 nsStandardURL::AppendToSubstring(PRUint32 pos,
                                  PRInt32 len,
-                                 const char *tail,
-                                 PRInt32 tailLen)
+                                 const char *tail)
 {
-    if (tailLen < 0)
-        tailLen = strlen(tail);
+    // Verify pos and length are within boundaries
+    if (pos > mSpec.Length())
+        return NULL;
+    if (len < 0)
+        return NULL;
+    if ((PRUint32)len > (mSpec.Length() - pos))
+        return NULL;
+    if (!tail)
+        return NULL;
+
+    PRUint32 tailLen = strlen(tail);
+
+    // Check for int overflow for proposed length of combined string
+    if (PR_UINT32_MAX - ((PRUint32)len + 1) < tailLen)
+        return NULL;
 
     char *result = (char *) NS_Alloc(len + tailLen + 1);
     if (result) {
         memcpy(result, mSpec.get() + pos, len);
         memcpy(result + len, tail, tailLen);
         result[len + tailLen] = '\0';
     }
     return result;
--- a/netwerk/base/src/nsStandardURL.h
+++ b/netwerk/base/src/nsStandardURL.h
@@ -209,17 +209,17 @@ private:
     PRBool   SegmentIs(const URLSegment &s1, const char *val, const URLSegment &s2, PRBool ignoreCase = PR_FALSE);
 
     PRInt32  ReplaceSegment(PRUint32 pos, PRUint32 len, const char *val, PRUint32 valLen);
     PRInt32  ReplaceSegment(PRUint32 pos, PRUint32 len, const nsACString &val);
 
     nsresult ParseURL(const char *spec, PRInt32 specLen);
     nsresult ParsePath(const char *spec, PRUint32 pathPos, PRInt32 pathLen = -1);
 
-    char    *AppendToSubstring(PRUint32 pos, PRInt32 len, const char *tail, PRInt32 tailLen = -1);
+    char    *AppendToSubstring(PRUint32 pos, PRInt32 len, const char *tail);
 
     // dependent substring helpers
     const nsDependentCSubstring Segment(PRUint32 pos, PRInt32 len); // see below
     const nsDependentCSubstring Segment(const URLSegment &s) { return Segment(s.mPos, s.mLen); }
 
     // dependent substring getters
     const nsDependentCSubstring Prepath();  // see below
     const nsDependentCSubstring Scheme()    { return Segment(mScheme); }
--- a/netwerk/streamconv/converters/nsMultiMixedConv.cpp
+++ b/netwerk/streamconv/converters/nsMultiMixedConv.cpp
@@ -480,16 +480,18 @@ nsMultiMixedConv::OnDataAvailable(nsIReq
     NS_ASSERTION(request, "multimixed converter needs a request");
 
     nsCOMPtr<nsIChannel> channel = do_QueryInterface(request, &rv);
     if (NS_FAILED(rv)) return rv;
 
     // fill buffer
     {
         bufLen = count + mBufLen;
+        NS_ENSURE_TRUE((bufLen >= count) && (bufLen >= mBufLen),
+                       NS_ERROR_FAILURE);
         buffer = (char *) malloc(bufLen);
         if (!buffer)
             return NS_ERROR_OUT_OF_MEMORY;
 
         if (mBufLen) {
             // incorporate any buffered data into the parsing
             memcpy(buffer, mBuffer, mBufLen);
             free(mBuffer);
--- a/netwerk/test/unit/test_protocolproxyservice.js
+++ b/netwerk/test/unit/test_protocolproxyservice.js
@@ -379,24 +379,98 @@ function run_pac_cancel_test() {
   prefs.setIntPref("network.proxy.type", 2);
   prefs.setCharPref("network.proxy.autoconfig_url", pac);
 
   var req = pps.asyncResolve(uri, 0, new TestResolveCancelationCallback());
   req.cancel(Components.results.NS_ERROR_ABORT);
   do_test_pending();
 }
 
+function check_host_filters(hostList, bShouldBeFiltered) {
+  var uri;
+  var proxy;
+  for (var i=0; i<hostList.length; i++) {
+    dump("*** uri=" + hostList[i] + " bShouldBeFiltered=" + bShouldBeFiltered + "\n");
+    uri = ios.newURI(hostList, null, null);
+    proxy = pps.resolve(uri, 0); 
+    if (bShouldBeFiltered) {
+      do_check_eq(proxy, null);
+    } else {
+      do_check_neq(proxy, null);
+      // Just to be sure, let's check that the proxy is correct
+      // - this should match the proxy setup in the calling function
+      check_proxy(proxy, "http", "foopy", 8080, 0, -1, false);
+    }
+  }
+}
+
+
+// Verify that hists in the host filter list are not proxied
+// refers to "network.proxy.no_proxies_on"
+
+function run_proxy_host_filters_test() {
+  // Get prefs object from DOM
+  var prefs = Components.classes["@mozilla.org/preferences-service;1"]
+                        .getService(Components.interfaces.nsIPrefBranch);
+  // Setup a basic HTTP proxy configuration
+  // - pps.resolve() needs this to return proxy info for non-filtered hosts
+  prefs.setIntPref("network.proxy.type", 1);
+  prefs.setCharPref("network.proxy.http", "foopy");
+  prefs.setIntPref("network.proxy.http_port", 8080);
+
+  // Setup host filter list string for "no_proxies_on"
+  var hostFilterList = "www.mozilla.org, www.google.com, www.apple.com, "
+                       + ".domain, .domain2.org"
+  prefs.setCharPref("network.proxy.no_proxies_on", hostFilterList);
+  do_check_eq(prefs.getCharPref("network.proxy.no_proxies_on"), hostFilterList);
+  
+  var rv;
+  // Check the hosts that should be filtered out
+  var uriStrFilterList = [ "http://www.mozilla.org/",
+                           "http://www.google.com/",
+                           "http://www.apple.com/",
+                           "http://somehost.domain/",
+                           "http://someotherhost.domain/",
+                           "http://somehost.domain2.org/",
+                           "http://somehost.subdomain.domain2.org/" ];
+  check_host_filters(uriStrFilterList, true);
+
+  // Check the hosts that should be proxied
+  var uriStrUseProxyList = [ "http://www.mozilla.com/",
+                             "http://mail.google.com/",
+                             "http://somehost.domain.co.uk/",
+                             "http://somelocalhost/" ];  
+  check_host_filters(uriStrUseProxyList, false);
+  
+  // Set no_proxies_on to include local hosts
+  prefs.setCharPref("network.proxy.no_proxies_on", hostFilterList + ", <local>");
+  do_check_eq(prefs.getCharPref("network.proxy.no_proxies_on"),
+              hostFilterList + ", <local>");
+
+  // Amend lists - move local domain to filtered list
+  uriStrFilterList.push(uriStrUseProxyList.pop());
+  check_host_filters(uriStrFilterList, true);
+  check_host_filters(uriStrUseProxyList, false);
+
+  // Cleanup
+  prefs.setCharPref("network.proxy.no_proxies_on", "");
+  do_check_eq(prefs.getCharPref("network.proxy.no_proxies_on"), "");  
+
+  do_test_finished();
+}
+
 function run_test() {
   register_test_protocol_handler();
   run_filter_test();
   run_filter_test2();
   run_pref_test();
   run_pac_test();
   // additional tests may be added to run_test_continued
 }
 
 function run_test_continued() {
   run_pac_cancel_test();
   // additional tests may be added to run_test_continued_2
 }
 
 function run_test_continued_2() {
+  run_proxy_host_filters_test();
 }
--- a/other-licenses/android/APKOpen.cpp
+++ b/other-licenses/android/APKOpen.cpp
@@ -427,17 +427,17 @@ static void * mozload(const char * path,
 
   struct cdir_entry *entry = find_cdir_entry(cdir_start, cdir_entries, path);
   struct local_file_header *file = (struct local_file_header *)((char *)zip + letoh32(entry->offset));
   void * data = ((char *)&file->data) + letoh16(file->filename_size) + letoh16(file->extra_field_size);
   void * handle;
 
   if (extractLibs) {
     char fullpath[PATH_MAX];
-    snprintf(fullpath, PATH_MAX, "%s/%s", getenv("CACHE_PATH"), path + 4);
+    snprintf(fullpath, PATH_MAX, "%s/%s", getenv("CACHE_PATH"), path);
     __android_log_print(ANDROID_LOG_ERROR, "GeckoLibLoad", "resolved %s to %s", path, fullpath);
     extractFile(fullpath, entry, data);
     handle = __wrap_dlopen(fullpath, RTLD_LAZY);
     if (!handle)
       __android_log_print(ANDROID_LOG_ERROR, "GeckoLibLoad", "Couldn't load %s because %s", fullpath, __wrap_dlerror());
 #ifdef DEBUG
     gettimeofday(&t1, 0);
     __android_log_print(ANDROID_LOG_ERROR, "GeckoLibLoad", "%s: spent %d", path,
@@ -451,43 +451,43 @@ static void * mozload(const char * path,
 
   size_t offset = letoh32(entry->offset) + sizeof(*file) + letoh16(file->filename_size) + letoh16(file->extra_field_size);
   bool skipLibCache = false;
   int fd = zip_fd;
   void * buf = NULL;
   uint32_t lib_size = letoh32(entry->uncompressed_size);
   int cache_fd = 0;
   if (letoh16(file->compression) == DEFLATE) {
-    cache_fd = lookupLibCacheFd(path + 4);
+    cache_fd = lookupLibCacheFd(path);
     fd = cache_fd;
     if (fd < 0) {
       char fullpath[PATH_MAX];
-      snprintf(fullpath, PATH_MAX, "%s/%s", getenv("CACHE_PATH"), path + 4);
+      snprintf(fullpath, PATH_MAX, "%s/%s", getenv("CACHE_PATH"), path);
       fd = open(fullpath, O_RDWR);
       struct stat status;
       if (stat(fullpath, &status) ||
           status.st_size != lib_size ||
           apk_mtime > status.st_mtime) {
         unlink(fullpath);
         fd = -1;
       } else {
         cache_fd = fd;
-        addLibCacheFd(path + 4, fd);
+        addLibCacheFd(path, fd);
       }
     }
     if (fd < 0)
       fd = createAshmem(lib_size, path);
 #ifdef DEBUG
     else
-      __android_log_print(ANDROID_LOG_ERROR, "GeckoLibLoad", "Loading %s from cache", path + 4);
+      __android_log_print(ANDROID_LOG_ERROR, "GeckoLibLoad", "Loading %s from cache", path);
 #endif
     if (fd < 0) {
       __android_log_print(ANDROID_LOG_ERROR, "GeckoLibLoad", "Couldn't open " ASHMEM_NAME_DEF ", Error %d, %s, using a file", errno, strerror(errno));
       char fullpath[PATH_MAX];
-      snprintf(fullpath, PATH_MAX, "%s/%s", getenv("CACHE_PATH"), path + 4);
+      snprintf(fullpath, PATH_MAX, "%s/%s", getenv("CACHE_PATH"), path);
       fd = open(fullpath, O_RDWR | O_CREAT);
       if (fd < 0) {
         __android_log_print(ANDROID_LOG_ERROR, "GeckoLibLoad", "Couldn't create a file either, giving up");
         return NULL;
       }
       // we'd like to use fallocate here, but it doesn't exist currently?
       if (lseek(fd, lib_size - 1, SEEK_SET) == (off_t) - 1) {
          __android_log_print(ANDROID_LOG_ERROR, "GeckoLibLoad", "seeking file failed");
@@ -495,37 +495,37 @@ static void * mozload(const char * path,
         return NULL;
       }
       if (write(fd, "", 1) != 1) {
         __android_log_print(ANDROID_LOG_ERROR, "GeckoLibLoad", "writting one byte to the file failed");
         close(fd);
         return NULL;
       }
       skipLibCache = true;
-      addLibCacheFd(path + 4, fd);
+      addLibCacheFd(path, fd);
     }
     buf = mmap(NULL, lib_size,
                PROT_READ | PROT_WRITE,
                MAP_SHARED, fd, 0);
     if (buf == (void *)-1) {
       __android_log_print(ANDROID_LOG_ERROR, "GeckoLibLoad", "Couldn't mmap decompression buffer");
       close(fd);
       return NULL;
     }
 
     offset = 0;
 
     if (cache_fd < 0) {
       extractLib(entry, data, buf);
       if (!skipLibCache)
-        addLibCacheFd(path + 4, fd, lib_size, buf);
+        addLibCacheFd(path, fd, lib_size, buf);
     }
 
     // preload libxul, to avoid slowly demand-paging it
-    if (!strcmp(path, "lib/libxul.so"))
+    if (!strcmp(path, "libxul.so"))
       madvise(buf, entry->uncompressed_size, MADV_WILLNEED);
     data = buf;
   }
 
 #ifdef DEBUG
   __android_log_print(ANDROID_LOG_ERROR, "GeckoLibLoad", "Loading %s with len %d (0x%08x) and offset %d (0x%08x)", path, lib_size, lib_size, offset, offset);
 #endif
 
@@ -624,17 +624,17 @@ loadLibs(const char *apkName)
 
   struct cdir_entry *cdir_start = (struct cdir_entry *)((char *)zip + cdir_offset);
 
   lib_mapping = (struct mapping_info *)calloc(MAX_MAPPING_INFO, sizeof(*lib_mapping));
 #ifdef MOZ_CRASHREPORTER
   file_ids = (char *)extractBuf("lib.id", zip, cdir_start, cdir_entries);
 #endif
 
-#define MOZLOAD(name) mozload("lib/lib" name ".so", zip, cdir_start, cdir_entries)
+#define MOZLOAD(name) mozload("lib" name ".so", zip, cdir_start, cdir_entries)
   MOZLOAD("mozalloc");
   MOZLOAD("nspr4");
   MOZLOAD("plc4");
   MOZLOAD("plds4");
   MOZLOAD("mozsqlite3");
   MOZLOAD("nssutil3");
   MOZLOAD("nss3");
   MOZLOAD("ssl3");
--- a/services/sync/tests/unit/test_history_store.js
+++ b/services/sync/tests/unit/test_history_store.js
@@ -163,16 +163,17 @@ add_test(function test_null_title() {
 
 add_test(function test_invalid_records() {
   _("Make sure we handle invalid URLs in places databases gracefully.");
   let query = "INSERT INTO moz_places "
     + "(url, title, rev_host, visit_count, last_visit_date) "
     + "VALUES ('invalid-uri', 'Invalid URI', '.', 1, " + TIMESTAMP3 + ")";
   let stmt = PlacesUtils.history.DBConnection.createAsyncStatement(query);
   let result = Async.querySpinningly(stmt);
+  stmt.finalize();
   do_check_attribute_count(store.getAllIDs(), 4);
 
   _("Make sure we report records with invalid URIs.");
   let invalid_uri_guid = Utils.makeGUID();
   let failed = store.applyIncomingBatch([{
     id: invalid_uri_guid,
     histUri: ":::::::::::::::",
     title: "Doesn't have a valid URI",
--- a/services/sync/tests/unit/test_places_guid_downgrade.js
+++ b/services/sync/tests/unit/test_places_guid_downgrade.js
@@ -106,28 +106,30 @@ function test_history_guids() {
 
   stmt.params.guid = fxguid;
   let result = Async.querySpinningly(stmt, ["id"]);
   do_check_eq(result.length, 1);
 
   stmt.params.guid = tbguid;
   result = Async.querySpinningly(stmt, ["id"]);
   do_check_eq(result.length, 1);
+  stmt.finalize();
 
   _("History: Verify GUIDs weren't added to annotations.");
   stmt = PlacesUtils.history.DBConnection.createAsyncStatement(
     "SELECT a.content AS guid FROM moz_annos a WHERE guid = :guid");
 
   stmt.params.guid = fxguid;
   result = Async.querySpinningly(stmt, ["guid"]);
   do_check_eq(result.length, 0);
 
   stmt.params.guid = tbguid;
   result = Async.querySpinningly(stmt, ["guid"]);
   do_check_eq(result.length, 0);
+  stmt.finalize();
 }
 
 function test_bookmark_guids() {
   let engine = new BookmarksEngine();
   let store = engine._store;
 
   let fxid = PlacesUtils.bookmarks.insertBookmark(
     PlacesUtils.bookmarks.toolbarFolder,
@@ -151,28 +153,30 @@ function test_bookmark_guids() {
   let result = Async.querySpinningly(stmt, ["id"]);
   do_check_eq(result.length, 1);
   do_check_eq(result[0].id, fxid);
 
   stmt.params.guid = tbguid;
   result = Async.querySpinningly(stmt, ["id"]);
   do_check_eq(result.length, 1);
   do_check_eq(result[0].id, tbid);
+  stmt.finalize();
 
   _("Bookmarks: Verify GUIDs weren't added to annotations.");
   stmt = PlacesUtils.history.DBConnection.createAsyncStatement(
     "SELECT a.content AS guid FROM moz_items_annos a WHERE guid = :guid");
 
   stmt.params.guid = fxguid;
   result = Async.querySpinningly(stmt, ["guid"]);
   do_check_eq(result.length, 0);
 
   stmt.params.guid = tbguid;
   result = Async.querySpinningly(stmt, ["guid"]);
   do_check_eq(result.length, 0);
+  stmt.finalize();
 }
 
 function run_test() {
   setPlacesDatabase("places_v10_from_v11.sqlite");
 
   _("Verify initial setup: v11 database is available");
   test_initial_state();
   test_history_guids();
--- a/toolkit/components/alerts/test/test_alerts.html
+++ b/toolkit/components/alerts/test/test_alerts.html
@@ -17,61 +17,58 @@
 <br>If so, the test will finish once the notification disappears.
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
 
 var observer = {
   observe: function (aSubject, aTopic, aData) {
-    if (aTopic == "alertclickcallback")
+    if (aTopic == "alertclickcallback") { 
       todo(false, "Did someone click the notification while running mochitests? (Please don't.)");
-    else
+    } else {
       is(aTopic, "alertfinished", "Checking the topic for a finished notification");
+    }
     is(aData, "foobarcookie", "Checking whether the alert cookie was passed correctly");
-
-    // finish(), yet let the test actually end first, to be safe.
-    SimpleTest.executeSoon(SimpleTest.finish);
+    SimpleTest.finish();
   }
 };
 
-const Cc = Components.classes;
-const Ci = Components.interfaces;
+function runTest() {
+  const Cc = Components.classes;
+  const Ci = Components.interfaces;
 
-var gNotificationIsAvailable;
+  if (!("@mozilla.org/alerts-service;1" in Cc)) {
+    todo(false, "Alerts service does not exist in this application");
+    return;
+  }
 
-if (!("@mozilla.org/alerts-service;1" in Cc)) {
-  todo(false, "Alerts service does not exist in this application");
-} else {
   ok(true, "Alerts service exists in this application");
 
   var notifier;
   try {
     notifier = Cc["@mozilla.org/alerts-service;1"].
                getService(Ci.nsIAlertsService);
     ok(true, "Alerts service is available");
   } catch (ex) {
-    todo(false, "Alerts service is not available. (Mac OS X without Growl?)", ex);
+    todo(false, 
+         "Alerts service is not available. (Mac OS X without Growl?)", ex);
+    return;
   }
 
-  if (notifier) {
-    try {
-      notifier.showAlertNotification(null, "Notification test",
-                                     "Surprise! I'm here to test notifications!",
-                                     false, "foobarcookie", observer);
-      ok(true, "showAlertNotification() succeeded");
-
-      gNotificationIsAvailable = true;
-    } catch (ex) {
-      todo(false, "showAlertNotification() failed. (Mac OS X without Growl?)", ex);
-    }
+  try {
+    SimpleTest.waitForExplicitFinish();
+    notifier.showAlertNotification(null, "Notification test",
+                                   "Surprise! I'm here to test notifications!",
+                                   false, "foobarcookie", observer);
+    ok(true, "showAlertNotification() succeeded.  Waiting for notification...");
+  } catch (ex) {
+    todo(false, "showAlertNotification() failed. (Mac OS X without Growl?)", ex);
+    SimpleTest.finish();
   }
 }
 
-if (gNotificationIsAvailable) {
-  // Wait for the (asynchronous) notification callback.
-  SimpleTest.waitForExplicitFinish();
-  ok(true, "Waiting for notification callback to be triggered...");
-}
+runTest();
+
 </script>
 </pre>
 </body>
 </html>
--- a/toolkit/components/places/nsAnnotationService.h
+++ b/toolkit/components/places/nsAnnotationService.h
@@ -61,16 +61,20 @@ public:
 
   /**
    * Initializes the service's object.  This should only be called once.
    */
   nsresult Init();
 
   static nsresult InitTables(mozIStorageConnection* aDBConn);
 
+  static nsAnnotationService* GetAnnotationServiceIfAvailable() {
+    return gAnnotationService;
+  }
+
   /**
    * Returns a cached pointer to the annotation service for consumers in the
    * places directory.
    */
   static nsAnnotationService* GetAnnotationService()
   {
     if (!gAnnotationService) {
       nsCOMPtr<nsIAnnotationService> serv =
--- a/toolkit/components/places/nsFaviconService.h
+++ b/toolkit/components/places/nsFaviconService.h
@@ -80,16 +80,20 @@ public:
   /**
    * Initializes the service's object.  This should only be called once.
    */
   nsresult Init();
 
   // called by nsNavHistory::Init
   static nsresult InitTables(mozIStorageConnection* aDBConn);
 
+  static nsFaviconService* GetFaviconServiceIfAvailable() {
+    return gFaviconService;
+  }
+
   /**
    * Returns a cached pointer to the favicon service for consumers in the
    * places directory.
    */
   static nsFaviconService* GetFaviconService()
   {
     if (!gFaviconService) {
       nsCOMPtr<nsIFaviconService> serv =
--- a/toolkit/components/places/nsNavBookmarks.h
+++ b/toolkit/components/places/nsNavBookmarks.h
@@ -136,16 +136,20 @@ public:
   /**
    * Initializes the service's object.  This should only be called once.
    */
   nsresult Init();
 
   // called by nsNavHistory::Init
   static nsresult InitTables(mozIStorageConnection* aDBConn);
 
+  static nsNavBookmarks* GetBookmarksServiceIfAvailable() {
+    return gBookmarksService;
+  }
+
   static nsNavBookmarks* GetBookmarksService() {
     if (!gBookmarksService) {
       nsCOMPtr<nsINavBookmarksService> serv =
         do_GetService(NS_NAVBOOKMARKSSERVICE_CONTRACTID);
       NS_ENSURE_TRUE(serv, nsnull);
       NS_ASSERTION(gBookmarksService,
                    "Should have static instance pointer now");
     }
--- a/toolkit/components/places/nsNavHistory.cpp
+++ b/toolkit/components/places/nsNavHistory.cpp
@@ -5123,33 +5123,33 @@ nsresult
 nsNavHistory::FinalizeInternalStatements()
 {
   NS_ASSERTION(NS_IsMainThread(), "This can only be called on the main thread");
 
   // nsNavHistory
   nsresult rv = FinalizeStatements();
   NS_ENSURE_SUCCESS(rv, rv);
 
-  // nsNavBookmarks
-  nsNavBookmarks *bookmarks = nsNavBookmarks::GetBookmarksService();
-  NS_ENSURE_TRUE(bookmarks, NS_ERROR_OUT_OF_MEMORY);
-  rv = bookmarks->FinalizeStatements();
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  // nsAnnotationService
-  nsAnnotationService* annosvc = nsAnnotationService::GetAnnotationService();
-  NS_ENSURE_TRUE(annosvc, NS_ERROR_OUT_OF_MEMORY);
-  rv = annosvc->FinalizeStatements();
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  // nsFaviconService
-  nsFaviconService* iconsvc = nsFaviconService::GetFaviconService();
-  NS_ENSURE_TRUE(iconsvc, NS_ERROR_OUT_OF_MEMORY);
-  rv = iconsvc->FinalizeStatements();
-  NS_ENSURE_SUCCESS(rv, rv);
+  nsNavBookmarks* bookmarks = nsNavBookmarks::GetBookmarksServiceIfAvailable();
+  if (bookmarks) {
+    rv = bookmarks->FinalizeStatements();
+    NS_ENSURE_SUCCESS(rv, rv);
+  }
+
+  nsAnnotationService* annosvc = nsAnnotationService::GetAnnotationServiceIfAvailable();
+  if (annosvc) {
+    rv = annosvc->FinalizeStatements();
+    NS_ENSURE_SUCCESS(rv, rv);
+  }
+
+  nsFaviconService* iconsvc = nsFaviconService::GetFaviconServiceIfAvailable();
+  if (iconsvc) {
+    rv = iconsvc->FinalizeStatements();
+    NS_ENSURE_SUCCESS(rv, rv);
+  }
 
   return NS_OK;
 }
 
 
 NS_IMETHODIMP
 nsNavHistory::AsyncExecuteLegacyQueries(nsINavHistoryQuery** aQueries,
                                         PRUint32 aQueryCount,
@@ -5281,22 +5281,17 @@ nsNavHistory::Observe(nsISupports *aSubj
     (void)os->NotifyObservers(nsnull, TOPIC_PLACES_SHUTDOWN, nsnull);
   }
 
   else if (strcmp(aTopic, TOPIC_PROFILE_CHANGE) == 0) {
     // Fire internal shutdown notifications.
     nsCOMPtr<nsIObserverService> os = services::GetObserverService();
     if (os) {
       (void)os->RemoveObserver(this, TOPIC_PROFILE_CHANGE);
-      // Double notification allows to correctly enqueue tasks without the need
-      // to enqueue notification events to the main-thread.  There is no
-      // guarantee that the event loop will spin before xpcom-shutdown indeed,
-      // see bug 580892.
       (void)os->NotifyObservers(nsnull, TOPIC_PLACES_WILL_CLOSE_CONNECTION, nsnull);
-      (void)os->NotifyObservers(nsnull, TOPIC_PLACES_CONNECTION_CLOSING, nsnull);
     }
 
     // Operations that are unlikely to create issues to implementers should go
     // in profile teardown.  Any other thing that must run really late should be
     // here instead.
 
     // Don't even try to notify observers from this point on, the category
     // cache would init services that could try to use our APIs.
--- a/toolkit/components/places/nsNavHistory.h
+++ b/toolkit/components/places/nsNavHistory.h
@@ -104,19 +104,16 @@
 // APIs after this notification.  If you need to listen for Places shutdown
 // you should only use this notification, next ones are intended only for
 // internal Places use.
 #define TOPIC_PLACES_SHUTDOWN "places-shutdown"
 // For Internal use only.  Fired when connection is about to be closed, only
 // cleanup tasks should run at this stage, nothing should be added to the
 // database, nor APIs should be called.
 #define TOPIC_PLACES_WILL_CLOSE_CONNECTION "places-will-close-connection"
-// For Internal use only. Fired as the last notification before the connection
-// is gone.
-#define TOPIC_PLACES_CONNECTION_CLOSING "places-connection-closing"
 // Fired when the connection has gone, nothing will work from now on.
 #define TOPIC_PLACES_CONNECTION_CLOSED "places-connection-closed"
 
 // Fired when Places found a locked database while initing.
 #define TOPIC_DATABASE_LOCKED "places-database-locked"
 // Fired after Places inited.
 #define TOPIC_PLACES_INIT_COMPLETE "places-init-complete"
 
--- a/toolkit/components/places/tests/cpp/places_test_harness.h
+++ b/toolkit/components/places/tests/cpp/places_test_harness.h
@@ -326,8 +326,44 @@ do_get_lastVisit(PRInt64 placeId, VisitR
 
   rv = stmt->GetInt64(0, &result.id);
   do_check_success(rv);
   rv = stmt->GetInt64(1, &result.lastVisitId);
   do_check_success(rv);
   rv = stmt->GetInt32(2, &result.transitionType);
   do_check_success(rv);
 }
+
+static const char TOPIC_PROFILE_TEARDOWN[] = "profile-change-teardown";
+static const char TOPIC_PROFILE_CHANGE[] = "profile-before-change";
+
+class ShutdownObserver : public nsIObserver
+{
+public:
+  NS_DECL_ISUPPORTS
+
+  ShutdownObserver()
+  {
+    nsCOMPtr<nsIObserverService> observerService =
+      do_GetService(NS_OBSERVERSERVICE_CONTRACTID);
+    do_check_true(observerService);
+    observerService->AddObserver(this,
+                                 NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID,
+                                 PR_FALSE);
+  }
+
+  NS_IMETHOD Observe(nsISupports* aSubject,
+                     const char* aTopic,
+                     const PRUnichar* aData)
+  {
+    if (strcmp(aTopic, NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID) == 0) {
+      nsCOMPtr<nsIObserverService> os =
+        do_GetService(NS_OBSERVERSERVICE_CONTRACTID);
+      (void)os->NotifyObservers(nsnull, TOPIC_PROFILE_TEARDOWN, nsnull);
+      (void)os->NotifyObservers(nsnull, TOPIC_PROFILE_CHANGE, nsnull);
+    }
+      return NS_OK;
+  }
+};
+NS_IMPL_ISUPPORTS1(
+  ShutdownObserver,
+  nsIObserver
+)
--- a/toolkit/components/places/tests/cpp/places_test_harness_tail.h
+++ b/toolkit/components/places/tests/cpp/places_test_harness_tail.h
@@ -110,16 +110,18 @@ disable_idle_service()
   do_check_success(rv);
 }
 
 int
 main(int aArgc,
      char** aArgv)
 {
   ScopedXPCOM xpcom(TEST_NAME);
+  nsCOMPtr<ShutdownObserver> shutdownObserver = new ShutdownObserver();
+
 
   // Tinderboxes are constantly on idle.  Since idle tasks can interact with
   // tests, causing random failures, disable the idle service.
   disable_idle_service();
 
   do_test_pending();
   run_next_test();
 
--- a/toolkit/components/places/tests/head_common.js
+++ b/toolkit/components/places/tests/head_common.js
@@ -596,25 +596,30 @@ function is_time_ordered(before, after) 
  *       complete.  Note that WAL makes so that writers don't block readers, but
  *       this is a problem only across different connections.
  */
 function waitForAsyncUpdates(aCallback, aScope, aArguments)
 {
   let scope = aScope || this;
   let args = aArguments || [];
   let db = DBConn();
-  db.createAsyncStatement("BEGIN EXCLUSIVE").executeAsync();
-  db.createAsyncStatement("COMMIT").executeAsync({
+  let begin = db.createAsyncStatement("BEGIN EXCLUSIVE");
+  begin.executeAsync();
+  begin.finalize();
+
+  let commit = db.createAsyncStatement("COMMIT");
+  commit.executeAsync({
     handleResult: function() {},
     handleError: function() {},
     handleCompletion: function(aReason)
     {
       aCallback.apply(scope, args);
     }
   });
+  commit.finalize();
 }
 
 /**
  * Tests if a given guid is valid for use in Places or not.
  *
  * @param aGuid
  *        The guid to test.
  * @param [optional] aStack
--- a/toolkit/crashreporter/client/Makefile.in
+++ b/toolkit/crashreporter/client/Makefile.in
@@ -49,16 +49,20 @@ MODULE = crashreporter
 
 # Don't use the STL wrappers in the crashreporter clients; they don't
 # link with -lmozalloc, and it really doesn't matter here anyway.
 STL_FLAGS =
 
 ifneq ($(OS_TARGET),Android)
 PROGRAM = crashreporter$(BIN_SUFFIX)
 DIST_PROGRAM = crashreporter$(BIN_SUFFIX)
+
+# Don't link the updater against libmozutils.
+MOZ_UTILS_LDFLAGS =
+MOZ_UTILS_PROGRAM_LDFLAGS =
 endif
 
 LOCAL_INCLUDES = -I$(srcdir)/../google-breakpad/src
 
 VPATH += $(topsrcdir)/build/
 
 CPPSRCS = \
   crashreporter.cpp \
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -265,16 +265,30 @@ DIST_FILES = \
   AndroidManifest.xml \
   chrome \
   components \
   defaults \
   modules \
   res \
   lib \
   lib.id \
+  libmozalloc.so \
+  libnspr4.so \
+  libplc4.so \
+  libplds4.so \
+  libmozsqlite3.so \
+  libnssutil3.so \
+  libnss3.so \
+  libssl3.so \
+  libsmime3.so \
+  libxul.so \
+  libxpcom.so \
+  libnssckbi.so \
+  libfreebl3.so \
+  libsoftokn3.so \
   extensions \
   application.ini \
   platform.ini \
   greprefs.js \
   browserconfig.properties \
   blocklist.xml \
   chrome.manifest \
   update.locale \
@@ -299,37 +313,35 @@ endif
 
 PKG_SUFFIX      = .apk
 INNER_MAKE_PACKAGE	= \
   make -C ../embedding/android gecko.ap_ && \
   cp ../embedding/android/gecko.ap_ $(_ABS_DIST) && \
   ( cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && \
     rm -rf lib && \
     mkdir -p lib/$(ABI_DIR) && \
-    cp lib*.so lib && \
-    mv lib/libmozutils.so lib/$(ABI_DIR) && \
+    mv libmozutils.so lib/$(ABI_DIR) && \
     rm -f lib.id && \
-    for SOMELIB in lib/*.so ; \
+    for SOMELIB in *.so ; \
     do \
       printf "`basename $$SOMELIB`:`$(_ABS_DIST)/host/bin/file_id $$SOMELIB`\n" >> lib.id ; \
     done && \
     unzip -o $(_ABS_DIST)/gecko.ap_ && \
     rm $(_ABS_DIST)/gecko.ap_ && \
     $(ZIP) -r9D $(_ABS_DIST)/gecko.ap_ $(DIST_FILES) -x $(NON_DIST_FILES) ) && \
   rm -f $(_ABS_DIST)/gecko.apk && \
   $(APKBUILDER) $(_ABS_DIST)/gecko.apk -v $(APKBUILDER_FLAGS) -z $(_ABS_DIST)/gecko.ap_ -f $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/classes.dex && \
   cp $(_ABS_DIST)/gecko.apk $(_ABS_DIST)/gecko-unsigned-unaligned.apk && \
   $(JARSIGNER) $(_ABS_DIST)/gecko.apk && \
   $(ZIPALIGN) -f -v 4 $(_ABS_DIST)/gecko.apk $(PACKAGE)
 INNER_UNMAKE_PACKAGE	= \
   mkdir $(MOZ_PKG_DIR) && \
   cd $(MOZ_PKG_DIR) && \
   $(UNZIP) $(UNPACKAGE) && \
   mv lib/$(ABI_DIR)/*.so . && \
-  mv lib/*.so . && \
   rm -rf lib
 endif
 ifeq ($(MOZ_PKG_FORMAT),DMG)
 ifndef _APPNAME
 ifdef MOZ_DEBUG
 _APPNAME	= $(MOZ_APP_DISPLAYNAME)Debug.app
 else
 _APPNAME	= $(MOZ_APP_DISPLAYNAME).app
--- a/widget/src/windows/nsClipboard.cpp
+++ b/widget/src/windows/nsClipboard.cpp
@@ -688,33 +688,57 @@ nsresult nsClipboard::GetDataFromDataObj
 //
 // FindPlatformHTML
 //
 // Someone asked for the OS CF_HTML flavor. We give it back to them exactly as-is.
 //
 PRBool
 nsClipboard :: FindPlatformHTML ( IDataObject* inDataObject, UINT inIndex, void** outData, PRUint32* outDataLen )
 {
-  PRBool dataFound = PR_FALSE;
+  // Reference: MSDN doc entitled "HTML Clipboard Format"
+  // http://msdn.microsoft.com/en-us/library/aa767917(VS.85).aspx#unknown_854
+  // CF_HTML is UTF8, not unicode. We also can't rely on it being null-terminated
+  // so we have to check the CF_HTML header for the correct length. 
+  // The length we return is the bytecount from the beginning of the selected data to the end
+  // of the selected data, without the null termination. Because it's UTF8, we're guaranteed 
+  // the header is ASCII.
 
-  if ( outData && *outData ) {
-    // CF_HTML is UTF8, not unicode. We also can't rely on it being null-terminated
-    // so we have to check the CF_HTML header for the correct length. The length we return
-    // is the bytecount from the beginning of the data to the end, without
-    // the null termination. Because it's UTF8, we're guaranteed the header is ascii (yay!).
-    float vers = 0.0;
-    PRUint32 startOfData = 0;
-    sscanf((char*)*outData, "Version:%f\nStartHTML:%u\nEndHTML:%u", &vers, &startOfData, outDataLen);
-    NS_ASSERTION(startOfData && *outDataLen, "Couldn't parse CF_HTML description header");
- 
-    if ( *outDataLen )
-      dataFound = PR_TRUE;
+  if (!outData || !*outData) {
+    return PR_FALSE;
   }
 
-  return dataFound;
+  float vers = 0.0;
+  PRInt32 startOfData = 0;
+  PRInt32 endOfData = 0;
+  int numFound = sscanf((char*)*outData, "Version:%f\nStartHTML:%d\nEndHTML:%d", 
+                        &vers, &startOfData, &endOfData);
+
+  if (numFound != 3 || startOfData < -1 || endOfData < -1) {
+    return PR_FALSE;
+  }
+
+  // Fixup the start and end markers if they have no context (set to -1)
+  if (startOfData == -1) {
+    startOfData = 0;
+  }
+  if (endOfData == -1) {
+    endOfData = *outDataLen;
+  }
+
+  // Make sure we were passed sane values within our buffer size.
+  if (!endOfData || startOfData >= endOfData || 
+      endOfData > *outDataLen) {
+    return PR_FALSE;
+  }
+  
+  // We want to return the buffer not offset by startOfData because it will be 
+  // parsed out later (probably by nsHTMLEditor::ParseCFHTML) when it is still
+  // in CF_HTML format.
+  *outDataLen = endOfData;
+  return PR_TRUE;
 }
 
 
 //
 // FindUnicodeFromPlainText
 //
 // we are looking for text/unicode and we failed to find it on the clipboard first,
 // try again with text/plain. If that is present, convert it to unicode.
--- a/xpcom/io/nsLocalFileWin.cpp
+++ b/xpcom/io/nsLocalFileWin.cpp
@@ -250,16 +250,20 @@ static nsresult ConvertWinError(DWORD wi
         case ERROR_PATH_NOT_FOUND:
         case ERROR_INVALID_DRIVE:
             rv = NS_ERROR_FILE_NOT_FOUND;
             break;
         case ERROR_ACCESS_DENIED:
         case ERROR_NOT_SAME_DEVICE:
             rv = NS_ERROR_FILE_ACCESS_DENIED;
             break;
+        case ERROR_SHARING_VIOLATION: // CreateFile without sharing flags
+        case ERROR_LOCK_VIOLATION: // LockFile, LockFileEx
+            rv = NS_ERROR_FILE_IS_LOCKED;
+            break;
         case ERROR_NOT_ENOUGH_MEMORY:
         case ERROR_INVALID_BLOCK:
         case ERROR_INVALID_HANDLE:
         case ERROR_ARENA_TRASHED:
             rv = NS_ERROR_OUT_OF_MEMORY;
             break;
         case ERROR_CURRENT_DIRECTORY:
             rv = NS_ERROR_FILE_DIR_NOT_EMPTY;
@@ -797,42 +801,44 @@ nsLocalFile::ResolveAndStat()
 
     // slutty hack designed to work around bug 134796 until it is fixed
     nsAutoString nsprPath(mWorkingPath.get());
     if (mWorkingPath.Length() == 2 && mWorkingPath.CharAt(1) == L':') 
         nsprPath.AppendASCII("\\");
 
     // first we will see if the working path exists. If it doesn't then
     // there is nothing more that can be done
-    if (NS_FAILED(GetFileInfo(nsprPath, &mFileInfo64)))
-        return NS_ERROR_FILE_NOT_FOUND;
+    nsresult rv = GetFileInfo(nsprPath, &mFileInfo64);
+    if (NS_FAILED(rv))
+        return rv;
 
     // if this isn't a shortcut file or we aren't following symlinks then we're done 
     if (!mFollowSymlinks 
         || mFileInfo64.type != PR_FILE_FILE 
         || !IsShortcutPath(mWorkingPath))
     {
         mDirty = PR_FALSE;
         return NS_OK;
     }
 
     // we need to resolve this shortcut to what it points to, this will
     // set mResolvedPath. Even if it fails we need to have the resolved
     // path equal to working path for those functions that always use
     // the resolved path.
-    nsresult rv = ResolveShortcut();
+    rv = ResolveShortcut();
     if (NS_FAILED(rv))
     {
         mResolvedPath.Assign(mWorkingPath);
         return rv;
     }
 
     // get the details of the resolved path
-    if (NS_FAILED(GetFileInfo(mResolvedPath, &mFileInfo64)))
-        return NS_ERROR_FILE_NOT_FOUND;
+    rv = GetFileInfo(mResolvedPath, &mFileInfo64);
+    if (NS_FAILED(rv))
+        return rv;
 
     mDirty = PR_FALSE;
     return NS_OK;
 }
 
 
 //-----------------------------------------------------------------------------
 // nsLocalFile::nsIFile,nsILocalFile
@@ -2212,17 +2218,17 @@ nsLocalFile::Exists(PRBool *_retval)
     // Check we are correctly initialized.
     CHECK_mWorkingPath();
 
     NS_ENSURE_ARG(_retval);
     *_retval = PR_FALSE;
 
     MakeDirty();
     nsresult rv = ResolveAndStat();
-    *_retval = NS_SUCCEEDED(rv);
+    *_retval = NS_SUCCEEDED(rv) || rv == NS_ERROR_FILE_IS_LOCKED;
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsLocalFile::IsWritable(PRBool *aIsWritable)
 {
     // Check we are correctly initialized.