gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r10998: Fix the VM switcher so that


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r10998: Fix the VM switcher so that it also works when execute() is called
Date: Thu, 04 Jun 2009 18:41:12 +0200
User-agent: Bazaar (1.13.1)

------------------------------------------------------------
revno: 10998
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Thu 2009-06-04 18:41:12 +0200
message:
  Fix the VM switcher so that it also works when execute() is called
  recursively.
modified:
  libcore/vm/Machine.cpp
=== modified file 'libcore/vm/Machine.cpp'
--- a/libcore/vm/Machine.cpp    2009-06-04 10:18:48 +0000
+++ b/libcore/vm/Machine.cpp    2009-06-04 16:41:12 +0000
@@ -245,23 +245,26 @@
 namespace {
 
 /// Switch the execution context to AVM2, and make sure it's
-/// switched back again even when there's an exception.
+/// switched back again to what it was before even when there's an exception.
 class AVM2Switcher
 {
 public:
     AVM2Switcher(VM& vm)
         :
-        _vm(vm)
+        _vm(vm),
+        _ver(vm.getAVMVersion())
     {
         _vm.setAVMVersion(VM::AVM2);
     }
 
     ~AVM2Switcher()
     {
-        _vm.setAVMVersion(VM::AVM1);
+        _vm.setAVMVersion(_ver);
     }
+
 private:
     VM& _vm;
+    VM::AVMVersion _ver;
 };
 
 }


reply via email to

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