Author: jbevain
Date: 2007-11-20 09:58:45 -0500 (Tue, 20 Nov 2007)
New Revision: 89978

Modified:
   trunk/moon/plugin/ChangeLog
   trunk/moon/plugin/plugin-class.cpp
Log:
2007-11-20  Jb Evain  <[EMAIL PROTECTED]>

        * plugin-class.cpp (MoonlightContentObject::Invoke):
                return null instead of undefined, like SL 1.0 does.



Modified: trunk/moon/plugin/ChangeLog
===================================================================
--- trunk/moon/plugin/ChangeLog 2007-11-20 14:52:01 UTC (rev 89977)
+++ trunk/moon/plugin/ChangeLog 2007-11-20 14:58:45 UTC (rev 89978)
@@ -1,5 +1,10 @@
 2007-11-20  Jb Evain  <[EMAIL PROTECTED]>
 
+       * plugin-class.cpp (MoonlightContentObject::Invoke):
+               return null instead of undefined, like SL 1.0 does.
+
+2007-11-20  Jb Evain  <[EMAIL PROTECTED]>
+
        * plugin-class.h (html_get_element_text): add a function
        to get the `innerText` of an html element from its id.
        * plugin-class.cpp (html_get_element_text): implement it.

Modified: trunk/moon/plugin/plugin-class.cpp
===================================================================
--- trunk/moon/plugin/plugin-class.cpp  2007-11-20 14:52:01 UTC (rev 89977)
+++ trunk/moon/plugin/plugin-class.cpp  2007-11-20 14:58:45 UTC (rev 89978)
@@ -1633,6 +1633,8 @@
        
        switch (id) {
        case MoonId_FindName: {
+               NULL_TO_NPVARIANT (*result);
+
                if (!argCount)
                        return true;
                
@@ -1652,11 +1654,15 @@
        }
 
        case MoonId_CreateObject:
+               NULL_TO_NPVARIANT (*result);
+
                // not implemented yet
                DEBUG_WARN_NOTIMPLEMENTED ("content.createObject");
                return true;
 
        case MoonId_CreateFromXaml: {
+               NULL_TO_NPVARIANT (*result);
+
                if (argCount < 1)
                        return true;
 
@@ -1672,10 +1678,10 @@
                if (dep != NULL) {
                        depobj = EventObjectCreateWrapper (instance, dep);
                        dep->unref ();
-               }
+               } else
+                       return true;
 
                OBJECT_TO_NPVARIANT (depobj, *result);
-
                return true;
        }
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to