Backed out changeset a73ffb0d0c97 because of build bustage
authorEhsan Akhgari <ehsan@mozilla.com>
Sun, 29 Sep 2013 17:20:07 -0400
changeset 162995 64e2f1061cdef29d3e643b57426086d8fe7d5e3c
parent 162994 a73ffb0d0c97eb26747349b2d99c5af611f0c6f3
child 162996 b83627cebdcd9f279af71fd02fd7beec71bde27b
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone27.0a1
backs outa73ffb0d0c97eb26747349b2d99c5af611f0c6f3
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
Backed out changeset a73ffb0d0c97 because of build bustage
accessible/src/base/NotificationController.cpp
caps/src/nsScriptSecurityManager.cpp
extensions/spellcheck/hunspell/src/mozHunspell.cpp
extensions/spellcheck/src/mozPersonalDictionary.cpp
extensions/universalchardet/src/xpcom/nsUdetXPCOMWrapper.cpp
gfx/layers/ipc/Axis.cpp
ipc/chromium/src/base/message_loop.cc
ipc/chromium/src/base/shared_memory_posix.cc
ipc/chromium/src/base/sys_string_conversions_mac.mm
ipc/chromium/src/chrome/common/ipc_logging.cc
js/jsd/jsd_xpc.cpp
parser/html/nsParserUtils.cpp
parser/htmlparser/src/nsParser.cpp
parser/htmlparser/src/nsScanner.cpp
rdf/base/src/nsCompositeDataSource.cpp
rdf/base/src/nsRDFContentSink.cpp
security/manager/ssl/src/SSLServerCertVerification.cpp
security/manager/ssl/src/nsCMS.cpp
security/manager/ssl/src/nsKeygenHandler.cpp
security/manager/ssl/src/nsNSSIOLayer.cpp
startupcache/StartupCache.cpp
toolkit/components/places/nsNavHistory.cpp
toolkit/crashreporter/nsExceptionHandler.cpp
toolkit/xre/nsSigHandlers.cpp
widget/cocoa/nsNativeThemeCocoa.mm
xpcom/components/nsComponentManager.cpp
xpcom/ds/TimeStamp_darwin.cpp
xpcom/glue/nsID.cpp
xpcom/glue/nsVoidArray.cpp
xpcom/threads/HangMonitor.cpp
xpfe/components/directory/nsDirectoryViewer.cpp
--- a/accessible/src/base/NotificationController.cpp
+++ b/accessible/src/base/NotificationController.cpp
@@ -10,16 +10,20 @@
 #include "TextUpdater.h"
 
 #include "mozilla/dom/Element.h"
 #include "mozilla/Telemetry.h"
 
 using namespace mozilla;
 using namespace mozilla::a11y;
 
+// Defines the number of selection add/remove events in the queue when they
+// aren't packed into single selection within event.
+const unsigned int kSelChangeCountToPack = 5;
+
 ////////////////////////////////////////////////////////////////////////////////
 // NotificationCollector
 ////////////////////////////////////////////////////////////////////////////////
 
 NotificationController::NotificationController(DocAccessible* aDocument,
                                                nsIPresShell* aPresShell) :
   EventQueue(aDocument), mObservingState(eNotObservingRefresh),
   mPresShell(aPresShell)
--- a/caps/src/nsScriptSecurityManager.cpp
+++ b/caps/src/nsScriptSecurityManager.cpp
@@ -65,16 +65,18 @@
 #include "nsCxPusher.h"
 
 // This should be probably defined on some other place... but I couldn't find it
 #define WEBAPPS_PERM_NAME "webapps-manage"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
+static NS_DEFINE_CID(kZipReaderCID, NS_ZIPREADER_CID);
+
 nsIIOService    *nsScriptSecurityManager::sIOService = nullptr;
 nsIStringBundle *nsScriptSecurityManager::sStrBundle = nullptr;
 JSRuntime       *nsScriptSecurityManager::sRuntime   = 0;
 bool nsScriptSecurityManager::sStrictFileOriginPolicy = true;
 
 // Lazily initialized. Use the getter below.
 static jsid sEnabledID = JSID_VOID;
 static JS::HandleId
--- a/extensions/spellcheck/hunspell/src/mozHunspell.cpp
+++ b/extensions/spellcheck/hunspell/src/mozHunspell.cpp
@@ -73,16 +73,19 @@
 #include "nsCRT.h"
 #include "mozInlineSpellChecker.h"
 #include "mozilla/Services.h"
 #include <stdlib.h>
 #include "nsIMemoryReporter.h"
 #include "nsIPrefService.h"
 #include "nsIPrefBranch.h"
 
+static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
+static NS_DEFINE_CID(kUnicharUtilCID, NS_UNICHARUTIL_CID);
+
 NS_IMPL_CYCLE_COLLECTING_ADDREF(mozHunspell)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(mozHunspell)
 
 NS_INTERFACE_MAP_BEGIN(mozHunspell)
   NS_INTERFACE_MAP_ENTRY(mozISpellCheckingEngine)
   NS_INTERFACE_MAP_ENTRY(nsIObserver)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, mozISpellCheckingEngine)
--- a/extensions/spellcheck/src/mozPersonalDictionary.cpp
+++ b/extensions/spellcheck/src/mozPersonalDictionary.cpp
@@ -15,16 +15,18 @@
 #include "nsIWeakReference.h"
 #include "nsCRT.h"
 #include "nsNetUtil.h"
 #include "nsStringEnumerator.h"
 #include "nsUnicharInputStream.h"
 
 #define MOZ_PERSONAL_DICT_NAME "persdict.dat"
 
+const int kMaxWordLen=256;
+
 /**
  * This is the most braindead implementation of a personal dictionary possible.
  * There is not much complexity needed, though.  It could be made much faster,
  *  and probably should, but I don't see much need for more in terms of interface.
  *
  * Allowing personal words to be associated with only certain dictionaries maybe.
  *
  * TODO:
--- a/extensions/universalchardet/src/xpcom/nsUdetXPCOMWrapper.cpp
+++ b/extensions/universalchardet/src/xpcom/nsUdetXPCOMWrapper.cpp
@@ -10,16 +10,19 @@
 #include "nsCharSetProber.h" // for DumpStatus
 
 #include "nsUniversalCharDetDll.h"
 //---- for XPCOM
 #include "nsIFactory.h"
 #include "nsISupports.h"
 #include "nsCOMPtr.h"
 
+static NS_DEFINE_CID(kUniversalDetectorCID, NS_UNIVERSAL_DETECTOR_CID);
+static NS_DEFINE_CID(kUniversalStringDetectorCID, NS_UNIVERSAL_STRING_DETECTOR_CID);
+
 //---------------------------------------------------------------------
 nsXPCOMDetector:: nsXPCOMDetector(uint32_t aLanguageFilter)
  : nsUniversalDetector(aLanguageFilter)
 {
 }
 //---------------------------------------------------------------------
 nsXPCOMDetector::~nsXPCOMDetector() 
 {
--- a/gfx/layers/ipc/Axis.cpp
+++ b/gfx/layers/ipc/Axis.cpp
@@ -15,16 +15,18 @@
 #include "mozilla/mozalloc.h"           // for operator new
 #include "nsMathUtils.h"                // for NS_lround
 #include "nsThreadUtils.h"              // for NS_DispatchToMainThread, etc
 #include "nscore.h"                     // for NS_IMETHOD
 
 namespace mozilla {
 namespace layers {
 
+static const float EPSILON = 0.0001f;
+
 /**
  * Maximum acceleration that can happen between two frames. Velocity is
  * throttled if it's above this. This may happen if a time delta is very low,
  * or we get a touch point very far away from the previous position for some
  * reason.
  */
 static float gMaxEventAcceleration = 999.0f;
 
--- a/ipc/chromium/src/base/message_loop.cc
+++ b/ipc/chromium/src/base/message_loop.cc
@@ -40,16 +40,28 @@ using base::TimeTicks;
 
 // A lazily created thread local storage for quick access to a thread's message
 // loop, if one exists.  This should be safe and free of static constructors.
 static base::LazyInstance<base::ThreadLocalPointer<MessageLoop> > lazy_tls_ptr(
     base::LINKER_INITIALIZED);
 
 //------------------------------------------------------------------------------
 
+// Logical events for Histogram profiling. Run with -message-loop-histogrammer
+// to get an accounting of messages and actions taken on each thread.
+static const int kTaskRunEvent = 0x1;
+static const int kTimerEvent = 0x2;
+
+// Provide range of message IDs for use in histogramming and debug display.
+static const int kLeastNonZeroMessageId = 1;
+static const int kMaxMessageId = 1099;
+static const int kNumberOfDistinctMessagesDisplayed = 1100;
+
+//------------------------------------------------------------------------------
+
 #if defined(OS_WIN)
 
 // Upon a SEH exception in this thread, it restores the original unhandled
 // exception filter.
 static int SEHFilter(LPTOP_LEVEL_EXCEPTION_FILTER old_filter) {
   ::SetUnhandledExceptionFilter(old_filter);
   return EXCEPTION_CONTINUE_SEARCH;
 }
--- a/ipc/chromium/src/base/shared_memory_posix.cc
+++ b/ipc/chromium/src/base/shared_memory_posix.cc
@@ -12,16 +12,22 @@
 
 #include "base/file_util.h"
 #include "base/logging.h"
 #include "base/platform_thread.h"
 #include "base/string_util.h"
 
 namespace base {
 
+namespace {
+// Paranoia. Semaphores and shared memory segments should live in different
+// namespaces, but who knows what's out there.
+const char kSemaphoreSuffix[] = "-sem";
+}
+
 SharedMemory::SharedMemory()
     : mapped_file_(-1),
       inode_(0),
       memory_(NULL),
       read_only_(false),
       max_size_(0) {
 }
 
--- a/ipc/chromium/src/base/sys_string_conversions_mac.mm
+++ b/ipc/chromium/src/base/sys_string_conversions_mac.mm
@@ -109,18 +109,20 @@ static CFStringRef STLStringToCFStringWi
                                  in_encoding,
                                  false);
 }
 
 // Specify the byte ordering explicitly, otherwise CFString will be confused
 // when strings don't carry BOMs, as they typically won't.
 static const CFStringEncoding kNarrowStringEncoding = kCFStringEncodingUTF8;
 #ifdef __BIG_ENDIAN__
+static const CFStringEncoding kMediumStringEncoding = kCFStringEncodingUTF16BE;
 static const CFStringEncoding kWideStringEncoding = kCFStringEncodingUTF32BE;
 #elif defined(__LITTLE_ENDIAN__)
+static const CFStringEncoding kMediumStringEncoding = kCFStringEncodingUTF16LE;
 static const CFStringEncoding kWideStringEncoding = kCFStringEncodingUTF32LE;
 #endif  // __LITTLE_ENDIAN__
 
 }  // namespace
 
 // Do not assert in this function since it is used by the asssertion code!
 std::string SysWideToUTF8(const std::wstring& wide) {
   return STLStringToSTLStringWithEncodingsT<std::wstring, std::string>(
--- a/ipc/chromium/src/chrome/common/ipc_logging.cc
+++ b/ipc/chromium/src/chrome/common/ipc_logging.cc
@@ -38,19 +38,17 @@ template <>
 struct RunnableMethodTraits<IPC::Logging> {
   static void RetainCallee(IPC::Logging*) {}
   static void ReleaseCallee(IPC::Logging*) {}
 };
 
 namespace IPC {
 
 const wchar_t kLoggingEventName[] = L"ChromeIPCLog.%d";
-#if defined(OS_WIN)
 const int kLogSendDelayMs = 100;
-#endif
 
 // We use a pointer to the function table to avoid any linker dependencies on
 // all the traits used as IPC message parameters.
 Logging::LogFunction *Logging::log_function_mapping_;
 
 Logging::Logging()
     : logging_event_on_(NULL),
       logging_event_off_(NULL),
--- a/js/jsd/jsd_xpc.cpp
+++ b/js/jsd/jsd_xpc.cpp
@@ -92,16 +92,17 @@ jsds_GCSliceCallbackProc (JSRuntime *rt,
 /*******************************************************************************
  * global vars
  ******************************************************************************/
 
 const char implementationString[] = "Mozilla JavaScript Debugger Service";
 
 const char jsdServiceCtrID[] = "@mozilla.org/js/jsd/debugger-service;1";
 const char jsdARObserverCtrID[] = "@mozilla.org/js/jsd/app-start-observer;2";
+const char jsdASObserverCtrID[] = "service,@mozilla.org/js/jsd/app-start-observer;2";
 
 #ifdef DEBUG_verbose
 uint32_t gScriptCount   = 0;
 uint32_t gValueCount    = 0;
 uint32_t gPropertyCount = 0;
 uint32_t gContextCount  = 0;
 uint32_t gFrameCount  = 0;
 #endif
--- a/parser/html/nsParserUtils.cpp
+++ b/parser/html/nsParserUtils.cpp
@@ -40,16 +40,20 @@
 #define XHTML_DIV_TAG "div xmlns=\"http://www.w3.org/1999/xhtml\""
 
 using namespace mozilla::dom;
 
 NS_IMPL_ISUPPORTS2(nsParserUtils,
                    nsIScriptableUnescapeHTML,
                    nsIParserUtils)
 
+static NS_DEFINE_CID(kCParserCID, NS_PARSER_CID);
+
+
+
 NS_IMETHODIMP
 nsParserUtils::ConvertToPlainText(const nsAString& aFromStr,
                                   uint32_t aFlags,
                                   uint32_t aWrapCol,
                                   nsAString& aToStr)
 {
   return nsContentUtils::ConvertToPlainText(aFromStr,
     aToStr,
--- a/parser/htmlparser/src/nsParser.cpp
+++ b/parser/htmlparser/src/nsParser.cpp
@@ -49,16 +49,20 @@ using namespace mozilla;
 using mozilla::dom::EncodingUtils;
 
 #define NS_PARSER_FLAG_PARSER_ENABLED         0x00000002
 #define NS_PARSER_FLAG_OBSERVERS_ENABLED      0x00000004
 #define NS_PARSER_FLAG_PENDING_CONTINUE_EVENT 0x00000008
 #define NS_PARSER_FLAG_FLUSH_TOKENS           0x00000020
 #define NS_PARSER_FLAG_CAN_TOKENIZE           0x00000040
 
+static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
+static NS_DEFINE_CID(kCParserCID, NS_PARSER_CID);
+static NS_DEFINE_IID(kIParserIID, NS_IPARSER_IID);
+
 //-------------- Begin ParseContinue Event Definition ------------------------
 /*
 The parser can be explicitly interrupted by passing a return value of
 NS_ERROR_HTMLPARSER_INTERRUPTED from BuildModel on the DTD. This will cause
 the parser to stop processing and allow the application to return to the event
 loop. The data which was left at the time of interruption will be processed
 the next time OnDataAvailable is called. If the parser has received its final
 chunk of data then OnDataAvailable will no longer be called by the networking
--- a/parser/htmlparser/src/nsScanner.cpp
+++ b/parser/htmlparser/src/nsScanner.cpp
@@ -40,16 +40,22 @@ nsReadEndCondition::nsReadEndCondition(c
   PRUnichar terminalChar = *current;
   while (terminalChar) {
     mFilter &= ~terminalChar;
     ++current;
     terminalChar = *current;
   }
 }
 
+#ifdef __INCREMENTAL
+const int   kBufsize=1;
+#else
+const int   kBufsize=64;
+#endif
+
 /**
  *  Use this constructor if you want i/o to be based on 
  *  a single string you hand in during construction.
  *  This short cut was added for Javascript.
  *
  *  @update  gess 5/12/98
  *  @param   aMode represents the parser mode (nav, other)
  *  @return  
--- a/rdf/base/src/nsCompositeDataSource.cpp
+++ b/rdf/base/src/nsCompositeDataSource.cpp
@@ -44,16 +44,18 @@
 
 #ifdef DEBUG
 #include "prlog.h"
 #include "prprf.h"
 #include <stdio.h>
 PRLogModuleInfo* nsRDFLog = nullptr;
 #endif
 
+static NS_DEFINE_IID(kISupportsIID,           NS_ISUPPORTS_IID);
+
 //----------------------------------------------------------------------
 //
 // CompositeDataSourceImpl
 //
 
 class CompositeEnumeratorImpl;
 class CompositeArcsInOutEnumeratorImpl;
 class CompositeAssertionEnumeratorImpl;
--- a/rdf/base/src/nsRDFContentSink.cpp
+++ b/rdf/base/src/nsRDFContentSink.cpp
@@ -68,16 +68,17 @@
 
 using namespace mozilla;
 
 ////////////////////////////////////////////////////////////////////////
 // XPCOM IIDs
 
 static NS_DEFINE_IID(kIContentSinkIID,         NS_ICONTENT_SINK_IID); // XXX grr...
 static NS_DEFINE_IID(kIExpatSinkIID,           NS_IEXPATSINK_IID);
+static NS_DEFINE_IID(kIRDFServiceIID,          NS_IRDFSERVICE_IID);
 static NS_DEFINE_IID(kISupportsIID,            NS_ISUPPORTS_IID);
 static NS_DEFINE_IID(kIXMLContentSinkIID,      NS_IXMLCONTENT_SINK_IID);
 static NS_DEFINE_IID(kIRDFContentSinkIID,      NS_IRDFCONTENTSINK_IID);
 
 static NS_DEFINE_CID(kRDFServiceCID,            NS_RDFSERVICE_CID);
 static NS_DEFINE_CID(kRDFContainerUtilsCID,     NS_RDFCONTAINERUTILS_CID);
 
 ////////////////////////////////////////////////////////////////////////
--- a/security/manager/ssl/src/SSLServerCertVerification.cpp
+++ b/security/manager/ssl/src/SSLServerCertVerification.cpp
@@ -126,16 +126,18 @@
 #ifdef PR_LOGGING
 extern PRLogModuleInfo* gPIPNSSLog;
 #endif
 
 namespace mozilla { namespace psm {
 
 namespace {
 
+NS_DEFINE_CID(kNSSComponentCID, NS_NSSCOMPONENT_CID);
+
 NSSCleanupAutoPtrClass(CERTCertificate, CERT_DestroyCertificate)
 NSSCleanupAutoPtrClass_WithParam(PLArenaPool, PORT_FreeArena, FalseParam, false)
 
 // do not use a nsCOMPtr to avoid static initializer/destructor
 nsIThreadPool * gCertVerificationThreadPool = nullptr;
 
 // We avoid using a mutex for the success case to avoid lock-related
 // performance issues. However, we do use a lock in the error case to simplify
--- a/security/manager/ssl/src/nsCMS.cpp
+++ b/security/manager/ssl/src/nsCMS.cpp
@@ -22,16 +22,18 @@ using namespace mozilla;
 using namespace mozilla::psm;
 
 #ifdef PR_LOGGING
 extern PRLogModuleInfo* gPIPNSSLog;
 #endif
 
 using namespace mozilla;
 
+static NS_DEFINE_CID(kNSSComponentCID, NS_NSSCOMPONENT_CID);
+
 NS_IMPL_ISUPPORTS2(nsCMSMessage, nsICMSMessage, nsICMSMessage2)
 
 nsCMSMessage::nsCMSMessage()
 {
   m_cmsMsg = nullptr;
 }
 nsCMSMessage::nsCMSMessage(NSSCMSMessage *aCMSMsg)
 {
--- a/security/manager/ssl/src/nsKeygenHandler.cpp
+++ b/security/manager/ssl/src/nsKeygenHandler.cpp
@@ -64,16 +64,17 @@ const SEC_ASN1Template SECKEY_PQGParamsT
     { SEC_ASN1_SEQUENCE, 0, nullptr, sizeof(PQGParams) },
     { SEC_ASN1_INTEGER, offsetof(PQGParams,prime) },
     { SEC_ASN1_INTEGER, offsetof(PQGParams,subPrime) },
     { SEC_ASN1_INTEGER, offsetof(PQGParams,base) },
     { 0, }
 };
 
 
+static NS_DEFINE_IID(kIDOMHTMLSelectElementIID, NS_IDOMHTMLSELECTELEMENT_IID);
 static NS_DEFINE_CID(kNSSComponentCID, NS_NSSCOMPONENT_CID);
 
 static PQGParams *
 decode_pqg_params(char *aStr)
 {
     unsigned char *buf = nullptr;
     unsigned int len;
     PLArenaPool *arena = nullptr;
--- a/security/manager/ssl/src/nsNSSIOLayer.cpp
+++ b/security/manager/ssl/src/nsNSSIOLayer.cpp
@@ -57,16 +57,18 @@ using namespace mozilla::psm;
                        //Uses PR_LOG except on Mac where
                        //we always write out to our own
                        //file.
 
 namespace {
 
 NSSCleanupAutoPtrClass(void, PR_FREEIF)
 
+static NS_DEFINE_CID(kNSSComponentCID, NS_NSSCOMPONENT_CID);
+
 /* SSM_UserCertChoice: enum for cert choice info */
 typedef enum {ASK, AUTO} SSM_UserCertChoice;
 
 } // unnamed namespace
 
 #ifdef PR_LOGGING
 extern PRLogModuleInfo* gPIPNSSLog;
 #endif
@@ -1710,21 +1712,21 @@ static const SEC_ASN1Template cert_Certi
       0, nullptr, sizeof(CERTCertificateScopeEntry) },
     { SEC_ASN1_ANY,
       offsetof(CERTCertificateScopeEntry, derConstraint) },
     { SEC_ASN1_OPTIONAL | SEC_ASN1_INTEGER,
       offsetof(CERTCertificateScopeEntry, derPort) },
     { 0 }
 };
 
-#if 0
 static const SEC_ASN1Template cert_CertificateScopeOfUseTemplate[] = {
     { SEC_ASN1_SEQUENCE_OF, 0, cert_CertificateScopeEntryTemplate }
 };
 
+#if 0
 /* 
  * decodes the extension data and create CERTCertificateScopeEntry that can
  * be consumed by the code
  */
 static
 SECStatus cert_DecodeScopeOfUseEntries(PRArenaPool* arena, SECItem* extData,
                                        CERTCertificateScopeEntry*** entries,
                                        int* numEntries)
--- a/startupcache/StartupCache.cpp
+++ b/startupcache/StartupCache.cpp
@@ -83,16 +83,17 @@ private:
   {
     mozilla::scache::StartupCache* sc =
       mozilla::scache::StartupCache::GetSingleton();
     return sc ? sc->HeapSizeOfIncludingThis(MallocSizeOf) : 0;
   }
 };
 
 static const char sStartupCacheName[] = "startupCache." SC_WORDSIZE "." SC_ENDIAN;
+static NS_DEFINE_CID(kZipReaderCID, NS_ZIPREADER_CID);
 
 StartupCache*
 StartupCache::GetSingleton()
 {
   if (!gStartupCache) {
     if (XRE_GetProcessType() != GeckoProcessType_Default) {
       return nullptr;
     }
--- a/toolkit/components/places/nsNavHistory.cpp
+++ b/toolkit/components/places/nsNavHistory.cpp
@@ -97,16 +97,18 @@ using namespace mozilla::places;
 #define PREF_FREC_UNVISITED_BOOKMARK_BONUS_DEF  140
 #define PREF_FREC_UNVISITED_TYPED_BONUS         "places.frecency.unvisitedTypedBonus"
 #define PREF_FREC_UNVISITED_TYPED_BONUS_DEF     200
 
 // In order to avoid calling PR_now() too often we use a cached "now" value
 // for repeating stuff.  These are milliseconds between "now" cache refreshes.
 #define RENEW_CACHED_NOW_TIMEOUT ((int32_t)3 * PR_MSEC_PER_SEC)
 
+static const int64_t USECS_PER_DAY = (int64_t)PR_USEC_PER_SEC * 60 * 60 * 24;
+
 // character-set annotation
 #define CHARSET_ANNO NS_LITERAL_CSTRING("URIProperties/characterSet")
 
 // These macros are used when splitting history by date.
 // These are the day containers and catch-all final container.
 #define HISTORY_ADDITIONAL_DATE_CONT_NUM 3
 // We use a guess of the number of months considering all of them 30 days
 // long, but we split only the last 6 months.
--- a/toolkit/crashreporter/nsExceptionHandler.cpp
+++ b/toolkit/crashreporter/nsExceptionHandler.cpp
@@ -190,28 +190,37 @@ static char* androidUserSerial = nullptr
 static const char kCrashTimeParameter[] = "CrashTime=";
 static const int kCrashTimeParameterLen = sizeof(kCrashTimeParameter)-1;
 
 static const char kTimeSinceLastCrashParameter[] = "SecondsSinceLastCrash=";
 static const int kTimeSinceLastCrashParameterLen =
                                      sizeof(kTimeSinceLastCrashParameter)-1;
 
 static const char kSysMemoryParameter[] = "SystemMemoryUsePercentage=";
+static const int kSysMemoryParameterLen = sizeof(kSysMemoryParameter)-1;
 
 static const char kTotalVirtualMemoryParameter[] = "TotalVirtualMemory=";
+static const int kTotalVirtualMemoryParameterLen =
+  sizeof(kTotalVirtualMemoryParameter)-1;
 
 static const char kAvailableVirtualMemoryParameter[] = "AvailableVirtualMemory=";
+static const int kAvailableVirtualMemoryParameterLen =
+  sizeof(kAvailableVirtualMemoryParameter)-1;
 
 static const char kOOMAllocationSizeParameter[] = "OOMAllocationSize=";
 static const int kOOMAllocationSizeParameterLen =
   sizeof(kOOMAllocationSizeParameter)-1;
 
 static const char kAvailablePageFileParameter[] = "AvailablePageFile=";
+static const int kAvailablePageFileParameterLen =
+  sizeof(kAvailablePageFileParameter)-1;
 
 static const char kAvailablePhysicalMemoryParameter[] = "AvailablePhysicalMemory=";
+static const int kAvailablePhysicalMemoryParameterLen =
+  sizeof(kAvailablePhysicalMemoryParameter)-1;
 
 static const char kIsGarbageCollectingParameter[] = "IsGarbageCollecting=";
 static const int kIsGarbageCollectingParameterLen =
   sizeof(kIsGarbageCollectingParameter)-1;
 
 // this holds additional data sent via the API
 static Mutex* crashReporterAPILock;
 static Mutex* notesFieldLock;
--- a/toolkit/xre/nsSigHandlers.cpp
+++ b/toolkit/xre/nsSigHandlers.cpp
@@ -34,27 +34,27 @@
 #if defined(SOLARIS)
 #include <sys/resource.h>
 #include <ucontext.h>
 #endif
 
 static char _progname[1024] = "huh?";
 static unsigned int _gdb_sleep_duration = 300;
 
+// NB: keep me up to date with the same variable in
+// ipc/chromium/chrome/common/ipc_channel_posix.cc
+static const int kClientChannelFd = 3;
+
 #if defined(LINUX) && defined(DEBUG) && \
       (defined(__i386) || defined(__x86_64) || defined(PPC))
 #define CRAWL_STACK_ON_SIGSEGV
 #endif
 
 #if defined(CRAWL_STACK_ON_SIGSEGV)
 
-// NB: keep me up to date with the same variable in
-// ipc/chromium/chrome/common/ipc_channel_posix.cc
-static const int kClientChannelFd = 3;
-
 #include <unistd.h>
 #include "nsISupportsUtils.h"
 #include "nsStackWalk.h"
 
 extern "C" {
 
 static void PrintStackFrame(void *aPC, void *aSP, void *aClosure)
 {
--- a/widget/cocoa/nsNativeThemeCocoa.mm
+++ b/widget/cocoa/nsNativeThemeCocoa.mm
@@ -272,16 +272,20 @@ static void DrawFocusRing(NSRect rect, f
     DrawFocusRing(rect, NSHeight(rect) / 2);
   }
 }
 
 @end
   
 #endif
 
+// Copied from nsLookAndFeel.h
+// Apple hasn't defined a constant for scollbars with two arrows on each end, so we'll use this one.
+static const int kThemeScrollBarArrowsBoth = 2;
+
 #define HITHEME_ORIENTATION kHIThemeOrientationNormal
 #define MAX_FOCUS_RING_WIDTH 4
 
 // These enums are for indexing into the margin array.
 enum {
   leopardOS = 0
 };
 
--- a/xpcom/components/nsComponentManager.cpp
+++ b/xpcom/components/nsComponentManager.cpp
@@ -90,34 +90,52 @@ extern mozilla::Module const *const *con
 
 // Bloated registry buffer size to improve startup performance -- needs to
 // be big enough to fit the entire file into memory or it'll thrash.
 // 512K is big enough to allow for some future growth in the registry.
 #define BIG_REGISTRY_BUFLEN   (512*1024)
 
 // Common Key Names
 const char classIDKeyName[]="classID";
+const char classesKeyName[]="contractID";
 const char componentsKeyName[]="components";
 const char xpcomComponentsKeyName[]="software/mozilla/XPCOM/components";
 const char xpcomKeyName[]="software/mozilla/XPCOM";
 
 // Common Value Names
+const char classIDValueName[]="ClassID";
+const char classNameValueName[]="ClassName";
+const char componentCountValueName[]="ComponentsCount";
+const char componentTypeValueName[]="ComponentType";
+const char contractIDValueName[]="ContractID";
 const char fileSizeValueName[]="FileSize";
+const char inprocServerValueName[]="InprocServer";
 const char lastModValueName[]="LastModTimeStamp";
 const char nativeComponentType[]="application/x-mozilla-native";
 const char staticComponentType[]="application/x-mozilla-static";
+const char jarComponentType[]="application/x-mozilla-jarjs";
+const char versionValueName[]="VersionString";
+
+const static char XPCOM_ABSCOMPONENT_PREFIX[] = "abs:";
+const static char XPCOM_RELCOMPONENT_PREFIX[] = "rel:";
+const static char XPCOM_GRECOMPONENT_PREFIX[] = "gre:";
+
+static const char gIDFormat[] =
+  "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}";
+
 
 #define NS_EMPTY_IID                                 \
 {                                                    \
     0x00000000,                                      \
     0x0000,                                          \
     0x0000,                                          \
     {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} \
 }
 
+NS_DEFINE_CID(kEmptyCID, NS_EMPTY_IID);
 NS_DEFINE_CID(kCategoryManagerCID, NS_CATEGORYMANAGER_CID);
 
 #define UID_STRING_LENGTH 39
 
 nsresult
 nsGetServiceFromCategory::operator()(const nsIID& aIID, void** aInstancePtr) const
 {
     nsresult rv;
--- a/xpcom/ds/TimeStamp_darwin.cpp
+++ b/xpcom/ds/TimeStamp_darwin.cpp
@@ -25,16 +25,17 @@
 #include "nsDebug.h"
 
 // Estimate of the smallest duration of time we can measure.
 static uint64_t sResolution;
 static uint64_t sResolutionSigDigs;
 
 static const uint64_t kNsPerMs   =    1000000;
 static const uint64_t kUsPerSec  =    1000000;
+static const uint64_t kNsPerSec  = 1000000000;
 static const double kNsPerMsd    =    1000000.0;
 static const double kNsPerSecd   = 1000000000.0;
 
 static bool gInitialized = false;
 static double sNsPerTick;
 
 static uint64_t
 ClockTime()
--- a/xpcom/glue/nsID.cpp
+++ b/xpcom/glue/nsID.cpp
@@ -1,20 +1,21 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #include "nsID.h"
 #include "prprf.h"
 #include "nsMemory.h"
 
-#ifndef XPCOM_GLUE_AVOID_NSPR
-static const char gIDFormat[] =
+static const char gIDFormat[] = 
   "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}";
-#endif
+
+static const char gIDFormat2[] = 
+  "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x";
 
 
 /**
  * Multiplies the_int_var with 16 (0x10) and adds the value of the
  * hexadecimal digit the_char. If it fails it returns false from
  * the function it's used in.
  */
 
--- a/xpcom/glue/nsVoidArray.cpp
+++ b/xpcom/glue/nsVoidArray.cpp
@@ -12,16 +12,17 @@
 #include "nsISupportsImpl.h" // for nsTraceRefcnt
 #include "nsAlgorithm.h"
 
 /**
  * Grow the array by at least this many elements at a time.
  */
 static const int32_t kMinGrowArrayBy = 8;
 static const int32_t kMaxGrowArrayBy = 1024;
+static const int32_t kAutoClearCompactSizeFactor = 4;
 
 /**
  * This is the threshold (in bytes) of the mImpl struct, past which
  * we'll force the array to grow geometrically
  */
 static const int32_t kLinearThreshold = 24 * sizeof(void *);
 
 /**
--- a/xpcom/threads/HangMonitor.cpp
+++ b/xpcom/threads/HangMonitor.cpp
@@ -29,23 +29,21 @@ namespace mozilla { namespace HangMonito
 /**
  * A flag which may be set from within a debugger to disable the hang
  * monitor.
  */
 volatile bool gDebugDisableHangMonitor = false;
 
 const char kHangMonitorPrefName[] = "hangmonitor.timeout";
 
-#ifdef REPORT_CHROME_HANGS
 #ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
 const char kTelemetryPrefName[] = "toolkit.telemetry.enabledPreRelease";
 #else
 const char kTelemetryPrefName[] = "toolkit.telemetry.enabled";
 #endif
-#endif
 
 // Monitor protects gShutdown and gTimeout, but not gTimestamp which rely on
 // being atomically set by the processor; synchronization doesn't really matter
 // in this use case.
 Monitor* gMonitor;
 
 // The timeout preference, in seconds.
 int32_t gTimeout;
--- a/xpfe/components/directory/nsDirectoryViewer.cpp
+++ b/xpfe/components/directory/nsDirectoryViewer.cpp
@@ -49,16 +49,17 @@
 #include "nsICategoryManager.h"
 #include "nsXPCOMCID.h"
 #include "nsIDocument.h"
 #include "mozilla/Preferences.h"
 #include "nsCxPusher.h"
 
 using namespace mozilla;
 
+static const int FORMAT_HTML = 2;
 static const int FORMAT_XUL = 3;
 
 //----------------------------------------------------------------------
 //
 // Common CIDs
 //
 
 static NS_DEFINE_CID(kRDFServiceCID,             NS_RDFSERVICE_CID);