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-1634-g404343a
Date: Wed, 03 Jul 2013 07:10:41 +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  404343a510a88352b465ae37026102cd1df705e0 (commit)
      from  a8388a42a2a655aafe694777cee9cd39ac57608f (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=404343a510a88352b465ae37026102cd1df705e0


commit 404343a510a88352b465ae37026102cd1df705e0
Author: Sandro Santilli <address@hidden>
Date:   Wed Jul 3 09:10:04 2013 +0200

    Initialize NetStream prototype only once

diff --git a/libcore/asobj/NetStream_as.cpp b/libcore/asobj/NetStream_as.cpp
index b915df9..034e85c 100644
--- a/libcore/asobj/NetStream_as.cpp
+++ b/libcore/asobj/NetStream_as.cpp
@@ -1590,11 +1590,13 @@ netstream_new(const fn_call& fn)
         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);
+                static as_object* proto = NULL;
+                // initialize prototype only once
+                if ( ! proto ) {
+                    proto = obj->get_prototype();
+                    if ( proto ) {
+                        attachPrototypeProperties(*proto);
+                    }
                 }
             }
         }

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

Summary of changes:
 libcore/asobj/NetStream_as.cpp |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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