search for: __proto__

Displaying 20 results from an estimated 57 matches for "__proto__".

2007 Oct 25
0
12 commits - libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c test/trace
..... Author: Pekka Lampila <pekka.lampila at iki.fi> Date: Thu Oct 25 18:02:11 2007 +0300 Merge commit 'origin' commit 1b395e83331d516388a4370df93936b7f544b1ae Author: Pekka Lampila <pekka.lampila at iki.fi> Date: Thu Oct 25 18:00:58 2007 +0300 Add a test to see how __proto__ is handled in different places diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am index bcada90..5bde4df 100644 --- a/test/trace/Makefile.am +++ b/test/trace/Makefile.am @@ -1261,6 +1261,15 @@ EXTRA_DIST = \ prototype-addProperty-7.swf.trace \ prototype-addProperty-8.swf \ prototyp...
2007 Aug 23
0
10 commits - libswfdec/swfdec_as_function.c libswfdec/swfdec_as_object.c test/trace
...ev/null and b/test/trace/video-properties-6.swf differ diff --git a/test/trace/video-properties-6.swf.trace b/test/trace/video-properties-6.swf.trace new file mode 100644 index 0000000..97a273a --- /dev/null +++ b/test/trace/video-properties-6.swf.trace @@ -0,0 +1,16 @@ +_global.Video = function + __proto__ (hp) = _global.Object.__proto__ + constructor (hp) = _global.Object.constructor + prototype (hp) = object + __proto__ (hp) = _global.Object.prototype + attachVideo (hp) = function + __proto__ (hp) = _global.Object.__proto__ + constructor (hp) = _global.Object.constructor + clea...
2007 Aug 21
0
2 commits - test/trace
...trace/trace_properties.as @@ -2,81 +2,108 @@ function new_empty_object () { var hash = new Object (); + ASSetPropFlags (hash, null, 0, 7); for (var prop in hash) { delete hash[prop]; } return hash; } +#if __SWF_VERSION__ >= 6 function hasOwnProperty (o, prop) { - if (o.__proto__ == undefined || o.__proto__ == "assdofjkaofjojsafjpojsafa") + if (o.hasOwnProperty != undefined) + return o.hasOwnProperty (prop); + + o.hasOwnProperty = Object.prototype.hasOwnProperty; + result = o.hasOwnProperty (prop); + delete o.hasOwnProperty; + return result; +} +#else +//...
2007 Aug 31
0
4 commits - libswfdec/swfdec_as_number.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_player_as.c test/trace
...s.as | 16 ++++++-- 8 files changed, 110 insertions(+), 9 deletions(-) New commits: diff-tree 4305a7503846739da9ce1db2a9c9e83ff45e10ba (from 9f17806b6f4230e268163b78931fe7a0be53dfe9) Author: Pekka Lampila <pekka.lampila at iki.fi> Date: Fri Aug 31 23:45:19 2007 +0300 Delete __proto__ and constructor properties from ASnative and ASconstructor Enable testing for these in asfunction-properties diff --git a/libswfdec/swfdec_player_as.c b/libswfdec/swfdec_player_as.c index d9c49bf..ee21aa0 100644 --- a/libswfdec/swfdec_player_as.c +++ b/libswfdec/swfdec_player_as.c @@ -260...
2007 Sep 04
0
4 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_video_movie_as.c test/trace
.../array-properties-5.swf.trace @@ -0,0 +1,42 @@ +_global.Array = function + CASEINSENSITIVE = number : 1 + DESCENDING = number : 2 + NUMERIC = number : 16 + RETURNINDEXEDARRAY = number : 8 + UNIQUESORT = number : 4 + constructor (hp) = _global.Object.constructor + prototype (hp) = object + __proto__ (hp) = _global.Object.prototype + concat (hp) = function + constructor (hp) = _global.Object.constructor + constructor (hp) = _global.Array + join (hp) = function + constructor (hp) = _global.Object.constructor + pop (hp) = function + constructor (hp) = _global.Object.con...
2007 Aug 17
0
4 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h test/trace
...ags-5.swf and b/test/trace/propflags-5.swf differ diff --git a/test/trace/propflags-5.swf.trace b/test/trace/propflags-5.swf.trace index 7026d1f..eeaa55a 100644 --- a/test/trace/propflags-5.swf.trace +++ b/test/trace/propflags-5.swf.trace @@ -1,3 +1,3 @@ -Hidden: 7,5,3,1,__constructor__,constructor,__proto__ -Constant: 7,6,5,4 +Hidden: 1,3,5,7,__constructor__,__proto__,constructor +Constant: 4,5,6,7 Permanent: diff --git a/test/trace/propflags-6.swf b/test/trace/propflags-6.swf index 93c2e52..2af13d8 100644 Binary files a/test/trace/propflags-6.swf and b/test/trace/propflags-6.swf differ diff --git a...
2007 Aug 22
0
3 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_function.c test/trace
...showRedrawRegions; +_global.textRenderer = textRenderer; +_global.trace = trace; +_global.unescape = unescape; +_global.updateAfterEvent = updateAfterEvent; +#endif function new_empty_object () { var hash = new Object (); @@ -65,7 +132,8 @@ function hasOwnProperty (o, prop) if (o[prop] != o.__proto__[prop]) { return true; } else { - trace ("ERROR: can't test property '" + prop + "', __proto__ has superconstant version"); + trace ("ERROR: can't test property '" + prop + + "', __proto__ has superconstant version");...
2007 Sep 03
0
20 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_initialize.h libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_number.c
...++ b/test/trace/number-properties-6.swf.trace @@ -0,0 +1,22 @@ +_global.Number = function + MAX_VALUE (hpc) = number : 1.79769313486231e+308 + MIN_VALUE (hpc) = number : 0 + NEGATIVE_INFINITY (hpc) = number : -Infinity + NaN (hpc) = number : NaN + POSITIVE_INFINITY (hpc) = number : Infinity + __proto__ (hpc) = _global.Object.__proto__ + constructor (hpc) = _global.Object.constructor + prototype (hpc) = object + __proto__ (hp) = _global.Object.prototype + constructor (hp) = _global.Number + toString (hp) = function + __proto__ (hp) = _global.Object.__proto__ + constructor (hp)...
2007 Aug 15
3
2 commits - libswfdec/swfdec_as_object.c test/trace
...644 index 0000000..9cf4c38 --- /dev/null +++ b/test/trace/addProperty-set-prototypes.as @@ -0,0 +1,18 @@ +// makeswf -v 7 -s 200x150 -r 1 -o addProperty-set-prototypes.swf addProperty-set-prototypes.as + +trace ("Check how addProperty affects prototypes"); + +o = {name: "a"}; +o.__proto__ = {name: "b", x: 10 }; +o.__proto__.__proto__ = {name: "c"}; +o.__proto__.__proto__.__proto__ = {name: "d"}; +o.__proto__.__proto__.addProperty ("x", function () { trace (this.name); return 42; }, null); +o.__proto__.__proto__.__proto__.addProperty ("x&q...
2007 Aug 20
0
3 commits - libswfdec/swfdec_as_context.c test/trace
...race/propflags-5.swf and b/test/trace/propflags-5.swf differ diff --git a/test/trace/propflags-5.swf.trace b/test/trace/propflags-5.swf.trace index eeaa55a..e7da22a 100644 --- a/test/trace/propflags-5.swf.trace +++ b/test/trace/propflags-5.swf.trace @@ -1,3 +1,11 @@ -Hidden: 1,3,5,7,__constructor__,__proto__,constructor -Constant: 4,5,6,7 -Permanent: + +h + +h + c +h c + c +h c +h +h +h diff --git a/test/trace/propflags-6.swf b/test/trace/propflags-6.swf index 2af13d8..c702cf4 100644 Binary files a/test/trace/propflags-6.swf and b/test/trace/propflags-6.swf differ diff --git a/test/t...
2007 Nov 27
0
12 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader_internal.h libswfdec/swfdec_load_object_as.c libswfdec/swfdec_load_object.c libswfdec/swfdec_load_object.h
...operties-5.swf.trace b/test/trace/global-function-properties-5.swf.trace index a8ee774..bc43d9f 100644 --- a/test/trace/global-function-properties-5.swf.trace +++ b/test/trace/global-function-properties-5.swf.trace @@ -7,7 +7,7 @@ _global.AsSetupError = function _global.clearInterval = function __proto__ (hpn) = _global.Object.__proto__ constructor (hp) = _global.Object.constructor -_global.clearTimeout = _global.clearInterval +_global.clearTimeout = function __proto__ (hp) = _global.Object.__proto__ constructor (hp) = _global.Object.constructor _global.enableDebugConsole = function diff...
2007 Sep 11
0
8 commits - libswfdec/swfdec_as_function.c libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_initialize.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_strings.c test/trace
...LL) { - var = swfdec_as_object_hash_create (object, variable, flags); - if (var == NULL) - return; - } - } - var->value = ret; - } else { - var->value = *val; - } + } else if (!object->watches) { + var->value = *val; } if (variable == SWFDEC_AS_STR___proto__) { if (SWFDEC_AS_VALUE_IS_OBJECT (val) && @@ -1340,6 +1337,7 @@ void swfdec_as_object_unwatch (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) { + SwfdecAsVariable *var; const char *name; SWFDEC_AS_VALUE_SET_BOOLEAN (...
2006 Jun 21
26
Implementing a boolean "switch" in a Class
...methods and properties } var oMyOb1 = new MyObject(); var oMyOb2 = new MyObject(); alert(oMyOb1.bSwitch); // reports false alert(oMyOb2.bSwitch); // reports false Now set the value of bSwitch to true so all the oMyObN''s will see a true value. I can see the following methods... // __proto__ works in Firefox/Safari but isn''t available in IE... oMyOb1.__proto__.bSwitch = true; alert(oMyOb1.bSwitch); // reports true alert(oMyOb2.bSwitch); // reports true // This changes bSwitch for a single instance. Not in the prototype. oMyOb1.bSwitch = true; alert(oMyOb1.bSwitch); // rep...
2007 Aug 16
0
Branch 'vivi' - 23 commits - libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_super.c libswfdec/swfdec_as_with.c libswfdec/swfdec_movie.c libswfdec/swfdec_net_stream.c libswfdec/swfdec_sprite_movie.c test/trace vivified/core
...dev/null +++ b/test/trace/addProperty-get-prototypes.as @@ -0,0 +1,18 @@ +// makeswf -v 7 -s 200x150 -r 1 -o addProperty-get-prototypes.swf addProperty-get-prototypes.as + +trace ("Check getting of variables when addProperty has been used on prototypes."); + +o = {name: "o"}; +o.__proto__ = {name: "proto"}; +o.x = 10; +trace (o.x); +o.__proto__.addProperty ("x", function () { trace (this.name); return 42; }, function () { trace (this.name + " set"); }); +trace (o.x); +o.x = 15; +trace (o.x); +delete o.x; +trace (o.x); +o.x = 20; +trace (o.x); + +loadMov...
2007 Sep 12
0
9 commits - libswfdec/swfdec_as_function.c libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_initialize.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_player_as.c test/trace
...ec_as_object_do_set (SwfdecAsObject swfdec_as_function_call (var->set, object, 1, val, &tmp); swfdec_as_context_run (object->context); } - } else if (!object->watches) { + } else if (watch == NULL) { var->value = *val; } if (variable == SWFDEC_AS_STR___proto__) { diff-tree 0b03c9ee20bed5b6ef2089e706655f1382c1b535 (from 421999f93c864a84497d9a37496c3788c966cadb) Author: Pekka Lampila <pekka.lampila at iki.fi> Date: Wed Sep 12 22:15:07 2007 +0300 Initialize Function's methods in swfdec_as_initialize.as diff --git a/libswfdec/swfdec_as_func...
2008 Jan 19
0
11 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_sprite_movie_as.c libswfdec/swfdec_xml.c libswfdec/swfdec_xml.h libswfdec/swfdec_xml_node.c libswfdec/swfdec_xml_node.h test/image test/swfdec_test.c test/swfdec_test_image.c test/trace
...Binary files /dev/null and b/test/trace/xml-id-map-5.swf differ diff --git a/test/trace/xml-id-map-5.swf.trace b/test/trace/xml-id-map-5.swf.trace new file mode 100644 index 0000000..b2dfdb1 --- /dev/null +++ b/test/trace/xml-id-map-5.swf.trace @@ -0,0 +1,25 @@ +local.x = object + 1 = object + __proto__ (hp) = _global.XMLNode.prototype + constructor (hp) = _global.XMLNode + 2 = object + __proto__ (hp) = _global.XMLNode.prototype + constructor (hp) = _global.XMLNode + __constructor__ (hn) = _global.XML + __proto__ (hp) = _global.XML.prototype + constructor (h) = _global.XML + +done +&l...
2007 Nov 07
0
36 commits - doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_amf.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_strings.c libswfdec/swfdec_buffer.c libswfdec/swfdec_buffer.h
...s-5.swf differ diff --git a/test/trace/moviecliploader-properties-5.swf.trace b/test/trace/moviecliploader-properties-5.swf.trace new file mode 100644 index 0000000..fb21320 --- /dev/null +++ b/test/trace/moviecliploader-properties-5.swf.trace @@ -0,0 +1,33 @@ +_global.MovieClipLoader = function + __proto__ (hpn) = _global.Object.__proto__ + constructor (hp) = _global.Object.constructor + prototype (hp) = object + __proto__ (hpn) = _global.Object.prototype + _listeners (hpn) = object + __proto__ (hp) = _global.Array.prototype + constructor (hp) = _global.Array + length (hp) = nu...
2007 Aug 22
0
5 commits - libswfdec/swfdec_as_object.c NEWS player/swfplay.c
...ct. - implement Stage actionscript object. Movies can now do the scaling themselves. diff-tree d68ae26a9b84711a95c9f985b608f89e7dd2a231 (from 0fcaa45507dc974d08ac3d27814cbc72a7237e64) Author: Benjamin Otte <otte at gnome.org> Date: Wed Aug 22 11:04:04 2007 +0200 set constructor before __proto__ This avoids issues when __proto__.constructor is permanent diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c index f6e07af..d24c337 100644 --- a/libswfdec/swfdec_as_object.c +++ b/libswfdec/swfdec_as_object.c @@ -494,12 +494,12 @@ swfdec_as_object_new (SwfdecAsConte...
2007 Oct 26
0
2 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.h test/trace
....90e95c5 --- /dev/null +++ b/test/trace/implements.as @@ -0,0 +1,95 @@ +// makeswf -v 7 -r 1 -o implements-7.swf implements.as + +trace ("Test Implements ActionScript action"); + + +trace ("A implements Array, XML"); + +var A = function () { + return { + constructor: A, + __proto__: A.prototype + }; +}; + +trace ("Before"); +var o = new A (); +trace (o instanceOf A); +trace (o instanceOf Array); +trace (o instanceOf XML); +trace (o instanceOf String); + +asm { + push "test" + push "Array" + getvariable + push "XML" + getvariable +...
2007 Aug 22
0
5 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_boolean.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_math.c libswfdec/swfdec_as_number.c libswfdec/swfdec_as_script_function.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h
...YPE_AS_NUMBER, swfdec_as_number_toString, 0); swfdec_as_object_add_function (proto, SWFDEC_AS_STR_valueOf, SWFDEC_TYPE_AS_NUMBER, swfdec_as_number_valueOf, 0); SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Object_prototype); swfdec_as_object_set_variable_and_flags (proto, SWFDEC_AS_STR___proto__, &val, - SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); + SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT | + SWFDEC_AS_VARIABLE_CONSTANT); } diff --git a/libswfdec/swfdec_initialize.as b/libswfdec/swfdec_initialize.as index 009bbcc..502942e 100644 --- a/l...