gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r12176: Do not use log_trace except


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r12176: Do not use log_trace except for tracing player output, firstly because
Date: Thu, 06 May 2010 13:16:02 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 12176 [merge]
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Thu 2010-05-06 13:16:02 +0200
message:
  Do not use log_trace except for tracing player output, firstly because
  it's not for any other purpose, and secondly because it breaks the
  testsuite.
  
  The ExternalInterface tests are still broken.
  
  Add some code (not yet a testcase) reproducing bug #29771.
added:
  testsuite/misc-ming.all/InitActionTest2.c
modified:
  libbase/log.h
  libcore/MovieClip.cpp
  libcore/as_object.cpp
  libcore/asobj/Array_as.cpp
  libcore/asobj/flash/external/ExternalInterface_as.cpp
  libcore/asobj/flash/net/NetConnection_as.cpp
  libmedia/gst/AudioInputGst.cpp
  plugin/npapi/plugin.cpp
  plugin/npapi/pluginScriptObject.cpp
  testsuite/misc-ming.all/Makefile.am
=== modified file 'libbase/log.h'
--- a/libbase/log.h     2010-05-04 19:15:00 +0000
+++ b/libbase/log.h     2010-05-06 10:21:06 +0000
@@ -400,34 +400,34 @@
 #define IF_VERBOSE_MALFORMED_AMF(x)
 #endif
 
-class DSOEXPORT __Host_Function_Report__ {
+class DSOEXPORT __Host_Function_Report__
+{
 public:
     const char *func;
 
     // Only print function tracing messages when multiple -v
     // options have been supplied. 
     __Host_Function_Report__(void) {
-       log_trace("entering");
+        log_debug("entering");
     }
 
     __Host_Function_Report__(char *_func) {
-       func = _func;
-       log_trace("%s enter", func);
+        func = _func;
+        log_debug("%s enter", func);
     }
 
     __Host_Function_Report__(const char *_func) {
-       func = _func;
-       if (func) {
-           log_trace("%s enter", func);
-       } else {
-           log_trace("No Function Name! enter");
-       }
+        func = _func;
+        if (func) {
+            log_debug("%s enter", func);
+        }
+        else {
+            log_debug("No Function Name! enter");
+        }
     }
 
     ~__Host_Function_Report__(void) {
-       if (LogFile::getDefaultInstance().getVerbosity() > LogFile::LOG_DEBUG) {
-           log_trace("%s returning", func);
-       }
+        log_debug("%s returning", func);
     }
 };
 
@@ -451,10 +451,10 @@
 #define GNASH_REPORT_RETURN
 #else
 #define GNASH_REPORT_FUNCTION \
-    gnash::log_trace("entering")
+    gnash::log_debug("entering")
 
 #define GNASH_REPORT_RETURN \
-    gnash::log_trace("returning")
+    gnash::log_debug("returning")
 #endif
 
 }

=== modified file 'libcore/MovieClip.cpp'
--- a/libcore/MovieClip.cpp     2010-03-21 02:56:34 +0000
+++ b/libcore/MovieClip.cpp     2010-05-06 10:19:43 +0000
@@ -1230,7 +1230,7 @@
         tag->getDepth(), 
         tag->hasCxform() ? &tag->getCxform() : NULL,
         tag->hasMatrix() ? &tag->getMatrix() : NULL,
-        tag->hasRatio()    ? &ratio    : NULL,
+        tag->hasRatio() ? &ratio : NULL,
         NULL);
 }
 

=== modified file 'libcore/as_object.cpp'
--- a/libcore/as_object.cpp     2010-04-21 00:43:23 +0000
+++ b/libcore/as_object.cpp     2010-05-06 10:19:43 +0000
@@ -134,10 +134,11 @@
 public:
 
     as_super(Global_as& gl, as_object* super)
-        : as_object(gl),
-          _super(super)
+        :
+        as_object(gl),
+        _super(super)
        {
-            set_prototype(prototype());
+        set_prototype(prototype());
        }
 
     virtual bool isSuper() const { return true; }

=== modified file 'libcore/asobj/Array_as.cpp'
--- a/libcore/asobj/Array_as.cpp        2010-04-21 02:33:58 +0000
+++ b/libcore/asobj/Array_as.cpp        2010-05-06 10:19:43 +0000
@@ -308,10 +308,7 @@
 {
     int _version;
 
-    as_value_lt(int version)
-        : _version(version)
-    {
-    }
+    as_value_lt(int version) : _version(version) {}
 
     inline int str_cmp(const as_value& a, const as_value& b)
     {

=== modified file 'libcore/asobj/flash/external/ExternalInterface_as.cpp'
--- a/libcore/asobj/flash/external/ExternalInterface_as.cpp     2010-04-22 
00:30:22 +0000
+++ b/libcore/asobj/flash/external/ExternalInterface_as.cpp     2010-05-06 
10:19:43 +0000
@@ -81,8 +81,9 @@
 public:
     
     PropsSerializer(VM& vm)
-        : _st(vm.getStringTable()),
-          _error(false)
+        :
+        _st(vm.getStringTable()),
+        _error(false)
     {}
     
     bool success() const { return !_error; }
@@ -570,7 +571,8 @@
 // namespace gnash {
 
 ExternalInterface_as::ExternalInterface_as(as_object* /*owner*/)
-    : _exceptions(false)
+    :
+    _exceptions(false)
 
 {
     LOG_ONCE( log_unimpl (__FUNCTION__) );

=== modified file 'libcore/asobj/flash/net/NetConnection_as.cpp'
--- a/libcore/asobj/flash/net/NetConnection_as.cpp      2010-04-21 19:29:41 
+0000
+++ b/libcore/asobj/flash/net/NetConnection_as.cpp      2010-05-06 10:19:43 
+0000
@@ -143,7 +143,8 @@
     /// The NetConnection_as owns all ConnectionHandlers, so there is no
     /// need to mark it reachable.
     ConnectionHandler(NetConnection_as& nc)
-        : _nc(nc)
+        :
+        _nc(nc)
     {}
 
     // Object handling connection status messages
@@ -667,7 +668,8 @@
 //----- NetConnection_as ----------------------------------------------------
 
 NetConnection_as::NetConnection_as(as_object* owner)
-    : ActiveRelay(owner),
+    :
+    ActiveRelay(owner),
     _queuedConnections(),
     _currentConnection(0),
     _uri(),

=== modified file 'libmedia/gst/AudioInputGst.cpp'
--- a/libmedia/gst/AudioInputGst.cpp    2010-01-11 06:41:38 +0000
+++ b/libmedia/gst/AudioInputGst.cpp    2010-05-06 10:22:05 +0000
@@ -127,7 +127,7 @@
         gst_element_set_state (element, GST_STATE_NULL);
         if ((strcmp(dev_name, "null") == 0) ||
                 (std::strstr(dev_name, "Monitor") != NULL)) {
-            log_trace("No pulse audio input devices.");
+            log_debug("No pulse audio input devices.");
         }
         else { 
             _audioVect.push_back(new GnashAudio);
@@ -295,7 +295,7 @@
     }
     
     if (strcmp(audio->_deviceName, "audiotest") == 0) {
-        log_trace("%s: You don't have any mics chosen, using audiotestsrc",
+        log_debug("%s: You don't have any mics chosen, using audiotestsrc",
             __FUNCTION__);
         audio->_audioSourceBin = gst_parse_bin_from_description (
             "audiotestsrc name=audioSource",
@@ -352,7 +352,7 @@
     GError *error = NULL;
     gchar *command = NULL;
     if(strcmp(audio->_deviceName, "audiotest") == 0) {
-        log_trace("%s: You don't have any mics chosen, using audiotestsrc",
+        log_debug("%s: You don't have any mics chosen, using audiotestsrc",
             __FUNCTION__);
         audio->_audioSourceBin = gst_parse_bin_from_description (
             "audiotestsrc name=audioSource",
@@ -560,7 +560,7 @@
   switch (GST_MESSAGE_TYPE (msg)) {
 
     case GST_MESSAGE_EOS:
-        log_trace ("End of stream\n");
+        log_debug ("End of stream\n");
         break;
     
     case GST_MESSAGE_ERROR: {
@@ -733,11 +733,11 @@
     int devselect = -1;
     devselect = rcfile.getAudioInputDevice();
     if (devselect == -1) {
-        log_trace("No default audio input device specified, setting to 
testsrc");
+        log_debug("No default audio input device specified, setting to 
testsrc");
         rcfile.setAudioInputDevice(0);
         devselect = rcfile.getAudioInputDevice();
     } else {
-        log_trace("You've specified audio input %d in gnashrc, using that one",
+        log_debug("You've specified audio input %d in gnashrc, using that one",
             devselect);
     }
     

=== modified file 'plugin/npapi/plugin.cpp'
--- a/plugin/npapi/plugin.cpp   2010-04-22 16:22:57 +0000
+++ b/plugin/npapi/plugin.cpp   2010-05-06 10:22:31 +0000
@@ -667,7 +667,7 @@
 nsPluginInstance::handlePlayerRequestsWrapper(GIOChannel* iochan,
         GIOCondition cond, nsPluginInstance* plugin)
 {
-    log_trace(__PRETTY_FUNCTION__);
+    log_debug(__PRETTY_FUNCTION__);
     
     return plugin->handlePlayerRequests(iochan, cond);
 }
@@ -675,7 +675,7 @@
 bool
 nsPluginInstance::handlePlayerRequests(GIOChannel* iochan, GIOCondition cond)
 {
-    log_trace(__PRETTY_FUNCTION__);
+    log_debug(__PRETTY_FUNCTION__);
     
     if ( cond & G_IO_HUP ) {
         gnash::log_debug("Player request channel hang up");

=== modified file 'plugin/npapi/pluginScriptObject.cpp'
--- a/plugin/npapi/pluginScriptObject.cpp       2010-05-04 20:38:42 +0000
+++ b/plugin/npapi/pluginScriptObject.cpp       2010-05-06 10:22:31 +0000
@@ -796,7 +796,7 @@
 bool
 GnashPluginScriptObject::createPipe()
 {
-    log_trace(__PRETTY_FUNCTION__);
+    log_debug(__PRETTY_FUNCTION__);
 
     if ((_sockfds[READFD] == 0) && (_sockfds[WRITEFD] == 0)) {
         int ret = socketpair(AF_UNIX, SOCK_STREAM, 0, _sockfds);
@@ -922,7 +922,7 @@
 bool
 GnashPluginScriptObject::handleInvoke(GIOChannel *iochan, GIOCondition cond)
 {
-    log_trace(__PRETTY_FUNCTION__);
+    log_debug(__PRETTY_FUNCTION__);
     
     if ( cond & G_IO_HUP ) {
         log_debug("Player request channel hang up");
@@ -981,7 +981,7 @@
                                              GIOCondition cond,
                                              GnashPluginScriptObject* plugin)
 {
-    log_trace(__PRETTY_FUNCTION__);
+    log_debug(__PRETTY_FUNCTION__);
     
     return plugin->handleInvoke(iochan, cond);
 }

=== added file 'testsuite/misc-ming.all/InitActionTest2.c'
--- a/testsuite/misc-ming.all/InitActionTest2.c 1970-01-01 00:00:00 +0000
+++ b/testsuite/misc-ming.all/InitActionTest2.c 2010-05-06 09:23:32 +0000
@@ -0,0 +1,87 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <ming.h>
+
+#include "ming_utils.h"
+
+#define OUTPUT_VERSION 8
+#define OUTPUT_FILENAME "InitActionTest2.swf"
+
+
+int
+main(int argc, char** argv)
+{
+    SWFMovie mo;
+    SWFMovieClip mc3, mc2, dejagnuclip;
+    SWFAction ac, ac1;
+    SWFDisplayItem it;
+    SWFShape sha;
+
+    const char *srcdir=".";
+    if (argc > 1) srcdir = argv[1];
+    else {
+        fprintf(stderr, "Usage: %s <mediadir>\n", argv[0]);
+        return 1;
+    }
+
+    Ming_init();
+    mo = newSWFMovieWithVersion(OUTPUT_VERSION);
+    SWFMovie_setDimension(mo, 800, 600);
+    SWFMovie_setRate (mo, 12.0);
+
+    sha = newSWFShape();
+
+    // Character ID 2. Has 1 showframe. Is exported first.
+    mc2 = newSWFMovieClip();
+    SWFMovieClip_add(mc2, (SWFBlock)sha);
+    SWFMovieClip_nextFrame(mc2);
+
+    // Export it.
+    SWFMovie_addExport(mo, (SWFBlock)mc2, "C2");
+       SWFMovie_writeExports(mo);
+
+    // Main timeline actions for frame 1
+    add_actions(mo, "trace('frame 1'); gotoAndStop(3);");
+    
+    // ID 3 is defined here. It has no showframe. It is exported immediately.
+    mc3 = newSWFMovieClip();
+    SWFMovie_addExport(mo, (SWFBlock)mc3, "ctor");
+       SWFMovie_writeExports(mo);
+
+    // Init actions for ID 3
+    ac = newSWFAction(
+    "   _global.ctor = function () {"
+    "       super();"
+    "       trace('Object in Frame 2 is constructed');"
+    "   };"
+    );
+    SWFInitAction ia = newSWFInitAction_withId(ac, 3);
+    SWFMovie_add(mo, (SWFBlock)ia);
+    
+    // Init actions for ID 2 (registered class)
+    ac1 = newSWFAction("Object.registerClass('C2', ctor); "
+            "trace('Registered class');");
+    ia = newSWFInitAction_withId(ac1, 2);
+    SWFMovie_add(mo, (SWFBlock)ia);
+       
+    
+    // Frame 2
+    SWFMovie_nextFrame(mo);
+    add_actions(mo, "trace('Frame 2');");
+    
+    // Place object ID 2 (should be skipped).
+    it = SWFMovie_add(mo, (SWFBlock)mc2);
+    
+    // Frame 3
+    SWFMovie_nextFrame(mo);
+
+    add_actions(mo, "trace('frame 3');");
+    
+    SWFMovie_nextFrame(mo);
+  
+    puts("Saving " OUTPUT_FILENAME );
+    SWFMovie_save(mo, OUTPUT_FILENAME);
+
+    return 0;
+}
+

=== modified file 'testsuite/misc-ming.all/Makefile.am'
--- a/testsuite/misc-ming.all/Makefile.am       2010-04-05 19:54:56 +0000
+++ b/testsuite/misc-ming.all/Makefile.am       2010-05-06 09:23:32 +0000
@@ -221,6 +221,7 @@
 if MING_SUPPORTS_INIT_ACTIONS
 check_PROGRAMS += \
        init_action_test \
+       InitActionTest2 \
        registerClassTest2 \
        $(NULL)
 endif
@@ -348,7 +349,7 @@
 
 if MING_SUPPORTS_INIT_ACTIONS
 check_SCRIPTS += \
-       init_action_testrunner \
+       InitActionTest2Runner \
        registerClassTest2runner \
        $(NULL)
 endif
@@ -1772,6 +1773,17 @@
        -DTGTDIR='"$(abs_builddir)"' \
        $(NULL)
 
+InitActionTest2_SOURCES =      \
+       InitActionTest2.c       \
+       $(NULL)
+InitActionTest2_LDADD = libgnashmingutils.la
+
+InitActionTest2.swf: InitActionTest2
+       ./InitActionTest2 $(top_srcdir)/testsuite/media
+
+InitActionTest2Runner: $(srcdir)/../generic-testrunner.sh InitActionTest2.swf
+       sh $< $(top_builddir) InitActionTest2.swf > $@
+       chmod 755 $@
 
 init_action_test_SOURCES =     \
        init_action_test.c      \
@@ -2155,6 +2167,7 @@
 TEST_CASES += \
        registerClassTest2runner \
        init_action_testrunner \
+       InitAction2TestRunner \
        $(NULL)
 endif
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]