Backing out bug 550026 due to orange
authorChris Jones <jones.chris.g@gmail.com>
Thu, 11 Mar 2010 05:06:42 -0600
changeset 39271 e14f2273b395fa429205c8d71c3614217623b84a
parent 39259 24a7155078e370a5de95f1009951e9b4b2f2b2e2
child 39272 a94a5275742c44c6b0a1ab7ed65a4901b5bbe8c7
push id12111
push usercjones@mozilla.com
push dateThu, 11 Mar 2010 11:09:52 +0000
treeherdermozilla-central@e968afb45a8d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs550026
milestone1.9.3a3pre
Backing out bug 550026 due to orange
modules/plugin/test/testplugin/nptest_gtk2.cpp
--- a/modules/plugin/test/testplugin/nptest_gtk2.cpp
+++ b/modules/plugin/test/testplugin/nptest_gtk2.cpp
@@ -664,24 +664,21 @@ CrasherThread(void* data)
 }
 
 bool
 pluginCrashInNestedLoop(InstanceData* instanceData)
 {
   // wait at least long enough for nested loop detector task to be pending ...
   sleep(1);
 
-  // Run the nested loop detector by processing all events that are waiting.
-  bool found_event = false;
-  while (g_main_context_iteration(NULL, FALSE)) {
-    found_event = true;
-  }
-  if (!found_event) {
+  // Run the nested loop detector.  Other events are not expected.
+  if (!g_main_context_iteration(NULL, TRUE)) {
     g_warning("DetectNestedEventLoop did not fire");
     return true; // trigger a test failure
+
   }
 
   // wait at least long enough for the "process browser events" task to be
   // pending ...
   sleep(1);
 
   // we'll be crashing soon, note that fact now to avoid messing with
   // timing too much
@@ -689,24 +686,20 @@ pluginCrashInNestedLoop(InstanceData* in
 
   // schedule the crasher thread ...
   pthread_t crasherThread;
   if (0 != pthread_create(&crasherThread, NULL, CrasherThread, NULL)) {
     g_warning("Failed to create thread");
     return true; // trigger a test failure
   }
 
-  // .. and hope it crashes at about the same time as the "process browser
-  // events" task (that should run in this loop) is being processed in the
-  // parent.
-  found_event = false;
-  while (g_main_context_iteration(NULL, FALSE)) {
-    found_event = true;
-  }
-  if (found_event) {
+  // .. and hope the time it takes to spawn means that it crashes at about the
+  // same time as the "process browser events" task that should run next is
+  // being processed in the parent.  Other events are not expected.
+  if (g_main_context_iteration(NULL, TRUE)) {
     g_warning("Should have crashed in ProcessBrowserEvents");
   } else {
     g_warning("ProcessBrowserEvents did not fire");
   }
 
   // if we get here without crashing, then we'll trigger a test failure
   return true;
 }