[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/PropertyList.cpp server/...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/PropertyList.cpp server/... |
Date: |
Wed, 12 Mar 2008 10:32:49 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 08/03/12 10:32:49
Modified files:
. : ChangeLog
server : PropertyList.cpp PropertyList.h as_object.cpp
Log message:
* server/PropertyList.{cpp,h} (setValue): allow passing flags
to use
when creating new properties.
* server/as_object.cpp: avoid the double scan when initializing
members. Have super register a proper __proto__ member.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5884&r2=1.5885
http://cvs.savannah.gnu.org/viewcvs/gnash/server/PropertyList.cpp?cvsroot=gnash&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/gnash/server/PropertyList.h?cvsroot=gnash&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.cpp?cvsroot=gnash&r1=1.104&r2=1.105
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5884
retrieving revision 1.5885
diff -u -b -r1.5884 -r1.5885
--- ChangeLog 12 Mar 2008 10:19:56 -0000 1.5884
+++ ChangeLog 12 Mar 2008 10:32:48 -0000 1.5885
@@ -1,3 +1,10 @@
+2008-03-12 Sandro Santilli <address@hidden>
+
+ * server/PropertyList.{cpp,h} (setValue): allow passing flags to use
+ when creating new properties.
+ * server/as_object.cpp: avoid the double scan when initializing
+ members. Have super register a proper __proto__ member.
+
2008-03-12 Benjamin Wolsey <address@hidden>
* testsuite/actionscript.all: tests for Stage properties and
Index: server/PropertyList.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/PropertyList.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- server/PropertyList.cpp 6 Mar 2008 14:52:20 -0000 1.30
+++ server/PropertyList.cpp 12 Mar 2008 10:32:48 -0000 1.31
@@ -153,14 +153,15 @@
bool
PropertyList::setValue(string_table::key key, as_value val,
- as_object& this_ptr, string_table::key nsId)
+ as_object& this_ptr, string_table::key nsId,
+ const as_prop_flags& flagsIfMissing)
{
container::iterator found = iterator_find(_props, key, nsId);
if (found == _props.end())
{
// create a new member
- Property a(key, nsId, val);
+ Property a(key, nsId, val, flagsIfMissing);
// Non slot properties are negative ordering in insertion order
a.setOrder(- ++mDefaultOrder - 1);
_props.insert(a);
Index: server/PropertyList.h
===================================================================
RCS file: /sources/gnash/gnash/server/PropertyList.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- server/PropertyList.h 6 Mar 2008 14:52:20 -0000 1.25
+++ server/PropertyList.h 12 Mar 2008 10:32:49 -0000 1.26
@@ -199,11 +199,15 @@
/// The namespace in which this should be entered. If 0 is given,
/// this will use the first value found, if it exists.
///
+ /// @param flagsIfMissing
+ /// Flags to associate to the property if a new one is created.
+ ///
/// @return true if the value was successfully set, false
/// otherwise (found a read-only property, most likely).
///
bool setValue(string_table::key key, as_value value,
- as_object& this_ptr, string_table::key namespaceId = 0);
+ as_object& this_ptr, string_table::key namespaceId = 0,
+ const as_prop_flags& flagsIfMissing=0);
/// Reserves a slot number for a property
///
Index: server/as_object.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/as_object.cpp,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -b -r1.104 -r1.105
--- server/as_object.cpp 11 Mar 2008 08:01:36 -0000 1.104
+++ server/as_object.cpp 12 Mar 2008 10:32:49 -0000 1.105
@@ -66,7 +66,7 @@
_ctor(ctor),
_proto(proto)
{
- //set_prototype(getObjectInterface());
+ set_prototype(proto);
}
virtual bool isSuper() const { return true; }
@@ -480,11 +480,7 @@
static string_table::key key = NSV::PROP_uuPROTOuu;
// TODO: check what happens if __proto__ is set as a user-defined
getter/setter
- if (_members.setValue(key, as_value(proto.get()), *this, 0) )
- {
- // TODO: optimize this, don't scan again !
- _members.setFlags(key, flags, 0);
- }
+ _members.setValue(key, as_value(proto.get()), *this, 0, flags);
}
void
@@ -596,7 +592,7 @@
}
// Set (or create) a SimpleProperty
- if (! _members.setValue(key, const_cast<as_value&>(val), *this, nsname)
)
+ if (! _members.setValue(key, const_cast<as_value&>(val), *this, nsname,
flags) )
{
log_error(_("Attempt to initialize read-only property ``%s''"
" on object ``%p'' twice"),
@@ -604,8 +600,6 @@
// We shouldn't attempt to initialize a member twice, should we
?
abort();
}
- // TODO: optimize this, don't scan again !
- _members.setFlags(key, flags, nsname);
}
void
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog server/PropertyList.cpp server/...,
Sandro Santilli <=