Merge mozilla-central into mozilla-inbound
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 21 Dec 2012 12:47:56 -0500
changeset 125897 8662174169430f3b82a97bac2142da7c9998834a
parent 125896 d9611ad3d8bf0cd1fe1c732241e3819cea4c8774 (current diff)
parent 125765 fb4836c277ebb5a119b96776bf137169cdf82f94 (diff)
child 125898 e4f69649d417513a9bf1cd51123c8f8c8f5f6a75
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge mozilla-central into mozilla-inbound
build/Makefile.in
--- a/build/Makefile.in
+++ b/build/Makefile.in
@@ -142,16 +142,18 @@ leaktest.py: leaktest.py.in
 	$(PYTHON) $(topsrcdir)/config/Preprocessor.py $^ > $@
 	chmod +x $@
 GARBAGE += leaktest.py
 
 ifdef MOZ_APP_BASENAME
 $(FINAL_TARGET)/application.ini: $(APP_INI_DEPS)
 
 ifdef MOZ_APP_STATIC_INI
+DEFINES += -DMOZ_APP_STATIC_INI
+
 application.ini.h: appini_header.py $(FINAL_TARGET)/application.ini
 	$(PYTHON) $^ > $@
 export:: application.ini.h
 GARBAGE += application.ini.h
 endif
 endif
 
 libs:: $(_LEAKTEST_FILES)
--- a/dom/devicestorage/nsDeviceStorage.cpp
+++ b/dom/devicestorage/nsDeviceStorage.cpp
@@ -1000,17 +1000,17 @@ public:
       NS_DispatchToMainThread(event);
       return NS_OK;
     }
 
     nsDOMDeviceStorageCursor* cursor = static_cast<nsDOMDeviceStorageCursor*>(mRequest.get());
     mFile->CollectFiles(cursor->mFiles, cursor->mSince);
 
     nsCOMPtr<ContinueCursorEvent> event = new ContinueCursorEvent(mRequest);
-    NS_DispatchToMainThread(event);
+    event->Continue();
 
     return NS_OK;
   }
 
 
 private:
   nsRefPtr<DeviceStorageFile> mFile;
   nsRefPtr<DOMRequest> mRequest;
@@ -1138,17 +1138,17 @@ nsDOMDeviceStorageCursor::Continue()
     // rooted result.
     mResult = JSVAL_VOID;
     NS_DROP_JS_OBJECTS(this, nsDOMDeviceStorageCursor);
     mDone = false;
     mRooted = false;
   }
 
   nsCOMPtr<ContinueCursorEvent> event = new ContinueCursorEvent(this);
-  NS_DispatchToMainThread(event);
+  event->Continue();
 
   mOkToCallContinue = false;
   return NS_OK;
 }
 
 bool
 nsDOMDeviceStorageCursor::Recv__delete__(const bool& allow)
 {
--- a/widget/MetroUIUtils.idl
+++ b/widget/MetroUIUtils.idl
@@ -1,24 +1,37 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 
 #include "nsISupports.idl"
 
-[scriptable, uuid(aef0cd6f-27cc-40a4-90dc-764c0aabeb75)]
+[scriptable, uuid(9D98A42F-ABAA-48a0-BB53-CE09A29E6876)]
 
 interface nsIMetroUIUtils : nsISupports {
   /**
    * Loads the specified panel in the browser.
    * @ param aPanelId The identifier of the pane to load
   */
   void showPanel(in AString aPanelId);
 
   /**
-   * Obtains the current page information
-   * @param aURI The current page URI
-   * @param aTitle The current page title
+   * Obtains the current page URI
+  */
+  attribute AString currentPageURI;
+
+  /**
+   * Obtains the current page title
   */
-  void getCurrentPageInfo(out AString aURI, out AString aTitle);
+  attribute AString currentPageTitle;
+
+  /**
+   * Determines if the browser has selected content
+  */
+  attribute boolean hasSelectedContent;
+
+  /**
+   * Determines the text that should be shared
+  */
+  attribute AString shareText;
 };
 
--- a/xpcom/io/nsNativeCharsetUtils.cpp
+++ b/xpcom/io/nsNativeCharsetUtils.cpp
@@ -291,16 +291,22 @@ iconv_t nsNativeCharsetConverter::gUTF8T
 #endif
 Mutex  *nsNativeCharsetConverter::gLock            = nullptr;
 bool    nsNativeCharsetConverter::gInitialized     = false;
 bool    nsNativeCharsetConverter::gIsNativeUTF8    = false;
 
 void
 nsNativeCharsetConverter::LazyInit()
 {
+    // LazyInit may be called before NS_StartupNativeCharsetUtils, but
+    // the setlocale it does has to be called before nl_langinfo. Like in
+    // NS_StartupNativeCharsetUtils, assume we are called early enough that
+    // we are the first to care about the locale's charset.
+    if (!gLock)
+      setlocale(LC_CTYPE, "");
     const char  *blank_list[] = { "", NULL };
     const char **native_charset_list = blank_list;
     const char  *native_charset = nl_langinfo(CODESET);
     if (native_charset == nullptr) {
         NS_ERROR("native charset is unknown");
         // fallback to ISO-8859-1
         native_charset_list = ISO_8859_1_NAMES;
     }