Merge branch 'master' of github.com:/mono/moon

This commit is contained in:
Chris Toshok 2011-04-27 08:43:28 -07:00
Родитель c9d4771cb1 01d10e76e4
Коммит e6aefce447
37 изменённых файлов: 68 добавлений и 80 удалений

2
README
Просмотреть файл

@ -27,7 +27,7 @@ Requirements
Do this like this:
git clone git://github.com/mono/moon.git moon
git clone git://github.com/mono/mono.git mono
cd mono && git reset --hard a5c8e2a3 && cd ..
cd mono && git reset --hard b4a65091 && cd ..
git clone git://github.com/mono/mono-basic.git mono-basic
cd mono-basic && git reset --hard 4ef1fbe && cd ..

Просмотреть файл

@ -17,7 +17,6 @@ noinst_DATA = $(assemblies)
CSCFLAGS = /codepage:65001 -d:SANITY -d:NET_1_1 -d:NET_2_0 -d:MOONLIGHT -debug+ -noconfig -r:System -r:System.Core -r:System.Xml -d:AGCLR -unsafe
GMCS = MONO_PATH="../lib/moonlight:$$MONO_PATH" gmcs $(CSCFLAGS) -lib:../lib/moonlight -d:NET_3_0
GACUTIL = gacutil /gacdir $(DESTDIR)$(prefix)/lib /root $(DESTDIR)$(prefix)/lib
system_windows_sources = \

Просмотреть файл

@ -71,17 +71,17 @@ all: ivt-check.exe detect.exe
mono ivt-check.exe $(TRUSTED_ASSEMBLIES)
Moonlight.SecurityModel.dll: $(securitymodel_sources)
mcs $(CECIL) -debug -r:System.Core.dll -t:library -out:$@ $(securitymodel_sources)
$(MCS) $(CECIL) -debug -r:System.Core.dll -t:library -out:$@ $(securitymodel_sources)
find-sc.exe: find-sc.cs Moonlight.SecurityModel.dll
mcs find-sc.cs -debug -out:$@ $(LIBS)
$(MCS) find-sc.cs -debug -out:$@ $(LIBS)
compat: find-sc.exe
mkdir -p compatibility
mono find-sc.exe $(SILVERLIGHT_PLATFORM_CODE) compatibility
detect.exe: detect.cs Moonlight.SecurityModel.dll
mcs detect.cs -debug -out:$@ $(LIBS)
$(MCS) detect.cs -debug -out:$@ $(LIBS)
$(MERGED_SECURITY_ATTRIBUTES_INFO): ivt-check detect.exe $(SECURITY_ATTRIBUTES_MANUAL_INFO) $(SECURITY_ATTRIBUTES_COMPATIBILITY_INFO) $(TRUSTED_ASSEMBLIES)
@ -91,16 +91,16 @@ validate: find-sc.exe
diff -u compatibility moonlight
audit.exe: $(srcdir)/audit.cs Moonlight.SecurityModel.dll
mcs $(srcdir)/audit.cs -debug -out:$@ $(LIBS)
$(MCS) $(srcdir)/audit.cs -debug -out:$@ $(LIBS)
ivt-check.exe: $(srcdir)/ivt-check.cs Moonlight.SecurityModel.dll
mcs $(srcdir)/ivt-check.cs -debug -out:$@ $(LIBS)
$(MCS) $(srcdir)/ivt-check.cs -debug -out:$@ $(LIBS)
ivt-detect.exe: $(srcdir)/ivt-detect.cs Moonlight.SecurityModel.dll
mcs $(srcdir)/ivt-detect.cs -debug -out:$@ $(LIBS)
$(MCS) $(srcdir)/ivt-detect.cs -debug -out:$@ $(LIBS)
ivt-compat.exe: $(srcdir)/ivt-compat.cs Moonlight.SecurityModel.dll
mcs $(srcdir)/ivt-compat.cs -debug -out:$@ $(LIBS)
$(MCS) $(srcdir)/ivt-compat.cs -debug -out:$@ $(LIBS)
# everything that we install in the plugin directory is (somewhat) trusted - even non-platform assemblies
TRUSTED_ASSEMBLIES= \

Просмотреть файл

@ -25,8 +25,6 @@ if USE_2_1_LAUNCHER
CSCFLAGS += -d:NET_2_1_LAUNCHER
endif
GMCS = gmcs $(CSCFLAGS) -lib:../lib/moonlight -r:System.Core.dll
SMCS = mcs -nostdlib -lib:../lib/2.1 -r:mscorlib.dll $(CSCFLAGS) -r:System.Core.dll
GACUTIL = gacutil /gacdir $(DESTDIR)$(prefix)/lib /root $(DESTDIR)$(prefix)/lib
monoloc = `pkg-config --variable=libdir mono`/mono/moonlight
nunit = -r:$(monoloc)/nunit.framework.dll -r:$(monoloc)/nunit.core.dll -r:$(monoloc)/nunit.util.dll

Просмотреть файл

@ -14,8 +14,6 @@ noinst_DATA = $(assemblies)
CSCFLAGS = /codepage:65001 -d:NET_1_1 -d:NET_2_0 -debug+ -noconfig -r:System -r:System.Core -r:System.Windows -d:AGCLR -unsafe
GMCS = gmcs $(CSCFLAGS) -lib:../lib/moonlight
SMCS = mcs -nostdlib -lib:../lib/2.1 -r:mscorlib.dll $(CSCFLAGS)
GACUTIL = gacutil /gacdir $(DESTDIR)$(prefix)/lib /root $(DESTDIR)$(prefix)/lib
monoloc = `pkg-config --variable=libdir mono`/mono/moonlight

Просмотреть файл

@ -14,8 +14,6 @@ noinst_DATA = $(assemblies)
CSCFLAGS = /codepage:65001 -d:NET_1_1 -d:NET_2_0 -debug+ -noconfig -r:System -r:System.Windows -d:AGCLR -unsafe -r:System.Core.dll
GMCS = gmcs $(CSCFLAGS) -lib:../lib/moonlight
SMCS = mcs -nostdlib -lib:../lib/2.1 -r:mscorlib.dll $(CSCFLAGS)
GACUTIL = gacutil /gacdir $(DESTDIR)$(prefix)/lib /root $(DESTDIR)$(prefix)/lib
monoloc = `pkg-config --variable=libdir mono`/mono/moonlight

Просмотреть файл

@ -1,7 +1,7 @@
assembly = System.Windows
NET_2_1_ASSEMBLY_DEPS=-r:System.Runtime.Serialization.dll
NET_3_0_ASSEMBLY_DEPS=
NET_3_0_ASSEMBLY_DEPS=-r:System.Net.dll
sl_secattr = ../SecurityAttributes/$(assembly).secattr
@ -12,7 +12,7 @@ assemblysl_raw = ../lib/2.1_raw/$(assembly).dll
bootstrap_assemblysl = ../lib/2.1-bootstrap/$(assembly).dll
bootstrap_assemblysl_raw = ../lib/2.1_raw-bootstrap/$(assembly).dll
NONBOOTSTRAP_FLAGS_2_1= -r:../lib/2.1/System.Windows.Browser.dll
NONBOOTSTRAP_FLAGS_2_1= -r:../lib/2.1/System.Windows.Browser.dll -r:System.Net.dll
endif
if INCLUDE_DESKTOP_MANAGED_CODE
@ -20,7 +20,7 @@ assemblydesktop = ../lib/moonlight/$(assembly).dll
bootstrap_assemblydesktop = ../lib/moonlight-bootstrap/$(assembly).dll
NONBOOTSTRAP_FLAGS_DESKTOP= -r:../lib/moonlight/System.Windows.Browser.dll
NONBOOTSTRAP_FLAGS_DESKTOP= -r:../lib/moonlight/System.Windows.Browser.dll -r:System.Net.dll
config = $(assemblydesktop).config
endif
@ -43,8 +43,6 @@ if USE_2_1_LAUNCHER
CSCFLAGS += -d:NET_2_1_LAUNCHER
endif
GMCS = MONO_PATH="../lib/moonlight:../lib/moonlight-bootstrap:$$MONO_PATH" gmcs $(CSCFLAGS) -lib:../lib/moonlight,../lib/moonlight-bootstrap -d:NET_3_0
SMCS = mcs -nostdlib -lib:../lib/2.1 -r:mscorlib.dll -r:System.Net $(CSCFLAGS)
GACUTIL = gacutil /gacdir $(DESTDIR)$(prefix)/lib /root $(DESTDIR)$(prefix)/lib
MSRUNTIMECONTROLS=$(srcdir)/../Microsoft.SilverlightControls/RuntimeControls/SilverlightControls
@ -916,12 +914,12 @@ uninstall-local:
check-code: check-static check-dynamic
check-static:
gmcs $(srcdir)/scripts/checks.cs -r:../lib/moonlight/System.Windows.dll -out:check-static.exe
$(GMCS) $(srcdir)/scripts/checks.cs -r:../lib/moonlight/System.Windows.dll -out:check-static.exe
MONO_PATH=../lib/moonlight:$$MONO_PATH mono --debug check-static.exe
> check-static
check-dynamic:
gmcs $(srcdir)/scripts/checks.cs -r:../lib/moonlight/System.Windows.dll -out:check-static.exe
$(GMCS) $(srcdir)/scripts/checks.cs -r:../lib/moonlight/System.Windows.dll -out:check-static.exe
mono --debug check-static.exe generate-test-code > tester.cs
gmcs tester.cs -r:../lib/moonlight/System.Windows.dll -debug:full -nowarn:219
$(GMCS) tester.cs -r:../lib/moonlight/System.Windows.dll -debug:full -nowarn:219
MONO_PATH=../lib/moonlight:$$MONO_PATH mono --debug tester.exe

Просмотреть файл

@ -42,7 +42,7 @@ namespace Mono
private int line_number;
private IntPtr message;
private IntPtr gchandle_ptr;
private uint gchandle_ptr;
public int Number {
get { return number; }
@ -65,11 +65,12 @@ namespace Mono
}
public IntPtr GCHandlePtr {
get { return gchandle_ptr; }
get { return (IntPtr) gchandle_ptr; }
private set { gchandle_ptr = (uint) value.ToInt32 (); }
}
public GCHandle GCHandle {
get { return GCHandle.FromIntPtr (gchandle_ptr); }
get { return GCHandle.FromIntPtr (GCHandlePtr); }
}
public void Dispose ()
@ -79,19 +80,18 @@ namespace Mono
message = IntPtr.Zero;
}
if (gchandle_ptr != IntPtr.Zero) {
GCHandle.FromIntPtr (gchandle_ptr).Free ();
gchandle_ptr = IntPtr.Zero;
if (GCHandlePtr != IntPtr.Zero) {
GCHandle.FromIntPtr (GCHandlePtr).Free ();
GCHandlePtr = IntPtr.Zero;
}
}
public MoonError (Exception ex)
{
GCHandle handle = GCHandle.Alloc (ex);
gchandle_ptr = GCHandle.ToIntPtr (handle);
number = 9;
code = 0;
message = Value.StringToIntPtr (ex.Message);
gchandle_ptr = (uint) GCHandle.ToIntPtr (GCHandle.Alloc (ex));
XamlParseException p = ex as XamlParseException;
if (p != null) {

Просмотреть файл

@ -26,6 +26,8 @@ MCS_ASSEMBLIES = \
MCS_DLLFILES = $(MCS_ASSEMBLIES:%=$(MCS_PATH)/class/lib/moonlight_raw/%.dll)
MCS_COMPILER = $(MCS_PATH)/mcs/mcs.exe
if HAVE_MONO_BASIC
MONO_BASIC_TUNER_ASSEMBLIES = Microsoft.VisualBasic
MONO_BASIC_DLLFILES = $(MONO_BASIC_PATH)/class/lib/2.1/Microsoft.VisualBasic.dll
@ -89,13 +91,14 @@ $(MONO_BASIC_DLLFILES):
$(MAKE) -C $(MONO_BASIC_PATH)/tools/moonlight tune
endif
working.stamp: $(INPUT_FILES)
working.stamp: $(INPUT_FILES) $(MCS_COMPILER)
-mkdir -p $(WORKING_DIR)
for i in $(INPUT_FILES); do cp -p $$i $$i.mdb $(WORKING_DIR); done
-rm $(WORKING_DIR)/Microsoft.VisualBasic.dll.mdb
cp $(MCS_COMPILER) ../lib
touch $(WORKING_FILES) working.stamp
output.stamp: working.stamp $(top_srcdir)/class/lib/tuner/Mono.Tuner.dll
output.stamp: working.stamp $(top_srcdir)/class/lib/tuner/Mono.Tuner.dll $(MCS_COMPILER)
MONO_PATH="../lib/tuner:$$MONO_PATH" $(LINKER) $(TUNER_FLAGS) $(TUNER_DESCS:%=-x %) $(TUNER_STEPS:%=-s %) $(TUNER_MASTERS:%=-i %)
for i in $(DLLFILES); do sn -q -R $(OUTPUT_DIR)/$$i $(srcdir)/../mono.snk; done
-mkdir -p $(MCS_OUTPUT_DIR)

Просмотреть файл

@ -100,6 +100,13 @@ dnl
dnl Export Variables
dnl
GMCS="mono \$(abs_top_builddir)/class/lib/mcs.exe \$(CSCFLAGS) -sdk:2 -lib:\$(abs_top_builddir)/class/lib/moonlight,\$(abs_top_builddir)/class/lib/moonlight-bootstrap -d:NET_3_0"
SMCS="mono \$(abs_top_builddir)/class/lib/mcs.exe \$(CSCFLAGS) -nostdlib -lib:\$(abs_top_builddir)/class/lib/2.1 -r:mscorlib.dll -r:System.Net"
MCS="mono \$(abs_top_builddir)/class/lib/mcs.exe \$(CSCFLAGS) -lib:\$(abs_top_builddir)/class/lib/moonlight,\$(abs_top_builddir)/class/lib/moonlight-bootstrap"
AC_SUBST(GMCS)
AC_SUBST(SMCS)
AC_SUBST(MCS)
AC_PATH_PROG(GACUTIL, gacutil)
AC_SUBST([MOONLIGHT_MONO], [$MONO_PATH/mono/mini/mono])
AC_SUBST([SYSTEM_MONO], mono)
@ -113,7 +120,7 @@ PERF_TOOL_LIBS="$MONO_LIBS $GTK_LIBS $XULRUNNER_LIBS"
AC_SUBST(PERF_TOOL_CFLAGS)
AC_SUBST(PERF_TOOL_LIBS)
MONO_LIBS="-lmono-2.0 -L$MONO_PATH/mono/mini -L$MONO_PATH/mono/mini/.libs"
MONO_LIBS="-lmono-moon -L$MONO_PATH/mono/mini -L$MONO_PATH/mono/mini/.libs"
MONO_STATIC_LIBS="$MONO_PATH/mono/mini/libmono-moon.la"
MOON_CFLAGS="$GLIB_CFLAGS $CAIRO_CFLAGS $FREETYPE2_CFLAGS $FONTCONFIG_CFLAGS $GTK_CFLAGS $ALSA_CFLAGS $PULSEAUDIO_CFLAGS $FFMPEG_CFLAGS $MONO_CFLAGS $DBUS_CFLAGS $CURL_CFLAGS"
dnl MOON_LIBS is partially defined above for the user-plugin build

Просмотреть файл

@ -84,9 +84,9 @@ endif
examples:
@(cd docs/examples; $(MAKE) check)
clean-local:
@(cd tests; $(MAKE) clean)
@(cd docs; $(MAKE) clean)
#clean-local:
# @(cd tests; $(MAKE) clean)
# @(cd docs; $(MAKE) clean)
#
# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros

Просмотреть файл

@ -38,6 +38,7 @@ moonlight_gtk_SNK = $(srcdir)/moonlight-gtk.snk
Moonlight.Gtk.dll: $(moonlight_gtk_dll_CS) $(top_builddir)/class/lib/moonlight/System.Windows.dll
gmcs -debug -out:$@ -target:library -unsafe -doc:moonlight-gtk.xml \
-keyfile:$(moonlight_gtk_SNK) -pkg:gtk-sharp-2.0 \
-r:System.dll \
-r:$(top_builddir)/class/lib/moonlight/System.Windows.dll \
$(moonlight_gtk_dll_CS)

Просмотреть файл

@ -5,7 +5,7 @@ AC_DEFUN([MOONLIGHT_CHECK_EXAMPLES],
dnl examples
dnl
AC_ARG_WITH(examples, [ --with-examples=yes|no Enable examples (defaults=yes)],[],[with_examples=yes])
AC_ARG_WITH(examples, [ --with-examples=yes|no Enable examples (defaults=no)],[],[with_examples=no])
AM_CONDITIONAL(INCLUDE_EXAMPLES, test x$with_examples = xyes)

Просмотреть файл

@ -103,7 +103,7 @@ AC_DEFUN([MOONLIGHT_CHECK_MOZILLA],
dnl Put it all together
dnl
if test x$with_ff2 = xyes -o x$with_ff3 = xyes; then
if test x$with_ff2 = xyes -o x$with_ff3 = xyes -o x$with_ff4 = xyes; then
with_mozilla=yes
fi

Просмотреть файл

@ -11,7 +11,6 @@ perf_tool_SOURCES = \
perf_tool_LDADD = $(PERF_TOOL_LIBS) $(MOON_PROG_LIBS)
MCS = dmcs
RUNTIME = mono
MCS_LIB_FLAGS = -r:Mono.Data.Sqlite -r:System.Data

Просмотреть файл

@ -16,8 +16,8 @@ do
done
if [ x$profile = xdesktop ] ; then
mcs -lib:@prefix@/lib/$libdir -r:mscorlib.dll -r:System.dll -r:System.Core.dll "$@"
mono @prefix@/lib/moonlight/mcs.exe -lib:@prefix@/lib/$libdir -r:mscorlib.dll -r:System.dll -r:System.Core.dll "$@"
else
mcs -lib:@prefix@/lib/$libdir -r:mscorlib.dll -r:System.dll -r:System.Windows.dll -r:System.Windows.Browser.dll -r:System.Core.dll -r:System.Net.dll -r:System.Xml.dll "$@"
mono @prefix@/lib/moonlight/mcs.exe -lib:@prefix@/lib/$libdir -r:mscorlib.dll -r:System.dll -r:System.Windows.dll -r:System.Windows.Browser.dll -r:System.Core.dll -r:System.Net.dll -r:System.Xml.dll "$@"
fi

Просмотреть файл

@ -11,7 +11,7 @@ make-sdk-directories:
@mkdir -p $(SDK4_DIR)
@mkdir -p $(SDK4_REDIST_DIR)
install-data-local: make-sdk-directories install-buildversion install-sdk-assemblies install-sdk-tools install-redist-assemblies
install-data-local: make-sdk-directories install-buildversion install-sdk-assemblies install-redist-assemblies install-compiler
install-buildversion:
@echo $(SILVERLIGHT_4_0_TARGETRUNTIME) > buildversion
@ -44,10 +44,6 @@ install-sdk-assemblies:
# the .mdb file crashes the linker. let's just install the dll for now.
# $(INSTALL) $(CLASS_DIR)/Microsoft.VisualBasic.dll.mdb $(SDK4_DIR)/Microsoft.VisualBasic.dll.mdb
install-sdk-tools:
$(INSTALL) $(TOOLS_DIR)/respack/respack.exe $(SDK4_DIR)/respack.exe
-$(INSTALL) $(TOOLS_DIR)/respack/respack.exe.mdb $(SDK4_DIR)/respack.exe.mdb
install-redist-assemblies:
$(INSTALL) $(CLASS_DIR)/System.Windows.Controls.dll $(SDK4_REDIST_DIR)/System.Windows.Controls.dll
-$(INSTALL) $(CLASS_DIR)/System.Windows.Controls.dll.mdb $(SDK4_REDIST_DIR)/System.Windows.Controls.dll.mdb
@ -57,7 +53,9 @@ install-redist-assemblies:
-$(INSTALL) $(CLASS_DIR)/System.Xml.Linq.dll.mdb $(SDK4_REDIST_DIR)/System.Xml.Linq.dll.mdb
$(INSTALL) $(CLASS_DIR)/System.Xml.Serialization.dll $(SDK4_REDIST_DIR)/System.Xml.Serialization.dll
-$(INSTALL) $(CLASS_DIR)/System.Xml.Serialization.dll.mdb $(SDK4_REDIST_DIR)/System.Xml.Serialization.dll.mdb
install-compiler:
$(INSTALL) $(CLASS_DIR)/../mcs.exe $(SDK_ROOT)/mcs.exe
clean-local:
-rm -rf buildversion

Просмотреть файл

@ -1836,14 +1836,14 @@ DependencyObject::SetValueWithErrorImpl (DependencyProperty *property, const Val
if (current_value) {
if (clearManagedRef && current_value->HoldManagedRef (deployment) && !deployment->IsShuttingDown ()) {
current_value->Strengthen (deployment);
clearManagedRef (this, current_value->AsGCHandle (), property);
clearManagedRef (this, current_value->AsGCHandle ().ToIntPtr (), property);
}
}
// replace it with the new value
if (new_value) {
if (addManagedRef && new_value->HoldManagedRef (deployment) && !deployment->IsShuttingDown ()) {
addManagedRef (this, new_value->AsGCHandle (), property);
addManagedRef (this, new_value->AsGCHandle ().ToIntPtr (), property);
new_value->Weaken (deployment);
}

Просмотреть файл

@ -55,7 +55,7 @@ typedef void (* DestroyUnmanagedEvent) (EventObject *object, int event_id, int t
typedef void (* HandlerMethod) (EventObject *object, int token, gpointer data);
/* @CBindingRequisite */
typedef void (* ManagedRefCallback) (EventObject *referer, GCHandle referent, const void *id);
typedef void (* ManagedRefCallback) (EventObject *referer, void *referent_gchandle, const void *id);
/* @CBindingRequisite */
typedef void (* MentorChangedCallback) (EventObject *object, EventObject *mentor);

Просмотреть файл

@ -682,10 +682,10 @@ Deployment::CreateManagedXamlLoader (gpointer plugin_instance, XamlLoader* nativ
{
MonoObject *loader;
MonoObject *exc = NULL;
GCHandle resource_base;
void *resource_base = NULL;
if (resourceBase)
resource_base = resourceBase->GetGCHandle ();
resource_base = resourceBase->GetGCHandle ().ToIntPtr ();
if (moon_load_xaml == NULL)
return GCHandle::Zero;

Просмотреть файл

@ -1128,7 +1128,7 @@ AutoCreatePropertyValueProvider::GetPropertyValue (DependencyProperty *property)
#endif
if (obj->addManagedRef && value->HoldManagedRef (deployment) && !deployment->IsShuttingDown ()) {
obj->addManagedRef (obj, value->AsGCHandle (), property);
obj->addManagedRef (obj, value->AsGCHandle ().ToIntPtr (), property);
value->Weaken (deployment);
}

Просмотреть файл

@ -45,7 +45,7 @@ FrameworkTemplate::ClearXamlBuffer ()
}
if (holdManagedRef && clearManagedRef && !GetDeployment ()->IsShuttingDown ()) {
// No need to strengthen the Value* because we're deleting it next
clearManagedRef (this, this->parse_template_data->AsGCHandle (), XamlContextWeakRef);
clearManagedRef (this, this->parse_template_data->AsGCHandle ().ToIntPtr (), XamlContextWeakRef);
}
parse_template = NULL;
delete parse_template_data;
@ -62,7 +62,7 @@ FrameworkTemplate::SetXamlBuffer (parse_template_func parse_template, Value *par
this->parse_template = parse_template;
this->parse_template_data = new Value (*parse_template_data);
if (holdManagedRef && addManagedRef && !GetDeployment ()->IsShuttingDown ()) {
addManagedRef (this, this->parse_template_data->AsGCHandle (), XamlContextWeakRef);
addManagedRef (this, this->parse_template_data->AsGCHandle ().ToIntPtr (), XamlContextWeakRef);
this->parse_template_data->Weaken (GetDeployment ());
} else {
// If we can't add a managed ref to the xaml context we may end up with a circular ref

Просмотреть файл

@ -53,6 +53,7 @@ void
Uri::Init ()
{
deployment = Deployment::GetCurrent ();
gchandle = GCHandle::Zero;
scheme = NULL;
host = NULL;
port = 0;
@ -132,7 +133,7 @@ Uri::Clone (const Uri *uri_to_clone)
if (uri_to_clone != NULL && uri_to_clone->GetGCHandle ().IsAllocated ())
gchandle = uri_to_clone->deployment->CloneGCHandle (uri_to_clone->GetGCHandle ());
return new Uri (gchandle);
return gchandle.IsAllocated () ? new Uri (gchandle) : NULL;
}
Uri *
@ -143,7 +144,7 @@ Uri::CloneWithScheme (const Uri *uri_to_clone, const char *scheme)
if (uri_to_clone != NULL && uri_to_clone->GetGCHandle ().IsAllocated ())
gchandle = GCHandle (uri_to_clone->deployment->GetUriFunctions ()->clone_with_scheme (uri_to_clone->GetGCHandle ().ToIntPtr (), scheme));
return new Uri (gchandle);
return gchandle.IsAllocated () ? new Uri (gchandle) : NULL;
}
Uri *

Просмотреть файл

@ -117,6 +117,7 @@ void
Value::Init ()
{
kind = 0;
boxed_valuetype = GCHandle::Zero;
memset (&u, 0, sizeof (u));
SetIsNull (true);
}

Просмотреть файл

@ -58,7 +58,7 @@ WeakRefBase::Set (EventObject *ptr)
// If 'id' is NULL then it means this WeakRef should not be mirrored in managed code
if (id && !obj->GetDeployment ()->IsShuttingDown ()) {
/* We have to check if we're shutting down, since setManagedRef is a managed callback */
obj->clearManagedRef (obj, field->GetManagedHandle (), id);
obj->clearManagedRef (obj, field->GetManagedHandle ().ToIntPtr (), id);
}
}
@ -69,7 +69,7 @@ WeakRefBase::Set (EventObject *ptr)
// If 'id' is NULL then it means this WeakRef should not be mirrored in managed code
if (id && !obj->GetDeployment ()->IsShuttingDown ()) {
/* We have to check if we're shutting down, since setManagedRef is a managed callback */
obj->addManagedRef (obj, field->GetManagedHandle (), id);
obj->addManagedRef (obj, field->GetManagedHandle ().ToIntPtr (), id);
}
}
}

Просмотреть файл

@ -1,5 +1,5 @@
#don't define MOONLIGHT_ONLY when compiling on MS.NET
SMCS = mcs -nostdlib -lib:../lib/2.1 -r:mscorlib.dll $(CSCFLAGS) -codepage:utf8 -keyfile:mono-uia.snk -target:library -define:MOONLIGHT_ONLY
CSCFLAGS = -codepage:utf8 -keyfile:mono-uia.snk -target:library -define:MOONLIGHT_ONLY
EXTRA_DIST = \
$(srcdir)/*.cs \

Просмотреть файл

@ -9,3 +9,4 @@ SUBDIRS= \
Mono.Moonlight.UnitTesting \
Microsoft.SilverlightControls \
moon-unit

Просмотреть файл

@ -4,8 +4,6 @@ if HEAPVIZ
CSCFLAGS += -d:HEAPVIZ
endif
SMCS = mcs -nostdlib -lib:../../../class/lib/2.1 -r:mscorlib.dll $(CSCFLAGS)
SOURCES = \
$(srcdir)/UnitTestHarness/AsynchronousAttribute.cs\
$(srcdir)/UnitTestHarness/BugAttribute.cs\

Просмотреть файл

@ -25,8 +25,6 @@ REFERENCES = \
CSCFLAGS = /codepage:65001 -d:SILVERLIGHT -d:MOONLIGHT -target:library -debug+ -noconfig $(REFERENCES)
SMCS = mcs -nostdlib -lib:../../../../class/lib/2.1 -r:mscorlib.dll $(CSCFLAGS)
FILES= $(shell cat $(srcdir)/$(assembly).sources)
SOURCES = $(foreach file,$(FILES),$(SDK_SRCDIR)/$(file))
SOURCES += $(srcdir)/App.xaml.g.cs

Просмотреть файл

@ -25,8 +25,6 @@ REFERENCES = \
CSCFLAGS = /codepage:65001 -d:SILVERLIGHT -d:MOONLIGHT -target:library -debug+ -noconfig $(REFERENCES)
SMCS = mcs -nostdlib -lib:../../../../class/lib/2.1 -r:mscorlib.dll $(CSCFLAGS)
FILES = $(shell cat $(srcdir)/ControlsExtended.Test.sources)
SOURCES = $(foreach file,$(FILES),$(SDK_SRCDIR)/$(file))
SOURCES += $(srcdir)/App.xaml.g.cs

Просмотреть файл

@ -17,8 +17,6 @@ REFERENCES = \
CSCFLAGS = /codepage:65001 -d:SILVERLIGHT -debug+ -noconfig $(REFERENCES)
SMCS = mcs -nostdlib -lib:../../../../class/lib/2.1 -r:mscorlib.dll $(CSCFLAGS)
sources = \
$(SDK_SRCDIR)/Common.cs \
$(SDK_SRCDIR)/LiveReference.cs \

Просмотреть файл

@ -49,3 +49,4 @@ resign:
-cp $(RESIGN_DLL).mdb .
install:

Просмотреть файл

@ -1,5 +1,3 @@
SMCS = mcs -nostdlib -lib:../../../class/lib/2.1 -r:mscorlib.dll $(CSCFLAGS)
noinst_DATA= Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll
CLEANFILES=Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll \

Просмотреть файл

@ -1,5 +1,3 @@
SMCS = mcs -nostdlib -lib:../../../class/lib/2.1 -r:mscorlib.dll $(CSCFLAGS)
noinst_DATA= Mono.Moonlight.UnitTesting.dll
SOURCES = \

Просмотреть файл

@ -152,7 +152,7 @@ moon-unit.g.resources:
moon-unit.dll: moon-unit.sources moon-unit.g.resources $(CODE_BEHINDS) $(DLLS_TO_EMBED)
@echo Compiling moon-unit.dll
mcs -nostdlib -lib:../../../class/lib/2.1 -r:mscorlib.dll $(CSCFLAGS) -d:TEST -d:NET_2_1 -d:CONTRACTS_FULL -debug+ -target:library -out:moon-unit.dll -r:System.Net.dll $(BROWSER_ASSEMBLIES) $(REFERENCES) @$(top_builddir)/test/2.0/moon-unit/moon-unit.sources $(CODE_BEHINDS) -resource:moon-unit.g.resources -warnaserror+
mono ../../../class/lib/mcs.exe -nostdlib -lib:../../../class/lib/2.1 -r:mscorlib.dll $(CSCFLAGS) -d:TEST -d:NET_2_1 -d:CONTRACTS_FULL -debug+ -target:library -out:moon-unit.dll -r:System.Net.dll $(BROWSER_ASSEMBLIES) $(REFERENCES) @$(top_builddir)/test/2.0/moon-unit/moon-unit.sources $(CODE_BEHINDS) -resource:moon-unit.g.resources -warnaserror+
define XAP_TEMPLATE

Просмотреть файл

@ -16,7 +16,7 @@ $(XAPS): %Leak.xap: $(BUILD_FILES) %Test.cs
@cp $(BUILD_FILES) $*
@-(cd $* && $(SYSTEM_MONO) $(abs_top_builddir)/tools/xamlg/xamlg.exe -sl2app:Leak $(XAML_FILES))
@-(cd $* && $(SYSTEM_MONO) $(abs_top_builddir)/tools/respack/respack.exe Leak.g.resources $(XAML_FILES))
@-(cd $* && mcs -nostdlib -lib:$(abs_top_builddir)/class/lib/2.1 -r:mscorlib.dll -debug+ -r:System.Windows.dll -r:System.Windows.Browser.dll -target:library -out:Leak.dll -resource:Leak.g.resources -warnaserror+ $(SOURCE_FILES) Test.cs $(addsuffix .g.cs,$(XAML_FILES)))
@-(cd $* && $(SMCS) -debug+ -r:System.Windows.dll -r:System.Windows.Browser.dll -target:library -out:Leak.dll -resource:Leak.g.resources -warnaserror+ $(SOURCE_FILES) Test.cs $(addsuffix .g.cs,$(XAML_FILES)))
@-(cd $* && zip -q Leak.xap Leak.dll Leak.dll.mdb AppManifest.xaml Leak.dll Leak.dll.mdb)
@cp Leak.html $*

Просмотреть файл

@ -7,11 +7,8 @@ moon_DATA = respack.exe
EXTRA_DIST = \
respack.cs
CLEANFILES = \
respack \
respack.exe \
respack.exe.mdb \
unrespack
clean-local:
-rm respack respack.exe respack.exe.mdb unrespack
respack.exe: $(srcdir)/respack.cs
gmcs -d:LINQ -debug -out:$@ $(srcdir)/respack.cs $(srcdir)/../Options.cs -r:System.Windows.Forms.dll