Author: spouliot
Date: 2008-02-20 10:42:24 -0500 (Wed, 20 Feb 2008)
New Revision: 96262
Modified:
trunk/olive/class/System.Silverlight/System.Windows.Browser/BrowserInformation.cs
trunk/olive/class/System.Silverlight/System.Windows.Browser/ChangeLog
trunk/olive/class/System.Silverlight/System.Windows.Browser/HtmlPage.cs
Log:
2008-02-20 Sebastien Pouliot <[EMAIL PROTECTED]>
* BrowserInformation.cs: Fix pinvoke to avoid crashes in monotone
* HtmlPage.cs: Remove bandaid (added 2 weeks ago).
Modified:
trunk/olive/class/System.Silverlight/System.Windows.Browser/BrowserInformation.cs
===================================================================
---
trunk/olive/class/System.Silverlight/System.Windows.Browser/BrowserInformation.cs
2008-02-20 15:25:07 UTC (rev 96261)
+++
trunk/olive/class/System.Silverlight/System.Windows.Browser/BrowserInformation.cs
2008-02-20 15:42:24 UTC (rev 96262)
@@ -40,15 +40,19 @@
[DllImport ("moonplugin")]
static extern void plugin_instance_get_browser_information
(IntPtr plugin_handle,
- out
string name, out string version,
- out
string platform, out string userAgent,
- out
bool cookieEnabled);
+ out IntPtr name, out IntPtr version, out IntPtr
platform, out IntPtr userAgent,
+ [MarshalAs(UnmanagedType.I1)] ref bool cookieEnabled);
internal BrowserInformation ()
{
+ IntPtr name, version, platform, user_agent;
plugin_instance_get_browser_information
(WebApplication.Current.PluginHandle,
out name, out
version, out platform, out user_agent,
- out
cookie_enabled);
+ ref
cookie_enabled);
+ this.name = Marshal.PtrToStringAnsi (name);
+ this.version = Marshal.PtrToStringAnsi (version);
+ this.platform = Marshal.PtrToStringAnsi (platform);
+ this.user_agent = Marshal.PtrToStringAnsi (user_agent);
}
public BrowserInformation (string name, string version, string
platform, string userAgent, bool cookieEnabled)
Modified: trunk/olive/class/System.Silverlight/System.Windows.Browser/ChangeLog
===================================================================
--- trunk/olive/class/System.Silverlight/System.Windows.Browser/ChangeLog
2008-02-20 15:25:07 UTC (rev 96261)
+++ trunk/olive/class/System.Silverlight/System.Windows.Browser/ChangeLog
2008-02-20 15:42:24 UTC (rev 96262)
@@ -1,3 +1,8 @@
+2008-02-20 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * BrowserInformation.cs: Fix pinvoke to avoid crashes in monotone
+ * HtmlPage.cs: Remove bandaid (added 2 weeks ago).
+
2007-10-22 Chris Toshok <[EMAIL PROTECTED]>
* ScriptableAttribute.cs: sealed.
Modified:
trunk/olive/class/System.Silverlight/System.Windows.Browser/HtmlPage.cs
===================================================================
--- trunk/olive/class/System.Silverlight/System.Windows.Browser/HtmlPage.cs
2008-02-20 15:25:07 UTC (rev 96261)
+++ trunk/olive/class/System.Silverlight/System.Windows.Browser/HtmlPage.cs
2008-02-20 15:42:24 UTC (rev 96262)
@@ -51,8 +51,7 @@
public static BrowserInformation BrowserInformation {
get {
if (browser_info == null)
- browser_info = new BrowserInformation
(String.Empty, String.Empty, String.Empty, String.Empty, true);
-// browser_info = new BrowserInformation
();
+ browser_info = new BrowserInformation
();
return browser_info;
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches