gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1633-ga8388a4
Date: Tue, 02 Jul 2013 20:52:49 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  a8388a42a2a655aafe694777cee9cd39ac57608f (commit)
      from  f57a5a1d6b639e3e05ebc8d38e9e99fd9d77f073 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=a8388a42a2a655aafe694777cee9cd39ac57608f


commit a8388a42a2a655aafe694777cee9cd39ac57608f
Author: Sandro Santilli <address@hidden>
Date:   Tue Jul 2 22:51:28 2013 +0200

    Lazily initialize NetStream properties on first connection

diff --git a/libcore/asobj/NetStream_as.cpp b/libcore/asobj/NetStream_as.cpp
index 0665e3e..b915df9 100644
--- a/libcore/asobj/NetStream_as.cpp
+++ b/libcore/asobj/NetStream_as.cpp
@@ -130,7 +130,7 @@ netstream_class_init(as_object& where, const ObjectURI& uri)
     // NetStream is genuinely a built-in class, but its constructor calls
     // several native functions. It also calls NetConnection.call.
     registerBuiltinClass(where, netstream_new, attachNetStreamInterface,
-            attachPrototypeProperties, uri);
+            NULL, uri); 
 }
 
 void
@@ -1589,6 +1589,14 @@ netstream_new(const fn_call& fn)
         NetConnection_as* nc;
         if (isNativeType(toObject(fn.arg(0), getVM(fn)), nc)) {
             ns->setNetCon(nc);
+            if ( nc->isConnected() ) {
+                // TODO: initialize only once ?
+                // Test it (but keep re-entrancy, in case)
+                as_object* proto = obj->get_prototype();
+                if ( proto ) {
+                    attachPrototypeProperties(*proto);
+                }
+            }
         }
         else {
             IF_VERBOSE_ASCODING_ERRORS(
@@ -1601,7 +1609,6 @@ netstream_new(const fn_call& fn)
     }
     obj->setRelay(ns);
 
-
     return as_value();
 
 }
diff --git a/testsuite/misc-ming.all/NetStream-SquareTest.c 
b/testsuite/misc-ming.all/NetStream-SquareTest.c
index 106eaee..f393f8d 100644
--- a/testsuite/misc-ming.all/NetStream-SquareTest.c
+++ b/testsuite/misc-ming.all/NetStream-SquareTest.c
@@ -91,7 +91,7 @@ main(int argc, char** argv)
        "nc.connect(null);"
        "check(nc.isConnected, 'NetConnection is connected after 
.connect(null)');"
        "check(!NetStream.prototype.hasOwnProperty('currentFPS'));" // version 
7 here
-       "xcheck(!NetStream.prototype.hasOwnProperty('currentFps'));"
+       "check(!NetStream.prototype.hasOwnProperty('currentFps'));"
        "stream = new NetStream();"
        "check_equals ( typeof(stream.bytesTotal), 'undefined' );" // not 
connected..
        "stream.play('fake');" // just test not to segfault..

-----------------------------------------------------------------------

Summary of changes:
 libcore/asobj/NetStream_as.cpp                 |   11 +++++++++--
 testsuite/misc-ming.all/NetStream-SquareTest.c |    2 +-
 2 files changed, 10 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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