commit 5bf2629cddad34a1aa5e6f9a8689c4dcf48b79db Author: Chris Toshok Date: Tue Jun 2 08:04:24 2009 -0700 2009-06-02 Chris Toshok * Deployment.cs (TerminateCurrentApplication): factor this out of CreateApplication and call it from further up in the chain, such that the new application hasn't been unpacked. we were unpacking the new application, then terminating the old one (which removes the new application, not the old one.) diff --git a/class/System.Windows/System.Windows/ChangeLog b/class/System.Windows/System.Windows/ChangeLog index 93a0d45..7044e63 100644 --- a/class/System.Windows/System.Windows/ChangeLog +++ b/class/System.Windows/System.Windows/ChangeLog @@ -1,3 +1,11 @@ +2009-06-02 Chris Toshok + + * Deployment.cs (TerminateCurrentApplication): factor this out of + CreateApplication and call it from further up in the chain, such + that the new application hasn't been unpacked. we were unpacking + the new application, then terminating the old one (which removes + the new application, not the old one.) + 2009-06-01 Chris Toshok * GridLength.cs: if the GridLength's are Auto it doesn't matter diff --git a/class/System.Windows/System.Windows/Deployment.cs b/class/System.Windows/System.Windows/Deployment.cs index ab0f5b2..8b259e5 100644 --- a/class/System.Windows/System.Windows/Deployment.cs +++ b/class/System.Windows/System.Windows/Deployment.cs @@ -147,6 +147,7 @@ namespace System.Windows { } internal bool InitializeDeployment () { + TerminateCurrentApplication (); EntryPointType = "System.Windows.Application"; EntryPointAssembly = typeof (Application).Assembly.GetName ().Name; EntryAssembly = typeof (Application).Assembly; @@ -154,6 +155,7 @@ namespace System.Windows { } internal bool InitializeDeployment (IntPtr plugin, string xapPath) { + TerminateCurrentApplication (); InitializePluginHost (plugin); if (!ExtractXap (xapPath)) return false; @@ -230,6 +232,14 @@ namespace System.Windows { EntryAssembly = asm; } + void TerminateCurrentApplication () + { + if (Application.Current != null) { + Application.Current.Terminate (); + NativeMethods.surface_attach (Deployment.Current.Surface.Native, IntPtr.Zero); + } + } + internal bool CreateApplication () { if (EntryAssembly == null) { Report.Error ("Could not find the entry point assembly"); @@ -264,11 +274,6 @@ namespace System.Windows { foreach (Assembly a in Assemblies) Application.LoadXmlnsDefinitionMappings (a); - - if (Application.Current != null) { - Application.Current.Terminate (); - NativeMethods.surface_attach (Deployment.Current.Surface.Native, IntPtr.Zero); - } Application instance = null; diff --git a/class/tuning/SecurityAttributes/automatic/System.Windows.auto.sc b/class/tuning/SecurityAttributes/automatic/System.Windows.auto.sc index 5dc6ef8..65793fa 100644 --- a/class/tuning/SecurityAttributes/automatic/System.Windows.auto.sc +++ b/class/tuning/SecurityAttributes/automatic/System.Windows.auto.sc @@ -11,7 +11,7 @@ +SC-M: Mono.Kind Mono.NativeMethods::event_object_get_object_type(System.IntPtr) # p/invoke declaration -+SC-M: Mono.Kind Mono.NativeMethods::types_register_type(System.IntPtr,System.String,System.IntPtr,Mono.Kind,System.Boolean,Mono.Kind[],System.Int32) ++SC-M: Mono.Kind Mono.NativeMethods::types_register_type(System.IntPtr,System.String,System.IntPtr,Mono.Kind,System.Boolean,System.Boolean,Mono.Kind[],System.Int32) # p/invoke declaration +SC-M: System.Boolean Mono.NativeMethods::collection_clear(System.IntPtr) diff --git a/class/tuning/SecurityAttributes/automatic/System.Windows.auto.ssc b/class/tuning/SecurityAttributes/automatic/System.Windows.auto.ssc index e72cda7..09e6d9f 100644 --- a/class/tuning/SecurityAttributes/automatic/System.Windows.auto.ssc +++ b/class/tuning/SecurityAttributes/automatic/System.Windows.auto.ssc @@ -1,5 +1,5 @@ # [SecuritySafeCritical] needed inside System.Windows to call all [SecurityCritical] methods -# 462 methods +# 463 methods +SSC-M: System.Void Microsoft.Internal.TextBoxView::.ctor() +SSC-M: Mono.Xaml.ManagedXamlLoader Mono.ApplicationLauncher::CreateXamlLoader(System.IntPtr,System.IntPtr,System.IntPtr,System.String,System.String) @@ -178,6 +178,7 @@ +SSC-M: System.Boolean System.Windows.Deployment::InitializeDeployment(System.IntPtr,System.String) +SSC-M: System.Reflection.Assembly System.Windows.Deployment::LoadXapAssembly(System.String) +SSC-M: System.Void System.Windows.Deployment::SetEntryAssembly(System.Reflection.Assembly) ++SSC-M: System.Void System.Windows.Deployment::TerminateCurrentApplication() +SSC-M: System.Boolean System.Windows.Deployment::CreateApplication() +SSC-M: System.Void System.Windows.Documents.Glyphs::.ctor() +SSC-M: System.Void System.Windows.Documents.Inline::.ctor()