Backed out changeset f856bcb5097f (bug 689256) for xpcshell orange on a CLOSED TREE.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 06 Mar 2013 14:37:34 -0500
changeset 123999 bc5920039204c5d436917956ab2211163a87df5f
parent 123998 d7b7c3c5022617451176c01d4a8f2166f64418cb
child 124000 0e67704d6b1818b2a76e1ca96190afa19b65f208
push id24175
push userryanvm@gmail.com
push dateWed, 06 Mar 2013 19:37:31 +0000
treeherdermozilla-inbound@bc5920039204 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs689256
milestone22.0a1
backs outf856bcb5097fd0217b9d76b6092eda6e8ac6e761
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 f856bcb5097f (bug 689256) for xpcshell orange on a CLOSED TREE.
browser/components/sessionstore/test/browser_522375.js
toolkit/components/startup/nsAppStartup.cpp
toolkit/mozapps/extensions/test/browser/browser_addonrepository_performance.js
--- a/browser/components/sessionstore/test/browser_522375.js
+++ b/browser/components/sessionstore/test/browser_522375.js
@@ -1,21 +1,11 @@
 function test() {
   var startup_info = Components.classes["@mozilla.org/toolkit/app-startup;1"].getService(Components.interfaces.nsIAppStartup).getStartupInfo();
   // No .process info on mac
-
-  // Check if we encountered a telemetry error for the the process creation
-  // timestamp and turn the first test into a known failure.
-  var telemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry);
-  var snapshot = telemetry.getHistogramById("STARTUP_MEASUREMENT_ERRORS")
-                          .snapshot();
-
-  if (snapshot.counts[0] == 0)
-    ok(startup_info.process <= startup_info.main, "process created before main is run " + uneval(startup_info));
-  else
-    todo(false, "An error occurred while recording the process creation timestamp, skipping this test");
+  ok(startup_info.process <= startup_info.main, "process created before main is run " + uneval(startup_info));
 
   // on linux firstPaint can happen after everything is loaded (especially with remote X)
   if (startup_info.firstPaint)
     ok(startup_info.main <= startup_info.firstPaint, "main ran before first paint " + uneval(startup_info));
 
   ok(startup_info.main < startup_info.sessionRestored, "Session restored after main " + uneval(startup_info));
 }
--- a/toolkit/components/startup/nsAppStartup.cpp
+++ b/toolkit/components/startup/nsAppStartup.cpp
@@ -786,27 +786,24 @@ NS_IMETHODIMP
 nsAppStartup::GetStartupInfo(JSContext* aCx, JS::Value* aRetval)
 {
   JSObject *obj = JS_NewObject(aCx, NULL, NULL, NULL);
   *aRetval = OBJECT_TO_JSVAL(obj);
 
   PRTime ProcessCreationTimestamp = StartupTimeline::Get(StartupTimeline::PROCESS_CREATION);
 
   if (!ProcessCreationTimestamp) {
-    PRTime MainTimestamp = StartupTimeline::Get(StartupTimeline::MAIN);
     char *moz_app_restart = PR_GetEnv("MOZ_APP_RESTART");
     if (moz_app_restart) {
       ProcessCreationTimestamp = nsCRT::atoll(moz_app_restart) * PR_USEC_PER_MSEC;
     } else {
       ProcessCreationTimestamp = CalculateProcessCreationTimestamp();
     }
-    // Bug 670008 & 689256: Avoid obviously invalid process creation times
-    if ((PR_Now() <= ProcessCreationTimestamp) ||
-        (ProcessCreationTimestamp > MainTimestamp))
-    {
+    // Bug 670008: Avoid obviously invalid process creation times
+    if (PR_Now() <= ProcessCreationTimestamp) {
       ProcessCreationTimestamp = -1;
       Telemetry::Accumulate(Telemetry::STARTUP_MEASUREMENT_ERRORS, StartupTimeline::PROCESS_CREATION);
     }
     StartupTimeline::Record(StartupTimeline::PROCESS_CREATION, ProcessCreationTimestamp);
   }
 
   for (int i = StartupTimeline::PROCESS_CREATION; i < StartupTimeline::MAX_EVENT_ID; ++i) {
     StartupTimeline::Event ev = static_cast<StartupTimeline::Event>(i);
--- a/toolkit/mozapps/extensions/test/browser/browser_addonrepository_performance.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_addonrepository_performance.js
@@ -3,17 +3,16 @@
  */
 
 // Tests that the metadata request includes startup time measurements
 
 let tmp = {};
 Components.utils.import("resource://gre/modules/AddonRepository.jsm", tmp);
 let AddonRepository = tmp.AddonRepository;
 
-var gTelemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry);
 var gManagerWindow;
 var gProvider;
 
 function parseParams(aQuery) {
   let params = {};
 
   for (let param of aQuery.split("&")) {
     let [key, value] = param.split("=");
@@ -37,48 +36,23 @@ function test() {
   function observe(aSubject, aTopic, aData) {
     aSubject.QueryInterface(Ci.nsIChannel);
     let url = aSubject.URI.QueryInterface(Ci.nsIURL);
     if (url.filePath != "/extensions-dummy/metadata") {
       return;
     }
     info(url.query);
 
-    // Check if we encountered telemetry errors and turn the tests for which
-    // we don't have valid data into known failures.
-    let snapshot = gTelemetry.getHistogramById("STARTUP_MEASUREMENT_ERRORS")
-                             .snapshot();
-
-    let tProcessValid = (snapshot.counts[0] == 0);
-    let tMainValid = tProcessValid && (snapshot.counts[2] == 0);
-    let tFirstPaintValid = tProcessValid && (snapshot.counts[5] == 0);
-    let tSessionRestoredValid = tProcessValid && (snapshot.counts[6] == 0);
-
     let params = parseParams(url.query);
 
     is(params.appOS, Services.appinfo.OS, "OS should be correct");
     is(params.appVersion, Services.appinfo.version, "Version should be correct");
-
-    if (tMainValid) {
-      ok(params.tMain >= 0, "Should be a sensible tMain");
-    } else {
-      todo(false, "An error occurred while recording the startup timestamps, skipping this test");
-    }
-
-    if (tFirstPaintValid) {
-      ok(params.tFirstPaint >= 0, "Should be a sensible tFirstPaint");
-    } else {
-      todo(false, "An error occurred while recording the startup timestamps, skipping this test");
-    }
-
-    if (tSessionRestoredValid) {
-      ok(params.tSessionRestored >= 0, "Should be a sensible tSessionRestored");
-    } else {
-      todo(false, "An error occurred while recording the startup timestamps, skipping this test");
-    }
+    ok(params.tMain >= 0, "Should be a sensible tMain");
+    ok(params.tFirstPaint >= 0, "Should be a sensible tFirstPaint");
+    ok(params.tSessionRestored >= 0, "Should be a sensible tSessionRestored");
 
     gSeenRequest = true;
   }
 
   const PREF = "extensions.getAddons.getWithPerformance.url";
 
   // Watch HTTP requests
   Services.obs.addObserver(observe, "http-on-modify-request", false);