[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/avm2 r9700: Log aserror and donothing when
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] /srv/bzr/gnash/avm2 r9700: Log aserror and donothing when class to be instantiated isn't found (yeah, I know it'a s gnash bug not finding that, but I think you can reproduce this with a malformed SWF too) |
Date: |
Tue, 31 Mar 2009 11:06:17 +0200 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9700
committer: Sandro Santilli <address@hidden>
branch nick: avm2
timestamp: Tue 2009-03-31 11:06:17 +0200
message:
Log aserror and donothing when class to be instantiated isn't found (yeah, I
know it'a s gnash bug not finding that, but I think you can reproduce this with
a malformed SWF too)
modified:
libcore/vm/Machine.cpp
=== modified file 'libcore/vm/Machine.cpp'
--- a/libcore/vm/Machine.cpp 2009-03-25 11:02:48 +0000
+++ b/libcore/vm/Machine.cpp 2009-03-31 09:06:17 +0000
@@ -2768,9 +2768,15 @@
log_debug("instantiateClass: class name %s", className);
asClass* theClass = mPoolObject->locateClass(className);
+ if ( ! theClass )
+ {
+ // TODO: check how the pp would handle this
+ IF_VERBOSE_ASCODING_ERRORS(
+ log_aserror("Could not locate class '%s' for instantiation",
className);
+ );
+ return;
+ }
- // TODO: what happens when it's not located?
- assert (theClass);
clearRegisters(theClass->getConstructor()->getMaxRegisters());
mCurrentFunction = theClass->getConstructor()->getPrototype();
mStack.clear();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/avm2 r9700: Log aserror and donothing when class to be instantiated isn't found (yeah, I know it'a s gnash bug not finding that, but I think you can reproduce this with a malformed SWF too),
Sandro Santilli <=