incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject svn commit: r1374460 - in /incubator/flex/sdk/branches/develop/mustella/as3/src/mustella: CompareBitmap.as ResetComponent.as
Date Fri, 17 Aug 2012 22:32:29 GMT
Author: aharui
Date: Fri Aug 17 22:32:29 2012
New Revision: 1374460

URL: http://svn.apache.org/viewvc?rev=1374460&view=rev
Log:
Try to reduce occurrence of timeouts due to LocalConnection hangs.

Modified:
    incubator/flex/sdk/branches/develop/mustella/as3/src/mustella/CompareBitmap.as
    incubator/flex/sdk/branches/develop/mustella/as3/src/mustella/ResetComponent.as

Modified: incubator/flex/sdk/branches/develop/mustella/as3/src/mustella/CompareBitmap.as
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/as3/src/mustella/CompareBitmap.as?rev=1374460&r1=1374459&r2=1374460&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/as3/src/mustella/CompareBitmap.as (original)
+++ incubator/flex/sdk/branches/develop/mustella/as3/src/mustella/CompareBitmap.as Fri Aug
17 22:32:29 2012
@@ -154,25 +154,27 @@ public class CompareBitmap extends Asser
 	 */
 	public function CompareBitmap() 
 	{ 
-		if (!connection)
+		if (useRemoteDiffer)
 		{
-			connection = new LocalConnection();
-			connection.allowDomain("*");
-			connection.addEventListener(StatusEvent.STATUS, statusHandler);
-
-			commandconnection = new LocalConnection();
-			commandconnection.allowDomain("*");
-
-			try
+			if (!connection)
 			{
-				commandconnection.connect("_ImageDifferCommands");
-			}
-			catch (e:Error)
-			{
-				trace("connection failed");
+				connection = new LocalConnection();
+				connection.allowDomain("*");
+				connection.addEventListener(StatusEvent.STATUS, statusHandler);
+	
+				commandconnection = new LocalConnection();
+				commandconnection.allowDomain("*");
+	
+				try
+				{
+					commandconnection.connect("_ImageDifferCommands");
+				}
+				catch (e:Error)
+				{
+					trace("connection failed");
+				}
 			}
 		}
-
 	}
 
 	override public function execute(root:DisplayObject, context:UnitTester, testCase:TestCase,
testResult:TestResult):Boolean

Modified: incubator/flex/sdk/branches/develop/mustella/as3/src/mustella/ResetComponent.as
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/as3/src/mustella/ResetComponent.as?rev=1374460&r1=1374459&r2=1374460&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/as3/src/mustella/ResetComponent.as (original)
+++ incubator/flex/sdk/branches/develop/mustella/as3/src/mustella/ResetComponent.as Fri Aug
17 22:32:29 2012
@@ -25,6 +25,8 @@ import flash.events.KeyboardEvent;
 import flash.events.FocusEvent;
 import flash.net.LocalConnection;
 import flash.system.ApplicationDomain;
+import flash.system.Capabilities;
+import flash.system.System;
 import flash.ui.Keyboard;
 import flash.utils.getQualifiedClassName;
 import flash.utils.getTimer;
@@ -427,6 +429,11 @@ public class ResetComponent extends Test
 
     private function attemptGC():void
     {
+		if (Capabilities.isDebugger)
+		{
+			System.gc();
+			return;
+		}
         // unsupported hack that seems to force a full GC
         try 
         {



Mime
View raw message