[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/builtin_function.h serve...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/builtin_function.h serve... |
Date: |
Mon, 31 Mar 2008 17:17:16 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 08/03/31 17:17:16
Modified files:
. : ChangeLog
server : builtin_function.h
server/asobj : Object.cpp
testsuite/actionscript.all: String.as
Log message:
* server/builtin_function.h: Oops, swapped __constructor__
and constructor..
* server/asobj/Object.cpp: still register all property members,
just visible or not based on version.
* testsuite/actionscript.all/String.as: cleanup tests to set
strictly needed prop flags; test that hasOwnProperty is there
for SWF5 too, just not-visible.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6123&r2=1.6124
http://cvs.savannah.gnu.org/viewcvs/gnash/server/builtin_function.h?cvsroot=gnash&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Object.cpp?cvsroot=gnash&r1=1.48&r2=1.49
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/String.as?cvsroot=gnash&r1=1.53&r2=1.54
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6123
retrieving revision 1.6124
diff -u -b -r1.6123 -r1.6124
--- ChangeLog 31 Mar 2008 16:50:28 -0000 1.6123
+++ ChangeLog 31 Mar 2008 17:17:14 -0000 1.6124
@@ -1,3 +1,13 @@
+2008-03-31 Sandro Santilli <address@hidden>
+
+ * server/builtin_function.h: Oops, swapped __constructor__
+ and constructor..
+ * server/asobj/Object.cpp: still register all property members,
+ just visible or not based on version.
+ * testsuite/actionscript.all/String.as: cleanup tests to set
+ strictly needed prop flags; test that hasOwnProperty is there
+ for SWF5 too, just not-visible.
+
2008-03-31 Benjamin Wolsey <address@hidden>
* testsuite/actionscript.all/Date.as: correct case.
Index: server/builtin_function.h
===================================================================
RCS file: /sources/gnash/gnash/server/builtin_function.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- server/builtin_function.h 31 Mar 2008 14:34:38 -0000 1.17
+++ server/builtin_function.h 31 Mar 2008 17:17:15 -0000 1.18
@@ -48,7 +48,7 @@
as_function(),
_func(func)
{
- init_member(NSV::PROP_uuCONSTRUCTORuu,
as_function::getFunctionConstructor().get());
+ init_member(NSV::PROP_CONSTRUCTOR,
as_function::getFunctionConstructor().get());
}
/// Construct a builtin function/class with the given interface
(possibly none)
@@ -71,11 +71,11 @@
{
if ( useThisAsCtor )
{
- init_member(NSV::PROP_uuCONSTRUCTORuu, this);
+ init_member(NSV::PROP_CONSTRUCTOR, this);
}
else
{
- init_member(NSV::PROP_uuCONSTRUCTORuu,
as_function::getFunctionConstructor().get());
+ init_member(NSV::PROP_CONSTRUCTOR,
as_function::getFunctionConstructor().get());
}
}
Index: server/asobj/Object.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Object.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- server/asobj/Object.cpp 31 Mar 2008 11:55:39 -0000 1.48
+++ server/asobj/Object.cpp 31 Mar 2008 17:17:16 -0000 1.49
@@ -76,25 +76,26 @@
// Object.toLocaleString()
o.init_member("toLocaleString", new
builtin_function(object_toLocaleString));
- if ( target_version < 6 ) return;
+ int swf6flags =
as_prop_flags::dontEnum|as_prop_flags::dontDelete|as_prop_flags::onlySWF6Up;
+ //if ( target_version < 6 ) return;
// Object.addProperty()
- o.init_member("addProperty", vm.getNative(101, 2));
+ o.init_member("addProperty", vm.getNative(101, 2), swf6flags);
// Object.hasOwnProperty()
- o.init_member("hasOwnProperty", vm.getNative(101, 5));
+ o.init_member("hasOwnProperty", vm.getNative(101, 5), swf6flags);
// Object.isPropertyEnumerable()
- o.init_member("isPropertyEnumerable", vm.getNative(101, 7));
+ o.init_member("isPropertyEnumerable", vm.getNative(101, 7), swf6flags);
// Object.isPrototypeOf()
- o.init_member("isPrototypeOf", vm.getNative(101, 6));
+ o.init_member("isPrototypeOf", vm.getNative(101, 6), swf6flags);
// Object.watch()
- o.init_member("watch", vm.getNative(101, 0));
+ o.init_member("watch", vm.getNative(101, 0), swf6flags);
// Object.unwatch()
- o.init_member("unwatch", vm.getNative(101, 1));
+ o.init_member("unwatch", vm.getNative(101, 1), swf6flags);
}
as_object*
Index: testsuite/actionscript.all/String.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/String.as,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -b -r1.53 -r1.54
--- testsuite/actionscript.all/String.as 31 Mar 2008 11:58:47 -0000
1.53
+++ testsuite/actionscript.all/String.as 31 Mar 2008 17:17:16 -0000
1.54
@@ -17,7 +17,7 @@
// Original author: Mike Carlson - June 19th, 2006
-rcsid="$Id: String.as,v 1.53 2008/03/31 11:58:47 strk Exp $";
+rcsid="$Id: String.as,v 1.54 2008/03/31 17:17:16 strk Exp $";
#include "check.as"
check_equals(typeof(String), 'function');
@@ -738,12 +738,12 @@
check_equals(typeof(Object.prototype.toString), 'function');
check_equals(typeof(s.toString), 'function');
check(! delete String.prototype.toString);
-ASSetPropFlags(String.prototype, "toString", 0, 7); // unprotect from deletion
+ASSetPropFlags(String.prototype, "toString", 0, 2); // unprotect from deletion
StringProtoToStringBackup = String.prototype.toString;
check(delete String.prototype.toString);
check_equals(typeof(s.toString), 'function');
check(!delete Object.prototype.toString);
-ASSetPropFlags(Object.prototype, "toString", 0, 7); // unprotect from deletion
+ASSetPropFlags(Object.prototype, "toString", 0, 2); // unprotect from deletion
ObjectProtoToStringBackup = Object.prototype.toString;
check(delete Object.prototype.toString);
check_equals(typeof(s.toString), 'undefined');
@@ -787,18 +787,32 @@
// Test that __proto__ is only hidden, but still existing , in SWF5
//----------------------------------------------------------------------
-ASSetPropFlags(String, "__proto__", 0, 5248); // unhide String.__proto__
+a=new Array(); for (v in String) a.push(v); a.sort();
+#if OUTPUT_VERSION > 5
+ check_equals(a.toString(), "toString");
+#else
+ check_equals(a.length, 0);
+#endif
+
+ASSetPropFlags(String, "__proto__", 0, 128); // unhide String.__proto__
+
+a=new Array(); for (v in String) a.push(v); a.sort();
+check_equals(a.toString(), "toString");
+
check_equals(typeof(String.__proto__), 'object');
check_equals(typeof(Object.prototype), 'object');
Object.prototype.gotcha = 1;
check_equals(String.gotcha, 1);
-Object.prototype.hasOwnProperty = ASnative (101, 5);
+ASSetPropFlags(Object.prototype, "hasOwnProperty", 0, 128); // unhide
Object.prototype.hasOwnProperty
check(!String.__proto__.hasOwnProperty("gotcha"));
check(String.__proto__.__proto__.hasOwnProperty("gotcha")); // function
-check_equals(String.__proto__.__proto__, Object.prototype);
+check_equals(String.__proto__.__proto__, Object.prototype); // hasOwnProperty
doesn't exist in gnash !
+
+a=new Array(); for (v in String) a.push(v); a.sort();
+check_equals(a.toString(), "gotcha,toString");
#if OUTPUT_VERSION < 6
- check_totals(219);
+ check_totals(222);
#else
- check_totals(253);
+ check_totals(256);
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog server/builtin_function.h serve...,
Sandro Santilli <=