gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/avm2 r9597: GET_PROPERTY opcode: If the pr


From: Tom Stellard
Subject: [Gnash-commit] /srv/bzr/gnash/avm2 r9597: GET_PROPERTY opcode: If the property is a runtime multiname, get its name from the stack.
Date: Fri, 10 Oct 2008 01:34:04 +0800
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9597
committer: Tom Stellard <address@hidden>
branch nick: gnash_dev
timestamp: Fri 2008-10-10 01:34:04 +0800
message:
  GET_PROPERTY opcode:  If the property is a runtime multiname, get its name 
from the stack.
modified:
  libcore/vm/Machine.cpp
=== modified file 'libcore/vm/Machine.cpp'
--- a/libcore/vm/Machine.cpp    2008-10-05 12:04:25 +0000
+++ b/libcore/vm/Machine.cpp    2008-10-09 17:34:04 +0000
@@ -1574,12 +1574,23 @@
 /// NB: See 0x61 (ABC_ACTION_SETPROPETY) for the decision of ns/key.
        case SWF::ABC_ACTION_GETPROPERTY:
        {
+               as_value val;
+               string_table::key ns = 0;
+               string_table::key name = 0;
                asName a = pool_name(mStream->read_V32(), mPoolObject);
                //TODO: If multiname is runtime we need to also pop namespace 
and name values of the stack.
+               if(a.mFlags == asName::KIND_MultinameL){
+                       as_value nameValue = pop_stack();
+                       name = mST.find(nameValue.to_string());
+               }
+               else{
+                       name = a.getGlobalName();
+               }
+
                as_value obj = pop_stack();
-               as_value val;
+
                if(!obj.is_undefined()){
-                       obj.to_object().get()->get_member(a.getGlobalName(), 
&val);
+                       obj.to_object().get()->get_member(name, &val, ns);
                }
                push_stack(val);
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]