Author: igorz
Date: 2008-01-23 09:08:12 -0500 (Wed, 23 Jan 2008)
New Revision: 93658
Modified:
trunk/mcs/class/System.Web/System.Web.Phantom/Stubs.cs
trunk/mcs/class/System.Web/System.Web.UI/Page.cs
trunk/mcs/class/System.Web/System.Web.UI/Page.jvm.cs
trunk/mcs/class/System.Web/System.Web/HttpApplication.cs
trunk/mcs/class/System.Web/System.Web/HttpResponse.cs
Log:
refactoring
Modified: trunk/mcs/class/System.Web/System.Web/HttpApplication.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpApplication.cs 2008-01-23
14:03:35 UTC (rev 93657)
+++ trunk/mcs/class/System.Web/System.Web/HttpApplication.cs 2008-01-23
14:08:12 UTC (rev 93658)
@@ -666,7 +666,7 @@
Error (this, EventArgs.Empty);
} catch (ThreadAbortException taex){
context.ClearError ();
- if (context.Response.FlagEnd ==
taex.ExceptionState)
+ if (FlagEnd.Value ==
taex.ExceptionState)
// This happens on
Redirect() or End()
Thread.ResetAbort ();
else
@@ -706,7 +706,7 @@
ProcessError (new HttpException ("The
request timed out."));
else {
context.ClearError ();
- if (context.Response.FlagEnd != obj)
+ if (FlagEnd.Value != obj)
context.AddError (taex);
}
Modified: trunk/mcs/class/System.Web/System.Web/HttpResponse.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpResponse.cs 2008-01-23
14:03:35 UTC (rev 93657)
+++ trunk/mcs/class/System.Web/System.Web/HttpResponse.cs 2008-01-23
14:08:12 UTC (rev 93658)
@@ -95,11 +95,6 @@
//
string app_path_mod;
- //
- // Passed as flags
- //
- internal object FlagEnd = new object ();
-
#if NET_2_0
bool is_request_being_redirected;
Encoding headerEncoding;
@@ -586,7 +581,7 @@
return;
if (context.TimeoutPossible) {
- Thread.CurrentThread.Abort (FlagEnd);
+ Thread.CurrentThread.Abort (FlagEnd.Value);
} else {
// If this is called from an async event,
signal the completion
// but don't throw.
@@ -1058,5 +1053,13 @@
output_stream = null;
}
}
+
+#if TARGET_J2EE
+ public
+#endif
+ static class FlagEnd
+ {
+ public static readonly object Value = new object ();
+ }
}
Modified: trunk/mcs/class/System.Web/System.Web.Phantom/Stubs.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Phantom/Stubs.cs 2008-01-23
14:03:35 UTC (rev 93657)
+++ trunk/mcs/class/System.Web/System.Web.Phantom/Stubs.cs 2008-01-23
14:08:12 UTC (rev 93658)
@@ -35,3 +35,13 @@
}
}
}
+
+namespace System.Web
+{
+
+ public static class FlagEnd
+ {
+ public static readonly object Value = new object ();
+ }
+
+}
Modified: trunk/mcs/class/System.Web/System.Web.UI/Page.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI/Page.cs 2008-01-23 14:03:35 UTC
(rev 93657)
+++ trunk/mcs/class/System.Web/System.Web.UI/Page.cs 2008-01-23 14:08:12 UTC
(rev 93658)
@@ -1272,7 +1272,7 @@
HandleException (ex);
#else
} catch (ThreadAbortException taex) {
- if (context.Response.FlagEnd == taex.ExceptionState)
+ if (FlagEnd.Value == taex.ExceptionState)
Thread.ResetAbort ();
else
throw;
Modified: trunk/mcs/class/System.Web/System.Web.UI/Page.jvm.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI/Page.jvm.cs 2008-01-23
14:03:35 UTC (rev 93657)
+++ trunk/mcs/class/System.Web/System.Web.UI/Page.jvm.cs 2008-01-23
14:08:12 UTC (rev 93658)
@@ -318,7 +318,7 @@
void HandleException (Exception ex) {
try {
if (ex is ThreadAbortException) {
- if (_context.Response.FlagEnd ==
((ThreadAbortException) ex).ExceptionState) {
+ if (FlagEnd.Value ==
((ThreadAbortException) ex).ExceptionState) {
Thread.ResetAbort ();
return;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches