[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/asobj/SharedObject.cpp
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/asobj/SharedObject.cpp |
Date: |
Tue, 22 Jan 2008 10:45:03 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 08/01/22 10:45:02
Modified files:
. : ChangeLog
server/asobj : SharedObject.cpp
Log message:
(sharedobject_getlocal): register the static GcResource with the VM.
Fixes bug #22039, but not the correctness bugs as tested
in the SharedObject.as case.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5462&r2=1.5463
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/SharedObject.cpp?cvsroot=gnash&r1=1.32&r2=1.33
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5462
retrieving revision 1.5463
diff -u -b -r1.5462 -r1.5463
--- ChangeLog 22 Jan 2008 10:35:18 -0000 1.5462
+++ ChangeLog 22 Jan 2008 10:45:01 -0000 1.5463
@@ -1,5 +1,8 @@
2008-01-22 Sandro Santilli <address@hidden>
+ * server/asobj/SharedObject.cpp (sharedobject_getlocal): register the
+ static GcResource with the VM. Fixes bug #22039, but not the
+ correctness bugs as tested in the SharedObject.as case.
* testsuite/actionscript.all/SharedObject.as: test that multiple calls
to SharedObject.getLocal using same key return the same in-memory
object, while changing the key returns a different object.
Index: server/asobj/SharedObject.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/SharedObject.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- server/asobj/SharedObject.cpp 21 Jan 2008 20:55:57 -0000 1.32
+++ server/asobj/SharedObject.cpp 22 Jan 2008 10:45:02 -0000 1.33
@@ -241,8 +241,22 @@
// GNASH_REPORT_FUNCTION;
// This should return a SharedObject, and it's a static function
-// static boost::intrusive_ptr<as_object> obj = new
as_object(getSharedObjectInterface());
- static boost::intrusive_ptr<SharedObject> obj = new SharedObject();
+ // FIXME:
+ // We shouldn't have a single SharedObject static, but one for
+ // each key the user code asks for. These might be maintained
+ // in a static "library" member of the SharedObject class
+ // exposing methods to get one element by name, which would be
+ // either created or reused, taking care about registering
+ // the static with the VM. There will likely be a need to
+ // be signaled restarts as unflushed objects should not be
+ // accessible with their state on restart..
+ //
+ static boost::intrusive_ptr<SharedObject> obj;
+ if ( ! obj )
+ {
+ obj = new SharedObject();
+ obj->getVM().addStatic(obj.get());
+ }
string::size_type pos;
string rootdir;