bugGnash - The GNU Flash player - Bugs: bug #18661, ActionExtend & Super (AS...

 
 

bug #18661: ActionExtend & Super (AS inheritance) not implemented

Submitted by:  Tomas Groth <tgc>
Submitted on:  Sun 31 Dec 2006 11:37:42 AM UTC  
 
Category: ActionScriptSeverity: 3 - Normal
Release: NoneStatus: Fixed
Privacy: PublicAssigned to: Sandro Santilli <strk>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 08 Jan 2007 12:29:47 PM UTC, comment #4:

Added your 'prototype' tests to the existing Inheritance.as file, under the 'extends' section.
This works fine in Gnash and doesn't trigger the assertion failure.
Let me know if something else was expected.

About the premature deletion. I confirm the add_ref() fixes it,
but I'm trying to get rid of explicit calls to that function
as reference counting should be handled by the intrusive_ptr
class from boost, see libbase/shared_ptr.h for details.

Any explicit add_ref() should have a corresponding explicit
drop_ref() or memory would leak. Anyway, your finding is good
as at least we now know exactly which object is suffering from
this problem.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Mon 08 Jan 2007 10:43:09 AM UTC, comment #3:

testcase done.

Quick fix for "premature deletion of a ref_counted object"

void as_function::extends(as_function& superclass)
{
_properties = new as_object(superclass.getPrototype());
_properties->set_member("constructor", &superclass);
_properties->set_member_flags("constructor", 1);

_properties->add_ref(); //add this, works for me
set_member("prototype", as_value(_properties.get()));
}

(file #11699)

Zou Lunkai <zoulunkai>
Tue 02 Jan 2007 12:49:38 PM UTC, comment #2:

Just committed an implementation of ActionExtends.
I don't have simple testcase to verify this does what it is supposed to, if anyone can provide smaller testcases that'd be nice.

Btw, playing the player2.swf movie now results in an assertion failing about premature deletion of a ref_counted object.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Tue 02 Jan 2007 01:55:23 AM UTC, comment #1:

I've added support for 'super'. Tested for function1 (with Ming - see Inheritance.as), untested for function2.
Lulu player still has ActionScript problems though, other testcases are welcome.

Will approach ActionExtends later.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Sun 31 Dec 2006 11:37:42 AM UTC, original submission:

youtube.com and lulu.tv uses the ActionExtend and Super (AS inheritance), but since they aren't implemented they don't work...

Using this command:
gui/gnash http://www.lulu.tv/wp-content/flash_play/flvplayer-nowings-lulutv-beta3.swf -P "file=http://static.lulu.tv//wp-content/video/1408/flash/4902/1166669036.flv"

shows that super is needed for lulu.tv

And for youtube we use:
gui/gnash -v "http://youtube.com/player2.swf?video_id=iiHZ73LskaM&l=189&t=OEgsToPDskL1yUSWFJ5qG0NVpodJZVMR&s=E6B502D994CDFCE4:583FD92878F9EFAF" -U "http://youtube.com/watch?v=iiHZ73LskaM" -P "src=/player2.swf?video_id=iiHZ73LskaM&l=189&t=OEgsToPDskL1yUSWFJ5qG0NVpodJZVMR&s=E6B502D994CDFCE4:583FD92878F9EFAF"

to shown that ActionExtend is needed.

Tomas Groth <tgc>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #11699:  extends.as added by zoulunkai (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by zoulunkai (Updated the item)
  • -unavailable- added by strk (Posted a comment)
  • -unavailable- added by tgc (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 09 Apr 2007 09:53:43 AM UTCstrkStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Mon 08 Jan 2007 10:43:09 AM UTCzoulunkaiAttached File-=>Added extends.as, #11699
    Tue 02 Jan 2007 12:49:38 PM UTCstrkStatusConfirmed=>Ready For Test
    Tue 02 Jan 2007 01:55:23 AM UTCstrkStatusNone=>Confirmed
      Assigned toNone=>strk

    Back to the top


    Powered by Savane 3.1-cleanup1