Merge m-c to inbound.
authorRyan VanderMeulen <ryanvm@gmail.com>
Sun, 30 Sep 2012 18:32:28 -0400
changeset 108703 31ae286fff781d9cedf951358c19750543740bc7
parent 108702 288a1c96c20b13a27dc534fef6677818897f91ec (current diff)
parent 108687 490b19dde4762606c38ced844a2b29317d4a7071 (diff)
child 108704 4a7836f11aa7d751b7c974cf707d312617ee0982
child 108708 5245844b645d4aa943e5e3ea9accd4c4345309df
child 110970 97d8345d7d23636a4fe4062c4fe2b7d2cbe19e2b
push id23580
push userryanvm@gmail.com
push dateMon, 01 Oct 2012 00:58:26 +0000
treeherdermozilla-central@31ae286fff78 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone18.0a1
first release with
nightly win64
31ae286fff78 / 18.0a1 / 20120930183350 / files
nightly linux32
nightly linux64
nightly mac
nightly win32
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly win64
Merge m-c to inbound.
--- a/dom/imptests/parseFailures.py
+++ b/dom/imptests/parseFailures.py
@@ -28,17 +28,17 @@ def ensuredir(path):
 
 def dumpFailures(lines):
     files = []
     for url, objstr in lines:
         if objstr == '{}\n':
             continue
 
         # Avoid overly large diffs.
-        if url.contains("/editing/"):
+        if '/editing/' in url:
             sep = ':'
         else:
             sep = ': '
 
         jsonpath = 'failures/' + url + '.json'
         files.append(jsonpath)
         ensuredir(jsonpath)
         obj = json.loads(objstr, object_pairs_hook=collections.OrderedDict)
--- a/xpfe/appshell/src/nsWebShellWindow.cpp
+++ b/xpfe/appshell/src/nsWebShellWindow.cpp
@@ -199,27 +199,28 @@ nsresult nsWebShellWindow::Initialize(ns
 
   // Eagerly create an about:blank content viewer with the right principal here,
   // rather than letting it happening in the upcoming call to
   // SetInitialPrincipalToSubject. This avoids creating the about:blank document
   // and then blowing it away with a second one, which can cause problems for the
   // top-level chrome window case. See bug 789773.
   nsCOMPtr<nsIScriptSecurityManager> ssm =
     do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv);
-  MOZ_ASSERT(NS_SUCCEEDED(rv) && ssm);
-  nsCOMPtr<nsIPrincipal> principal;
-  ssm->GetSubjectPrincipal(getter_AddRefs(principal));
-  if (!principal) {
-    ssm->GetSystemPrincipal(getter_AddRefs(principal));
+  if (ssm) { // Sometimes this happens really early  See bug 793370.
+    nsCOMPtr<nsIPrincipal> principal;
+    ssm->GetSubjectPrincipal(getter_AddRefs(principal));
+    if (!principal) {
+      ssm->GetSystemPrincipal(getter_AddRefs(principal));
+    }
+    rv = mDocShell->CreateAboutBlankContentViewer(principal);
+    NS_ENSURE_SUCCESS(rv, rv);
+    nsCOMPtr<nsIDocument> doc = do_GetInterface(mDocShell);
+    NS_ENSURE_TRUE(!!doc, NS_ERROR_FAILURE);
+    doc->SetIsInitialDocument(true);
   }
-  rv = mDocShell->CreateAboutBlankContentViewer(principal);
-  NS_ENSURE_SUCCESS(rv, rv);
-  nsCOMPtr<nsIDocument> doc = do_GetInterface(mDocShell);
-  NS_ENSURE_TRUE(!!doc, NS_ERROR_FAILURE);
-  doc->SetIsInitialDocument(true);
 
   if (nullptr != aUrl)  {
     nsCString tmpStr;
 
     rv = aUrl->GetSpec(tmpStr);
     if (NS_FAILED(rv)) return rv;
 
     NS_ConvertUTF8toUTF16 urlString(tmpStr);